Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

THistoManager.h

Go to the documentation of this file.
00001 
00002 // Class THistoManager
00003 //
00004 // Author     : F. Cassol Brunner
00005 // Created    : 9/10/2002
00006 // Last updated : $Date: 2005/07/06 09:38:34 $
00007 //           by : $Author: sauvan $
00008 // Comment: allows to manage histos, and their declaration  
00009 //          through a parameter file
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 //------ ROOT includes --------- 
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 //     basic class for histogramming 
00041 public : 
00042         
00043         
00044         TClonesArray*  fHisto1D[40];                // list of 1D histograms
00045         TClonesArray*  fHisto2D[40];                // list of 2D histograms
00046         TClonesArray*  fHisto3D[40];                // list of 3D histograms
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 //--- Histo cards parsers
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 //--- histogram filling routines
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

Generated on Thu Jul 28 11:48:52 2005 for SFHMarana by doxygen 1.3.2