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

MatrixOfHProf.C

Go to the documentation of this file.
00001 
00015 #include "jbltools/sfh/MatrixOfHProf.h"
00016 #include "jbltools/sfh/RegHProf.h"
00017 #include "jbltools/sfh/BinningFun.h"
00018 
00019 #include <TFile.h>
00020 #include <TAxis.h>
00021 
00022 #include <iostream>
00023 #include <cassert>
00024 
00025 using std::endl;
00026 using std::cout;
00027 using std::cerr;
00028 
00029 static const char *ident="@(#)$Id: MatrixOfHProf.C,v 1.3 2005/07/08 15:01:34 blist Exp $";
00030 
00031 MatrixOfHProf::MatrixOfHProf (const char* name_,  
00032                               const char* title_, 
00033                               const ROListPoR& rol, 
00034                               const BinningFunPoR& binning1_, 
00035                               const BinningFunPoR& binning2_) 
00036 : MatrixOfH (name_, title_, rol, binning1_, binning2_)
00037 {
00038 }  
00039 
00040 MatrixOfHProf::MatrixOfHProf (const char* name_,  
00041                               const char* title_, 
00042                               Int_t nbinsx,  
00043                               Axis_t xlow,  
00044                               Axis_t xup,  
00045                               Option_t *option_,             
00046                               const ROListPoR& rol, 
00047                               const BinningFunPoR& binning1_, 
00048                               const BinningFunPoR& binning2_) 
00049 : MatrixOfH (name_, title_, rol, binning1_, binning2_, option_),
00050   axisbinning (nbinsx, xlow, xup),
00051   ylow (0),
00052   yup (0) 
00053 {
00054   initHistos ();
00055 }  
00056 
00057 MatrixOfHProf::MatrixOfHProf (const char* name_,  
00058                               const char* title_, 
00059                               Int_t nbinsx,  
00060                               Axis_t xlow,  
00061                               Axis_t xup,  
00062                               Axis_t ylow_,
00063                               Axis_t yup_, 
00064                               Option_t *option_,             
00065                               const ROListPoR& rol, 
00066                               const BinningFunPoR& binning1_, 
00067                               const BinningFunPoR& binning2_) 
00068 : MatrixOfH (name_, title_, rol, binning1_, binning2_, option_),
00069   axisbinning (nbinsx, xlow, xup),
00070   ylow (ylow_),
00071   yup (yup_) 
00072 {
00073   initHistos ();
00074 }  
00075 
00076 MatrixOfHProf::MatrixOfHProf (const char* name_,  
00077                               const char* title_, 
00078                               Int_t nbinsx,  
00079                               const Double_t *xbins,  
00080                               Option_t *option_,             
00081                               const ROListPoR& rol, 
00082                               const BinningFunPoR& binning1_, 
00083                               const BinningFunPoR& binning2_) 
00084 : MatrixOfH (name_, title_, rol, binning1_, binning2_, option_),
00085   axisbinning (nbinsx, xbins),
00086   ylow (0),
00087   yup (0)  
00088 {
00089   initHistos ();
00090 }  
00091 
00092 MatrixOfHProf::MatrixOfHProf (const char* name_,  
00093                               const char* title_, 
00094                               Int_t nbinsx,  
00095                               const Double_t *xbins,  
00096                               Axis_t ylow_,
00097                               Axis_t yup_, 
00098                               Option_t *option_,             
00099                               const ROListPoR& rol, 
00100                               const BinningFunPoR& binning1_, 
00101                               const BinningFunPoR& binning2_) 
00102 : MatrixOfH (name_, title_, rol, binning1_, binning2_, option_),
00103   axisbinning (nbinsx, xbins),
00104   ylow (ylow_),
00105   yup (yup_)
00106 {
00107   initHistos ();
00108 }  
00109 
00110 MatrixOfHProf::MatrixOfHProf (const char* name_,  
00111                               const char* title_, 
00112                               Int_t nbinsx,  
00113                               const Float_t *xbins,  
00114                               Option_t *option_,             
00115                               const ROListPoR& rol, 
00116                               const BinningFunPoR& binning1_, 
00117                               const BinningFunPoR& binning2_) 
00118 : MatrixOfH (name_, title_, rol, binning1_, binning2_, option_),
00119   axisbinning (nbinsx, xbins),
00120   ylow (0),
00121   yup (0) 
00122 {
00123   initHistos ();
00124 }  
00125 
00126 MatrixOfHProf::MatrixOfHProf (const char* name_,  
00127                               const char* title_, 
00128                               Int_t nbinsx,  
00129                               const Float_t *xbins,  
00130                               Axis_t ylow_,
00131                               Axis_t yup_, 
00132                               Option_t *option_,             
00133                               const ROListPoR& rol, 
00134                               const BinningFunPoR& binning1_, 
00135                               const BinningFunPoR& binning2_) 
00136 : MatrixOfH (name_, title_, rol, binning1_, binning2_, option_),
00137   axisbinning (nbinsx, xbins),
00138   ylow (ylow_),
00139   yup (yup_)
00140 {
00141   initHistos ();
00142 }  
00143 
00144 MatrixOfHProf::MatrixOfHProf (const char* name_,  
00145                               const char* title_, 
00146                               const Binning& axisbinning_,  
00147                               Option_t *option_,             
00148                               const ROListPoR& rol, 
00149                               const BinningFunPoR& binning1_, 
00150                               const BinningFunPoR& binning2_) 
00151 : MatrixOfH (name_, title_, rol, binning1_, binning2_, option_),
00152   axisbinning (axisbinning_),
00153   ylow (0),
00154   yup (0) 
00155 {
00156   initHistos ();
00157 }  
00158 
00159 MatrixOfHProf::MatrixOfHProf (const char* name_,  
00160                               const char* title_, 
00161                               const Binning& axisbinning_,  
00162                               Axis_t ylow_,
00163                               Axis_t yup_, 
00164                               Option_t *option_,             
00165                               const ROListPoR& rol, 
00166                               const BinningFunPoR& binning1_, 
00167                               const BinningFunPoR& binning2_) 
00168 : MatrixOfH (name_, title_, rol, binning1_, binning2_, option_),
00169   axisbinning (axisbinning_),
00170   ylow (ylow_),
00171   yup (yup_)
00172 {
00173   initHistos ();
00174 }  
00175 
00176 // MatrixOfHProf::MatrixOfHProf (const char* name_, 
00177 //                               const char* title_, 
00178 //                               TFile& file, 
00179 //                               Option_t *option_,             
00180 //                               const ROListPoR& rol,
00181 //                               const BinningFunPoR& binning1_, 
00182 //                               const BinningFunPoR& binning2_)
00183 // : MatrixOfH (name_, title_, rol, binning1_, binning2_,option_)
00184 // {
00185 //   const BinningFun *binning1 = getBinning(1);
00186 //   const BinningFun *binning2 = getBinning(2);
00187 //   assert (binning1);
00188 //   assert (binning2);
00189 //   IndexType nbins1 = binning1->getNBins();
00190 //   IndexType nbins2 = binning2->getNBins();
00191 //   for (IndexType i = 0; i < nbins1; i++) {
00192 //     for (IndexType j = 0; j < nbins2; j++) {
00193 //       const char *hname = genBinName(i, j);
00194 //       new RegHProf (hname, file, *this);
00195 //       delete[] hname;
00196 //     }
00197 //   }
00198 //   cout << "MatrixOfHProf::MatrixOfHProf: name=" << getName()
00199 //        << ", title=" << getTitle() 
00200 //        << "\nnbins1=" << nbins1 << ", nbins2=" << nbins2 
00201 //        << ", entries=" << getEntries() 
00202 //        << "\n read from file " << file.GetName() << endl;
00203 //   
00204 //   if (rol.prol) rol.prol->registerObject (this);
00205 // }  
00206 
00207 
00208 void MatrixOfHProf::initHisto (IndexType i, IndexType j) {
00209   const char *htitle = genBinTitle(i, j);
00210   const char *hname = genBinName(i, j);
00211   RegHProf *h = new RegHProf (hname, htitle, axisbinning, ylow, yup, getOption());
00212   registerObject (getBinNumber(i, j), h);
00213   delete[] hname;
00214   delete[] htitle;
00215 }
00216 
00217 
00218 MatrixOfHProf::~MatrixOfHProf () {
00219 }                    
00220 
00221   
00222 RegHProf *MatrixOfHProf::getHisto (IndexType i, IndexType j) {
00223   return dynamic_cast<RegHProf *>(getEntry(getBinNumber (i, j)));
00224 }
00225   
00226   

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