otsdaq  v1_01_04
 All Classes Namespaces Functions
EventDataSaver.h
1 #ifndef _ots_EventDataSaver_h
2 #define _ots_EventDataSaver_h
3 
4 #include "otsdaq-core/DataManager/DataConsumer.h"
5 //#include "otsdaq-core/EventBuilder/Event.h"
6 #include <string>
7 
8 class TFile;
9 class TTree;
10 
11 namespace ots
12 {
13 class Event;
14 
16 {
17 public:
18  EventDataSaver(std::string supervisorApplicationUID, std::string bufferUID, std::string processorUID, ConsumerPriority priority);
19  virtual ~EventDataSaver(void);
20 
21  void openFile(std::string fileName);
22  void closeFile(void);
23  void save(std::string& data);
24  //Getters
25  std::string getName(void);
26 
27  //Setters
28 
29 protected:
30  void writeHeader(void);
31  bool workLoopThread(toolbox::task::WorkLoop* workLoop);
32  TFile* outFile_;
33  Event* anEvent_;
34  TTree* outTree_;
35 };
36 
37 }
38 
39 #endif