FairMQ/fairmq/devices/GenericFileSink.h
Alexey Rybalchenko 26a1033e9d Rename device property to have a common format and some code cleanup.
FairMQDevice: Rename property for socket rate logging to have common format (old name is still available for compatibility).
FairMQ: Avoid using std namespace in class headers (may require adding std namespace to some child devices).
FairMQ: A bit of code cleanup
FairMQConfigurable: Stop with an error if a property assignment failed due to incorrect key.
2015-05-28 09:32:30 +02:00

47 lines
987 B
C++

/*
* File: GenericFileSink.h
* Author: winckler
*
* Created on October 7, 2014, 6:06 PM
*/
#ifndef GENERICFILESINK_H
#define GENERICFILESINK_H
#include <boost/thread.hpp>
#include <boost/bind.hpp>
#include "FairMQDevice.h"
#include "FairMQLogger.h"
template <typename InputPolicy, typename OutputPolicy>
class GenericFileSink : public FairMQDevice, public InputPolicy, public OutputPolicy
{
//using InputPolicy::message;
//using OutputPolicy::InitOutFile;
//using OutputPolicy::AddToFile;
public:
GenericFileSink();
virtual ~GenericFileSink();
template <typename... Args>
void InitInputPolicyContainer(Args... args)
{
InputPolicy::InitContainer(std::forward<Args>(args)...);
}
virtual void SetTransport(FairMQTransportFactory* transport);
virtual void InitOutputFile();
protected:
virtual void Run();
virtual void Init();
};
#include "GenericFileSink.tpl"
#endif /* GENERICFILESINK_H */