CMS 3D CMS Logo

TestHistoMgr.h
Go to the documentation of this file.
1 #ifndef TestHistoMgr_h
2 #define TestHistoMgr_h 1
3 
4 #include "TH1F.h"
5 #include "TH2F.h"
6 #include "TProfile.h"
7 #include "TProfile2D.h"
8 #include "TFile.h"
9 
11 
12 #include <map>
13 #include <string>
14 #include <memory>
15 
16 typedef std::map<int, TH1F*> mih1;
17 typedef std::map<int, TH2F*> mih2;
18 typedef std::map<int, TProfile*> mihp1;
19 typedef std::map<int, TProfile2D*> mihp2;
20 
21 class TestHistoMgr {
22 public:
23  TestHistoMgr();
24  ~TestHistoMgr();
25  void save(const std::string& name);
26  void openSecondFile(const std::string& name);
27 
28  void printComparisonResult(int ih);
29 
30  bool addHisto1(TH1F* ih);
31  bool addHisto2(TH2F* ih);
32  bool addHistoProf1(TProfile* ih);
33  bool addHistoProf2(TProfile2D* ih);
34 
35  TH1F* getHisto1(int ih);
36  TH2F* getHisto2(int ih);
37  TProfile* getHistoProf1(int ih);
38  TProfile2D* getHistoProf2(int ih);
39 
40  TH1F* getHisto1FromSecondFile(const char* hnam);
41 
42 private:
47 
48  std::unique_ptr<TFile> theFileRef;
49 };
50 
51 #endif
TestHistoMgr::save
void save(const std::string &name)
Definition: TestHistoMgr.cc:39
MessageLogger.h
TestHistoMgr::addHisto2
bool addHisto2(TH2F *ih)
Definition: TestHistoMgr.cc:115
TestHistoMgr::addHisto1
bool addHisto1(TH1F *ih)
Definition: TestHistoMgr.cc:108
TestHistoMgr::theHistos1
mih1 theHistos1
Definition: TestHistoMgr.h:43
TestHistoMgr::getHisto2
TH2F * getHisto2(int ih)
Definition: TestHistoMgr.cc:148
TestHistoMgr::theFileRef
std::unique_ptr< TFile > theFileRef
Definition: TestHistoMgr.h:48
TestHistoMgr::openSecondFile
void openSecondFile(const std::string &name)
Definition: TestHistoMgr.cc:64
TestHistoMgr::theHistoProfs1
mihp1 theHistoProfs1
Definition: TestHistoMgr.h:45
mihp2
std::map< int, TProfile2D * > mihp2
Definition: TestHistoMgr.h:19
TestHistoMgr::addHistoProf2
bool addHistoProf2(TProfile2D *ih)
Definition: TestHistoMgr.cc:128
TestHistoMgr::printComparisonResult
void printComparisonResult(int ih)
Definition: TestHistoMgr.cc:66
mih2
std::map< int, TH2F * > mih2
Definition: TestHistoMgr.h:17
mih1
std::map< int, TH1F * > mih1
Definition: TestHistoMgr.h:16
TestHistoMgr::TestHistoMgr
TestHistoMgr()
Definition: TestHistoMgr.cc:18
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TestHistoMgr::theHistoProfs2
mihp2 theHistoProfs2
Definition: TestHistoMgr.h:46
TestHistoMgr::getHistoProf1
TProfile * getHistoProf1(int ih)
Definition: TestHistoMgr.cc:160
TestHistoMgr::getHistoProf2
TProfile2D * getHistoProf2(int ih)
Definition: TestHistoMgr.cc:172
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
TestHistoMgr::getHisto1FromSecondFile
TH1F * getHisto1FromSecondFile(const char *hnam)
Definition: TestHistoMgr.cc:184
TestHistoMgr::theHistos2
mih2 theHistos2
Definition: TestHistoMgr.h:44
TestHistoMgr::~TestHistoMgr
~TestHistoMgr()
Definition: TestHistoMgr.cc:23
TestHistoMgr::addHistoProf1
bool addHistoProf1(TProfile *ih)
Definition: TestHistoMgr.cc:121
mihp1
std::map< int, TProfile * > mihp1
Definition: TestHistoMgr.h:18
TestHistoMgr
Definition: TestHistoMgr.h:21
TestHistoMgr::getHisto1
TH1F * getHisto1(int ih)
Definition: TestHistoMgr.cc:135