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