00001
00008 #ifndef __MATRIXOFH_H
00009 #define __MATRIXOFH_H
00010
00011 #include "jbltools/sfh/SetOfH.h"
00012
00013 #include "jbltools/sfh/BinningFunPoR.h"
00014 #include "jbltools/sfh/Binning.h"
00015
00016 #include <cassert>
00017
00018 class BinningFun;
00019 class TH1;
00020
00021
00022
00024
00051 class MatrixOfH: public SetOfH {
00052 public:
00054 MatrixOfH (const char* name_,
00055 const char* title_,
00056 const ROListPoR& rol,
00057 const BinningFunPoR& binning1_,
00058 const BinningFunPoR& binning2_,
00059 Option_t* option_ = 0
00060 );
00062 virtual ~MatrixOfH ();
00063
00066 TH1 *getHisto (IndexType i,
00067 IndexType j
00068 );
00069
00071 const char *genBinTitle (IndexType i,
00072 IndexType j
00073 ) const;
00075 const char *genBinName (IndexType i,
00076 IndexType j
00077 ) const;
00078
00080 virtual void initHisto (IndexType i
00081 );
00082
00084 virtual void initHisto (IndexType i,
00085 IndexType j
00086 ) = 0;
00087
00088 protected:
00090 virtual void initHistos ();
00092 inline IndexType getBinNumber (IndexType i,
00093 IndexType j
00094 ) const;
00095
00096 private:
00097
00098 IndexType nbins2;
00099
00101 MatrixOfH (const MatrixOfH& source
00102 );
00104 MatrixOfH& operator= (const MatrixOfH& source
00105 );
00106 };
00107
00108
00109
00110 MatrixOfH::IndexType MatrixOfH::getBinNumber (IndexType i, IndexType j) const {
00111 return i*nbins2 + j;
00112 }
00113
00114
00115 #endif