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

MatrixOfH2F.C

Go to the documentation of this file.
00001 
00014 #include "jbltools/sfh/MatrixOfH2F.h"
00015 #include "jbltools/sfh/RegH2F.h"
00016 #include "jbltools/sfh/BinningFun.h"
00017 
00018 #include <TFile.h>
00019 #include <TF1.h>
00020 #include <TAxis.h>
00021 
00022 #include <iostream>
00023 #include <cmath>
00024 #include <cassert>
00025 
00026 static const char *ident="@(#)$Id: MatrixOfH2F.C,v 1.3 2005/07/08 15:01:34 blist Exp $";
00027 
00028 MatrixOfH2F::MatrixOfH2F (const char* name_, 
00029                           const char* title_, 
00030                           const ROListPoR& hhl, 
00031                           const BinningFunPoR& binning1_, 
00032                           const BinningFunPoR& binning2_) 
00033 : MatrixOfH (name_, title_, hhl, binning1_, binning2_, 0)
00034 {
00035   initHistos ();
00036 }  
00037 
00038 MatrixOfH2F::MatrixOfH2F (const char* name_,               
00039                           const char* title_,      
00040                           Int_t nbinsx,            
00041                           Axis_t xlow,             
00042                           Axis_t xup,              
00043                           Int_t nbinsy,            
00044                           Axis_t ylow,             
00045                           Axis_t yup,              
00046                           const ROListPoR& hhl,    
00047                           const BinningFunPoR& binning1_, 
00048                           const BinningFunPoR& binning2_) 
00049 : MatrixOfH (name_, title_, hhl, binning1_, binning2_, 0),
00050   xaxisbinning (nbinsx, xlow, xup), 
00051   yaxisbinning (nbinsy, ylow, yup)
00052 {
00053   initHistos ();
00054 }  
00055 
00056 MatrixOfH2F::MatrixOfH2F (const char* name_,               
00057                           const char* title_,            
00058                           Int_t nbinsx,                  
00059                           const Double_t* xbins,         
00060                           Int_t nbinsy,                  
00061                           Axis_t ylow,                   
00062                           Axis_t yup,                    
00063                           const ROListPoR& hhl,          
00064                           const BinningFunPoR& binning1_, 
00065                           const BinningFunPoR& binning2_) 
00066 : MatrixOfH (name_, title_, hhl, binning1_, binning2_, 0),
00067   xaxisbinning (nbinsx, xbins), 
00068   yaxisbinning (nbinsy, ylow, yup)
00069 {
00070   initHistos ();
00071 }  
00072 
00073 MatrixOfH2F::MatrixOfH2F (const char* name_,               
00074                           const char* title_,            
00075                           Int_t nbinsx,                  
00076                           Axis_t xlow,                   
00077                           Axis_t xup,                    
00078                           Int_t nbinsy,                  
00079                           const Double_t* ybins,         
00080                           const ROListPoR& hhl,          
00081                           const BinningFunPoR& binning1_, 
00082                           const BinningFunPoR& binning2_) 
00083 : MatrixOfH (name_, title_, hhl, binning1_, binning2_, 0),
00084   xaxisbinning (nbinsx, xlow, xup), 
00085   yaxisbinning (nbinsy, ybins)
00086 {
00087   initHistos ();
00088 }  
00089 
00090 MatrixOfH2F::MatrixOfH2F (const char* name_,               
00091                           const char* title_,              
00092                           Int_t nbinsx,                   
00093                           const Double_t* xbins,          
00094                           Int_t nbinsy,                   
00095                           const Double_t* ybins,          
00096                           const ROListPoR& hhl,           
00097                           const BinningFunPoR& binning1_, 
00098                           const BinningFunPoR& binning2_) 
00099 : MatrixOfH (name_, title_, hhl, binning1_, binning2_, 0),
00100   xaxisbinning (nbinsx, xbins), 
00101   yaxisbinning (nbinsy, ybins)
00102 {
00103   initHistos ();
00104 }  
00105 
00106 MatrixOfH2F::MatrixOfH2F (const char* name_,               
00107                           const char* title_,       
00108                           Int_t nbinsx,            
00109                           const Float_t* xbins,    
00110                           Int_t nbinsy,            
00111                           const Float_t* ybins,    
00112                           const ROListPoR& hhl,    
00113                           const BinningFunPoR& binning1_, 
00114                           const BinningFunPoR& binning2_) 
00115 : MatrixOfH (name_, title_, hhl, binning1_, binning2_, 0),
00116   xaxisbinning (nbinsx, xbins), 
00117   yaxisbinning (nbinsy, ybins)
00118 {
00119   initHistos ();
00120 }  
00121 
00122 MatrixOfH2F::MatrixOfH2F (const char* name_,               
00123                           const char* title_,          
00124                           const Binning& xbinning,     
00125                           const Binning& ybinning,     
00126                           const ROListPoR& hhl,        
00127                           const BinningFunPoR& binning1_, 
00128                           const BinningFunPoR& binning2_) 
00129 : MatrixOfH (name_, title_, hhl, binning1_, binning2_, 0),
00130   xaxisbinning (xbinning), 
00131   yaxisbinning (ybinning)
00132 {
00133   initHistos ();
00134 }  
00135 
00136 
00137 
00138 void MatrixOfH2F::initHisto (IndexType i, IndexType j) {
00139   const char *htitle = genBinTitle(i, j);
00140   const char *hname = genBinName(i, j);
00141   RegH2F *h = new RegH2F (hname, htitle, xaxisbinning, yaxisbinning);
00142   registerObject (getBinNumber(i, j), h);
00143   delete[] hname;
00144   delete[] htitle;
00145 }
00146 
00147 
00148 RegH2F *MatrixOfH2F::getHisto (IndexType i, IndexType j) {
00149   return dynamic_cast<RegH2F *>(getEntry(getBinNumber (i, j)));
00150 }
00151 
00152 
00153 MatrixOfH2F::~MatrixOfH2F () {
00154 }                    
00155 

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