CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
10 #include <map>
11 #include <string>
12 
13 //#include "HTL/Histograms.h" // Transient histograms.
14 typedef std::map< int, TH1F* > mih1;
15 typedef std::map< int, TH2F* > mih2;
16 typedef std::map< int, TProfile* > mihp1;
17 typedef std::map< int, TProfile2D* > mihp2;
18 
19 
21 {
22 public:
23 
24  TestHistoMgr();
25  ~TestHistoMgr();
26  void save( const std::string& name );
27  void openSecondFile( const std::string& name );
28 
29  void printComparisonResult( int ih );
30 
31  bool addHisto1( TH1F* ih );
32  bool addHisto2( TH2F* ih );
33  bool addHistoProf1( TProfile* ih );
34  bool addHistoProf2( TProfile2D* ih );
35 
36  TH1F* getHisto1( int ih );
37  TH2F* getHisto2( int ih );
38  TProfile* getHistoProf1( int ih );
39  TProfile2D* getHistoProf2( int ih );
40 
41  TH1F* getHisto1FromSecondFile( const char* hnam );
42 
43  private:
48 
49  TFile * theFileRef;
50 
51 };
52 
53 
54 #endif
TProfile2D * getHistoProf2(int ih)
bool addHistoProf2(TProfile2D *ih)
bool addHisto1(TH1F *ih)
std::map< int, TProfile * > mihp1
Definition: TestHistoMgr.h:16
void openSecondFile(const std::string &name)
Definition: TestHistoMgr.cc:76
TProfile * getHistoProf1(int ih)
std::map< int, TH2F * > mih2
Definition: TestHistoMgr.h:15
TH2F * getHisto2(int ih)
void save(const std::string &name)
Definition: TestHistoMgr.cc:50
mihp2 theHistoProfs2
Definition: TestHistoMgr.h:47
TH1F * getHisto1FromSecondFile(const char *hnam)
void printComparisonResult(int ih)
Definition: TestHistoMgr.cc:92
std::map< int, TH1F * > mih1
Definition: TestHistoMgr.h:14
bool addHistoProf1(TProfile *ih)
TH1F * getHisto1(int ih)
mihp1 theHistoProfs1
Definition: TestHistoMgr.h:46
TFile * theFileRef
Definition: TestHistoMgr.h:49
bool addHisto2(TH2F *ih)
std::map< int, TProfile2D * > mihp2
Definition: TestHistoMgr.h:17