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
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
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