95 if ( tObject->IsA()->InheritsFrom(
"TH1" ) ) {
97 TH1 * histogram = (TH1*) tObject ;
102 hresiduals = hcompare.
Compare(histogram,
"/DQMData/"+TString(
algorithm_)+
"/"+TString(histogram->GetName()) );
106 monElement = dbe->book1D (
107 std::string( histogram->GetName() ),
108 std::string( histogram->GetTitle() ),
109 histogram->GetXaxis()->GetNbins(),
110 histogram->GetXaxis()->GetXmin(),
111 histogram->GetXaxis()->GetXmax()
114 monElement->
setAxisTitle( std::string ( histogram->GetXaxis()->GetTitle()) , 1);
115 monElement->
setAxisTitle( std::string ( histogram->GetYaxis()->GetTitle()) , 2);
118 for(Int_t
x=0;
x<histogram->GetXaxis()->GetNbins();
x++) {
124 monElementRes = dbe->book1D (
125 std::string( hresiduals->GetName() ),
126 std::string( hresiduals->GetTitle() ),
127 hresiduals->GetXaxis()->GetNbins(),
128 hresiduals->GetXaxis()->GetXmin(),
129 hresiduals->GetXaxis()->GetXmax()
133 for(Int_t
x=0;
x<hresiduals->GetXaxis()->GetNbins();
x++) {
135 monElementRes->
setBinError (
x, hresiduals->GetBinError(
x ) ) ;
139 else if ( tObject->IsA()->InheritsFrom(
"TH2" ) ) {
141 TH2 * histogram = (TH2*) tObject ;
143 monElement = dbe->book2D (
144 std::string( histogram->GetName() ),
145 std::string( histogram->GetTitle() ),
146 histogram->GetXaxis()->GetNbins(),
147 histogram->GetXaxis()->GetXmin(),
148 histogram->GetXaxis()->GetXmax(),
149 histogram->GetYaxis()->GetNbins(),
150 histogram->GetYaxis()->GetXmin(),
151 histogram->GetYaxis()->GetXmax()
154 monElement->
setAxisTitle( std::string ( histogram->GetXaxis()->GetTitle()) , 1);
155 monElement->
setAxisTitle( std::string ( histogram->GetYaxis()->GetTitle()) , 2);
157 for(Int_t
x=0;
x<histogram->GetXaxis()->GetNbins();
x++)
158 for(Int_t
y=0;
y<histogram->GetYaxis()->GetNbins();
y++) {
163 else if ( tObject->IsA()->InheritsFrom(
"TH3" ) ) {
165 TH3 * histogram = (TH3*) tObject ;
167 monElement = dbe->book3D (
168 std::string( histogram->GetName() ),
169 std::string( histogram->GetTitle() ),
170 histogram->GetXaxis()->GetNbins(),
171 histogram->GetXaxis()->GetXmin(),
172 histogram->GetXaxis()->GetXmax(),
173 histogram->GetYaxis()->GetNbins(),
174 histogram->GetYaxis()->GetXmin(),
175 histogram->GetYaxis()->GetXmax(),
176 histogram->GetZaxis()->GetNbins(),
177 histogram->GetZaxis()->GetXmin(),
178 histogram->GetZaxis()->GetXmax()
181 monElement->
setAxisTitle( std::string ( histogram->GetXaxis()->GetTitle()) , 1);
182 monElement->
setAxisTitle( std::string ( histogram->GetYaxis()->GetTitle()) , 2);
184 for(Int_t
x=0;
x<histogram->GetXaxis()->GetNbins();
x++)
185 for(Int_t
y=0;
y<histogram->GetYaxis()->GetNbins();
y++)
186 for(Int_t
z=0;
z<histogram->GetZaxis()->GetNbins();
z++) {
193 dbe->showDirStructure() ;
void setBinContent(int binx, double content)
set content of bin (1-D)
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
void SetReferenceFilename(TString filename)
std::string referenceFilename_
TH1 * Compare(TH1 *h, TString hname)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)