1 #ifndef EUDAQ_INCLUDED_FileWriter
2 #define EUDAQ_INCLUDED_FileWriter
4 #include "eudaq/DetectorEvent.hh"
13 virtual void StartRun(
unsigned runnumber) = 0;
15 virtual uint64_t FileBytes()
const = 0;
16 void SetFilePattern(
const std::string &p) { m_filepattern = p; }
20 std::string m_filepattern;
25 static FileWriter *Create(
const std::string &name,
26 const std::string ¶ms =
"");
27 template <
typename T>
static void Register(
const std::string &name) {
28 do_register(name, filewriterfactory<T>);
30 typedef FileWriter *(*factoryfunc)(
const std::string &);
31 static std::vector<std::string> GetTypes();
35 static FileWriter *filewriterfactory(
const std::string ¶ms) {
38 static void do_register(
const std::string &name, factoryfunc);
44 FileWriterFactory::Register<T>(name);
49 #endif // EUDAQ_INCLUDED_FileWriter
Definition: FileWriter.hh:23
Definition: FileWriter.hh:41
Definition: DetectorEvent.hh:12
Definition: FileWriter.hh:10