otsdaq  v2_04_01
DQMHistosOuterTracker.h
1 #ifndef _ots_DQMHistosOuterTracker_h_
2 #define _ots_DQMHistosOuterTracker_h_
3 
4 #include <map>
5 #include <queue>
6 #include <string>
7 #include "otsdaq-core/DataDecoders/DataDecoder.h"
8 // ROOT documentation
9 // http://root.cern.ch/root/html/index.html
10 
11 class TFile;
12 class TCanvas;
13 class TH1;
14 class TH1I;
15 class TH1F;
16 class TH2F;
17 class TProfile;
18 class TDirectory;
19 class TObject;
20 
21 namespace ots
22 {
23 class ConfigurationManager;
24 
26 {
27  public:
28  DQMHistosOuterTracker(std::string supervisorApplicationUID,
29  std::string bufferUID,
30  std::string processorUID);
31  virtual ~DQMHistosOuterTracker(void);
32  void setConfigurationManager(ConfigurationManager* configurationManager)
33  {
34  theConfigurationManager_ = configurationManager;
35  }
36  void book(void);
37  void fill(std::string& buffer, std::map<std::string, std::string> header);
38  void save(void);
39  void load(std::string fileName);
40  TObject* get(std::string name);
41 
42  TFile* getFile() { return theFile_; } // added by RAR
43 
44  // Getters
45  // TCanvas* getCanvas (void){return canvas_;}
46  // TH1F* getHisto1D(void){return histo1D_;}
47  // TH2F* getHisto2D(void){return histo2D_;}
48  // TProfile* getProfile(void){return profile_;}
49 
50  protected:
51  void openFile(std::string fileName);
52  void closeFile(void);
53  TFile* theFile_;
54 
55  DataDecoder theDataDecoder_;
56  std::queue<uint32_t> convertedBuffer_;
57 
58  // TCanvas* canvas_; // main canvas
59  // TH1F* histo1D_;// 1-D histogram
60  // TH2F* histo2D_;// 2-D histogram
61  // TProfile* profile_;// profile histogram
62  // IPAddress port channel
63  std::map<std::string, std::map<std::string, std::map<unsigned int, TH1*>>>
64  planeOccupancies_;
65  // std::vector<TH1I*> planeOccupancies_;
66  TH1I* numberOfTriggers_;
67  const std::string supervisorContextUID_;
68  const std::string supervisorApplicationUID_;
69  const std::string bufferUID_;
70  const std::string processorUID_;
71  TDirectory* currentDirectory_;
72  ConfigurationManager* theConfigurationManager_;
73 };
74 } // namespace ots
75 
76 #endif
void fill(std::string &buffer, std::map< std::string, std::string > header)