otsdaq_demo  v2_05_02_indev
DemoDQMHistosConsumer.h
1 #ifndef _ots_DemoDQMHistosConsumer_h_
2 #define _ots_DemoDQMHistosConsumer_h_
3 
4 #include "otsdaq/Configurable/Configurable.h"
5 #include "otsdaq/DataManager/DQMHistosConsumerBase.h"
6 
7 #include <string>
8 
9 namespace ots
10 {
11 class ConfigurationManager;
12 class DemoDQMHistos;
13 
14 class DemoDQMHistosConsumer : public DQMHistosConsumerBase, public Configurable
15 {
16  public:
17  DemoDQMHistosConsumer(std::string supervisorApplicationUID,
18  std::string bufferUID,
19  std::string processorUID,
20  const ConfigurationTree& theXDAQContextConfigTree,
21  const std::string& configurationPath);
22  virtual ~DemoDQMHistosConsumer(void);
23 
24  void startProcessingData(std::string runNumber) override;
25  void stopProcessingData(void) override;
26 
27  private:
28  bool workLoopThread(toolbox::task::WorkLoop* workLoop) override;
29  void fastRead(void);
30  void slowRead(void);
31 
32  // For fast read
33  std::string* dataP_;
34  std::map<std::string, std::string>* headerP_;
35  // For slow read
36  std::string data_;
37  std::map<std::string, std::string> header_;
38 
39  bool saveDQMFile_; // yes or no
40  std::string DQMFilePath_;
41  std::string DQMFilePrefix_;
42  DemoDQMHistos* dqmHistos_;
43 };
44 }
45 
46 #endif