CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_9_patch3/src/Validation/Geometry/interface/TestHistoMgr.h

Go to the documentation of this file.
00001 #ifndef TestHistoMgr_h
00002 #define TestHistoMgr_h 1
00003 
00004 #include "TH1F.h"
00005 #include "TH2F.h"
00006 #include "TProfile.h"
00007 #include "TProfile2D.h"
00008 #include "TFile.h"
00009 
00010 #include <map>
00011 #include <string>
00012 
00013 //#include "HTL/Histograms.h" // Transient histograms.
00014 typedef std::map< int, TH1F* > mih1;
00015 typedef std::map< int, TH2F* > mih2;
00016 typedef std::map< int, TProfile* > mihp1;
00017 typedef std::map< int, TProfile2D* > mihp2;
00018 
00019 
00020 class TestHistoMgr 
00021 {
00022 public:
00023 
00024   TestHistoMgr();
00025   ~TestHistoMgr();
00026   void save( const std::string& name );
00027   void openSecondFile( const std::string& name );
00028 
00029   void printComparisonResult( int ih );
00030 
00031   bool addHisto1( TH1F* ih );
00032   bool addHisto2( TH2F* ih );
00033   bool addHistoProf1( TProfile* ih );
00034   bool addHistoProf2( TProfile2D* ih );
00035 
00036   TH1F* getHisto1( int ih );
00037   TH2F* getHisto2( int ih );
00038   TProfile* getHistoProf1( int ih );
00039   TProfile2D* getHistoProf2( int ih );
00040 
00041   TH1F* getHisto1FromSecondFile( const char* hnam );
00042 
00043  private:
00044   mih1 theHistos1;
00045   mih2 theHistos2;
00046   mihp1 theHistoProfs1;
00047   mihp2 theHistoProfs2;
00048 
00049   TFile * theFileRef;
00050 
00051 };
00052 
00053 
00054 #endif