otsdaq  v1_01_02
 All Classes Namespaces Functions
DQMHistosOuterTracker.h
1 #ifndef _ots_DQMHistosOuterTracker_h_
2 #define _ots_DQMHistosOuterTracker_h_
3 
4 #include "otsdaq-core/DataDecoders/DataDecoder.h"
5 #include <queue>
6 #include <string>
7 #include <map>
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 
24 class ConfigurationManager;
25 
27 {
28  public:
29  DQMHistosOuterTracker(std::string supervisorApplicationUID, std::string bufferUID, std::string processorUID);
30  virtual ~DQMHistosOuterTracker(void);
31  void setConfigurationManager(ConfigurationManager* configurationManager){theConfigurationManager_ = configurationManager;}
32  void book(void);
33  void fill(std::string& buffer, std::map<std::string, std::string> header);
34  void save(void);
35  void load(std::string fileName);
36  TObject* get (std::string name);
37 
38  TFile* getFile() {return theFile_;} //added by RAR
39 
40  //Getters
41  //TCanvas* getCanvas (void){return canvas_;}
42  //TH1F* getHisto1D(void){return histo1D_;}
43  //TH2F* getHisto2D(void){return histo2D_;}
44  //TProfile* getProfile(void){return profile_;}
45 
46 
47  protected:
48  void openFile (std::string fileName);
49  void closeFile(void);
50  TFile* theFile_;
51 
52  DataDecoder theDataDecoder_;
53  std::queue<uint32_t> convertedBuffer_;
54 
55  //TCanvas* canvas_; // main canvas
56  //TH1F* histo1D_;// 1-D histogram
57  //TH2F* histo2D_;// 2-D histogram
58  //TProfile* profile_;// profile histogram
59  // IPAddress port channel
60  std::map<std::string, std::map<std::string, std::map<unsigned int, TH1*>>> planeOccupancies_;
61  //std::vector<TH1I*> planeOccupancies_;
62  TH1I* numberOfTriggers_;
63  const std::string supervisorContextUID_;
64  const std::string supervisorApplicationUID_;
65  const std::string bufferUID_;
66  const std::string processorUID_;
67  TDirectory* currentDirectory_;
68  ConfigurationManager* theConfigurationManager_;
69 };
70 }
71 
72 #endif