00001
00002
00003
00004
00005
00006
00007
00008
00009
00011
00012 #ifndef __THISTOMANAGER_H
00013 #define __THISTOMANAGER_H
00014
00015
00016
00017 #include <sstream>
00018 #include <cctype>
00019 #include <cstdio>
00020 #include <cstdlib>
00021 #include <iostream>
00022 #include <fstream>
00023 #include <vector>
00024 #include <string>
00025 #include <list>
00026
00027
00028 #include <TFile.h>
00029 #include <TH1.h>
00030 #include <TH2.h>
00031 #include <TH3.h>
00032 #include <TTree.h>
00033
00034 using namespace std;
00035
00036
00037 class THistoManager {
00039
00041 public :
00042
00043
00044 TClonesArray* fHisto1D[40];
00045 TClonesArray* fHisto2D[40];
00046 TClonesArray* fHisto3D[40];
00047
00048
00049 THistoManager();
00050 THistoManager(string Parameters_file,string Tag);
00051
00052 virtual ~THistoManager();
00053
00054 virtual void ReadParameters(string Parameters_file,string Tag,const Short_t SysNum=0);
00055 virtual void ReadParameters(string parameters_file,string Tag,string ClassName,
00056 list<string>& PartTags,const Short_t SysNum=0);
00057 virtual bool ParseHistos(
00058 istringstream& inParams,string& type, Int_t hoffset,
00059 string Tag, list<string>& PartTags,const Short_t SysNum=0);
00060
00061
00062 void ReadParamsh1f(istringstream &inParams,string type,Int_t hoffset,const Short_t SysNum=0,const Bool_t BookforSys=kFALSE);
00063 void ReadParamsh2f(istringstream &inParams,string type,Int_t hoffset,const Short_t SysNum=0,const Bool_t BookforSys=kFALSE);
00064 void ReadParamsh1fgeneric(istringstream &inParams,string type,Int_t hoffset,list<string>& PartTags,
00065 const Short_t SysNum=0,const Bool_t BookforSys=kFALSE);
00066 void ReadParams2dbin(istringstream &inParams,string type,Int_t hoffset,const Short_t SysNum=0);
00067 void ReadParams3dbin(istringstream &inParams,string type,Int_t hoffset,const Short_t SysNum=0);
00068 void ReadParams1binfh1f(istringstream &inParams,string type,Int_t hoffset,const Short_t SysNum=0,const Bool_t BookforSys=kFALSE);
00069 void ReadParams1binvh1f(istringstream &inParams,string type,Int_t hoffset,const Short_t SysNum=0,const Bool_t BookforSys=kFALSE);
00070 void ReadParams1binVarSizeh1f(istringstream &inParams,string type,Int_t hoffset,const Short_t SysNum=0,const Bool_t BookforSys=kFALSE);
00071 void ReadParams2binfh1f(istringstream &inParams,string type,Int_t hoffset,const Short_t SysNum=0,const Bool_t BookforSys=kFALSE);
00072 void ReadParams2binvh1f(istringstream &inParams,string type,Int_t hoffset,const Short_t SysNum=0,const Bool_t BookforSys=kFALSE);
00073
00074
00075 void FillHisto( const int& num, const double& value, const double& wait,const Short_t SysNum=0);
00076 void FillHisto( const int& num, const double& value_x, const double& value_y, const double& wait,const Short_t SysNum=0);
00077 void FillHisto( const int& num, const double& value_x, const double& value_y, const double& value_z,const double& wait,const Short_t SysNum=0);
00078 void Fill1BinHisto(Int_t hnum,Double_t binvalue,Double_t value,Double_t wait,const Short_t SysNum=0);
00079 void Fill2BinHisto(Int_t hnum,Double_t binvalue,Double_t
00080 binvalue2,Double_t value,Double_t wait,const Short_t SysNum=0);
00081
00082 void Scale1dHisto(Int_t hnum,Float_t ScaleParam,const Short_t SysNum=0);
00083 };
00084
00085 #endif