CMS 3D CMS Logo

SiStripTFile.h
Go to the documentation of this file.
1 
2 #ifndef DQM_SiStripCommissioningClients_SiStripTFile_H
3 #define DQM_SiStripCommissioningClients_SiStripTFile_H
4 
6 #include "TFile.h"
7 #include <vector>
8 #include <string>
9 #include <map>
10 
11 class TDirectory;
12 class TH1;
13 
21 class SiStripTFile : public TFile {
22 public:
23  // -------------------- Constructors, destructors, typedefs --------------------
24 
26  SiStripTFile(const char* fname, Option_t* option = "UPDATE", const char* ftitle = "", Int_t compress = 1);
27 
29  ~SiStripTFile() override;
30 
32  typedef std::vector<TH1*> Histos;
33 
35  typedef std::map<std::string, Histos> HistosMap;
36 
37  // -------------------- Public interface --------------------
38 
43 
47  TDirectory* readDQMFormat();
48 
51  bool queryDQMFormat();
52 
54  TDirectory* top();
55 
57  TDirectory* dqmTop();
58 
60  TDirectory* sistripTop();
61 
64 
67 
69  void addDevice(unsigned int key);
70 
72  TDirectory* addPath(const std::string&);
73 
75  void findHistos(TDirectory*, std::map<std::string, std::vector<TH1*> >*);
76 
79  void dirContent(TDirectory*, std::vector<TDirectory*>*, std::map<std::string, std::vector<TH1*> >*);
80 
81 private:
84 
87 
89  TDirectory* top_;
90 
92  TDirectory* dqmTop_;
93 
95  TDirectory* sistripTop_;
96 
98  bool dqmFormat_;
99 };
100 
101 #endif // DQM_SiStripCommissioningClients_SiStripTFile_H
TDirectory * setDQMFormat(sistrip::RunType, sistrip::View)
Definition: SiStripTFile.cc:31
TDirectory * addPath(const std::string &)
sistrip::View view_
Definition: SiStripTFile.h:86
TDirectory * sistripTop_
Definition: SiStripTFile.h:95
void dirContent(TDirectory *, std::vector< TDirectory *> *, std::map< std::string, std::vector< TH1 *> > *)
TDirectory * dqmTop()
std::vector< TH1 * > Histos
Definition: SiStripTFile.h:32
TDirectory * readDQMFormat()
Definition: SiStripTFile.cc:63
bool queryDQMFormat()
~SiStripTFile() override
Definition: SiStripTFile.cc:27
sistrip::RunType runType_
Definition: SiStripTFile.h:83
std::map< std::string, Histos > HistosMap
Definition: SiStripTFile.h:35
TDirectory * top_
Definition: SiStripTFile.h:89
sistrip::RunType & runType()
sistrip::View & View()
TDirectory * sistripTop()
void findHistos(TDirectory *, std::map< std::string, std::vector< TH1 *> > *)
TDirectory * dqmTop_
Definition: SiStripTFile.h:92
string fname
main script
: Adds functionality to TFile to ease building and navigation of TFiles containing DQM histograms...
Definition: SiStripTFile.h:21
TDirectory * top()
SiStripTFile(const char *fname, Option_t *option="UPDATE", const char *ftitle="", Int_t compress=1)
Definition: SiStripTFile.cc:14
void addDevice(unsigned int key)