4 #include "TDirectory.h"
10 const bool oldAddDir = TH1::AddDirectoryStatus();
11 TH1::AddDirectory(
true);
15 string name(h->GetName());
16 h0 = (TH1*)gDirectory->Get((
name+
"_0").c_str());
17 h1 = (TH1*)gDirectory->Get((
name+
"_1").c_str());
18 h2 = (TH1*)gDirectory->Get((
name+
"_2").c_str());
19 h3 = (TH1*)gDirectory->Get((
name+
"_chi2").c_str());
20 TH1::AddDirectory(oldAddDir);
38 if (!(h1&&me))
throw cms::Exception(
"FitSlicesYTool") <<
"Pointer =0 : h1=" << h1 <<
" me=" << me;
39 if (h1->GetNbinsX()==me->getNbinsX()){
40 for (
int bin=0;
bin!=h1->GetNbinsX();
bin++){
44 throw cms::Exception(
"FitSlicesYTool") <<
"Different number of bins!";
48 if (!(h2&&me))
throw cms::Exception(
"FitSlicesYTool") <<
"Pointer =0 : h1=" << h1 <<
" me=" << me;
49 if (h2->GetNbinsX()==me->getNbinsX()){
50 for (
int bin=0;
bin!=h2->GetNbinsX();
bin++){
54 throw cms::Exception(
"FitSlicesYTool") <<
"Different number of bins!";
58 if (!(h1&&me))
throw cms::Exception(
"FitSlicesYTool") <<
"Pointer =0 : h1=" << h1 <<
" me=" << me;
59 if (h1->GetNbinsX()==me->getNbinsX()){
60 for (
int bin=0;
bin!=h1->GetNbinsX();
bin++){
62 me->setBinError(
bin+1,h1->GetBinError(
bin+1));
65 throw cms::Exception(
"FitSlicesYTool") <<
"Different number of bins!";
69 if (!(h2&&me))
throw cms::Exception(
"FitSlicesYTool") <<
"Pointer =0 : h1=" << h1 <<
" me=" << me;
70 if (h2->GetNbinsX()==me->getNbinsX()){
71 for (
int bin=0;
bin!=h2->GetNbinsX();
bin++){
73 me->setBinError(
bin+1,h2->GetBinError(
bin+1));
76 throw cms::Exception(
"FitSlicesYTool") <<
"Different number of bins!";
void setBinContent(int binx, double content)
set content of bin (1-D)
TH2F * getTH2F(void) const
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.