Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members | Related Pages

SetOfH.h

Go to the documentation of this file.
00001 
00008 #ifndef __SETOFH_H
00009 #define __SETOFH_H
00010 
00011 #include "jbltools/sfh/ROList.h"
00012 
00013 #include "jbltools/sfh/BinningFunPoR.h"
00014 #include "jbltools/sfh/Binning.h"
00015 
00016 #include <Rtypes.h> // for Option_t
00017 
00018 
00019 class BinningFun;
00020 class TH1;
00021 
00022 // Class SetOfH
00024 
00053 class SetOfH: public ROList {
00054   public:
00056     SetOfH (const char* name_,               
00057             const char* title_,              
00058             const ROListPoR& hhl,            
00059             const BinningFunPoR& binning1_,  
00060             Option_t* option_ = 0            
00061            );
00063     SetOfH (const char* name_,               
00064             const char* title_,              
00065             const ROListPoR& hhl,            
00066             const BinningFunPoR& binning1_,  
00067             const BinningFunPoR& binning2_,  
00068             Option_t* option_ = 0            
00069            );
00071     virtual ~SetOfH ();
00072     
00074     TH1 *getHisto (unsigned int i                   
00075                    );
00076     
00077     
00078     // Functions from THProfile
00080     virtual void Divide(TF1* f1,              
00081                         Double_t c1 = 1       
00082                        );
00084     virtual void Divide(const TH1* h1         
00085                         );
00087 
00091     virtual void Divide(const TH1* h1,        
00092                         const TH1* h2,        
00093                         Double_t c1 = 1,      
00094                         Double_t c2 = 1,      
00095                         Option_t* option = 0  
00096                         );
00097              
00099     virtual void Divide(const SetOfH *soh  
00100                         );
00102     virtual void Divide(const SetOfH *soh1, 
00103                         const SetOfH *soh2, 
00104                         Double_t c1 = 1,             
00105                         Double_t c2 = 1,             
00106                         Option_t *option = 0         
00107                         );
00108                         
00109                         
00111 
00117     virtual void Divide(const SetOfH *soh1,          
00118                         const SetOfH *soh2,          
00119                         const SetOfH *soh3,          
00120                         Double_t c1 = 1,             
00121                         Double_t c2 = 1              
00122                         );
00123 
00125     virtual void Multiply(TF1 *f1,                   
00126                           Double_t c1 = 1            
00127                          );
00129     virtual void Multiply(const TH1 *h1              
00130                           );                         
00131 
00132 
00136     virtual void Multiply(const TH1 *h1,              
00137                           const TH1 *h2,              
00138                           Double_t c1 = 1,            
00139                           Double_t c2 = 1,            
00140                           Option_t* option = 0        
00141                           );
00142              
00144     virtual void Multiply(const SetOfH *soh       
00145                           );
00147     virtual void Multiply(const SetOfH *soh1,      
00148                           const SetOfH *soh2,      
00149                           Double_t c1 = 1,             
00150                           Double_t c2 = 1,             
00151                           Option_t *option = 0         
00152                           );
00153 
00154 
00156     virtual void Add (const SetOfH *soh,           
00157                       Double_t c1 = 1                  
00158                       );
00159     
00161     virtual const char *genBinTitle (IndexType i    
00162                                     ) const;
00164     virtual const char *genBinName (IndexType i     
00165                                    ) const;
00166     
00168     inline const char *getTitle () const;
00170     inline const char *getName () const;
00172     inline const char *getOption () const;
00174     inline const BinningFun *getBinning () const;
00176     inline       BinningFun *getBinning ();
00178     inline const BinningFun *getBinning (int i     
00179                                         ) const;
00181     inline       BinningFun *getBinning (int i     
00182                                         );
00184     virtual void initHisto (IndexType i    
00185                             ) = 0; 
00186    
00187        
00188   private:
00189     // Data members
00190     char *name;                       
00191     char *title;                      
00192     BinningFun *binning1;             
00193     BinningFun *binning2;             
00194     BinningFun *binning3;             
00195     char *option;                     
00196     
00197   protected:
00199     virtual void initHistos ();           
00200   private:
00202     void init (const char* name_,     
00203                const char* title_,    
00204                Option_t *option_      
00205                );
00207     SetOfH (const SetOfH& source);
00209     SetOfH& operator= (const SetOfH& source);
00210 };
00211 
00212 // Implementation of inline methods
00213 
00214 const char *SetOfH::getTitle () const {
00215   return title;
00216 }
00217 
00218 const char *SetOfH::getName () const {
00219   return name;
00220 }
00221 
00222 const char *SetOfH::getOption () const {
00223   return name;
00224 }
00225 
00226 const BinningFun *SetOfH::getBinning () const {
00227   return binning1;
00228 }
00229 
00230 BinningFun *SetOfH::getBinning () {
00231   return binning1;
00232 }
00233 
00234 const BinningFun *SetOfH::getBinning (int i) const {
00235   switch (i) {
00236     case 1: return binning1; break;
00237     case 2: return binning2; break;
00238     case 3: return binning3; break;
00239   }
00240   return 0;
00241 }
00242 
00243 BinningFun *SetOfH::getBinning (int i) {
00244   switch (i) {
00245     case 1: return binning1; break;
00246     case 2: return binning2; break;
00247     case 3: return binning3; break;
00248   }
00249   return 0;
00250 }
00251 
00252 #endif

Generated on Thu Oct 26 12:52:58 2006 for SFH by doxygen 1.3.2