138 if (!
data.IsA()->InheritsFrom(
"TH1")) {
139 throw dqm_core::BadConfig(ERS_HERE,
name,
"does not inherit from TH1");
141 const TH1*
h =
static_cast<const TH1*
>(&
data);
142 if (
h->GetDimension() > 2) {
143 throw dqm_core::BadConfig(ERS_HERE,
name,
"dimension > 2 ");
158 if (
h->GetDimension() == 1) {
162 std::vector<bool> Mask;
166 double h_entries =
h->GetEntries();
171 double bincon =
h->GetBinContent(
bin + 1);
172 double ebincon =
h->GetBinError(
bin + 1);
176 bool do_printbin =
false;
182 ) do_printbin =
true;
187 ) do_printbin = ! do_printbin;
193 double binvalX =
h->GetXaxis()->GetBinCenter(
bin + 1);
194 std::string binname = Form(
"%s_Bin(%u | %.*e)",
name.c_str(),
bin, 2, binvalX);
195 std::string sigbinname = Form(
"%s_EBin(%u | %.*e)",
name.c_str(),
bin, 2, binvalX);
201 result->tags_[binname.c_str()] = (bincon / h_entries);
202 if (
Error ==1 )
result->tags_[sigbinname.c_str()] = ebincon ;
204 result->tags_[binname.c_str()] = bincon;
205 if (
Error ==1 )
result->tags_[sigbinname.c_str()] = ebincon ;
216 if (
h->GetDimension() == 2) {
221 std::vector< std::vector<bool> > Mask;
225 double h_entries =
h->GetEntries();
231 double bincon =
h->GetBinContent(
binX + 1,
binY + 1);
232 double ebincon =
h->GetBinError(
binX + 1,
binY + 1);
234 bool do_printbin =
false;
240 ) do_printbin =
true;
245 ) do_printbin = ! do_printbin;
250 double binvalX =
h->GetXaxis()->GetBinCenter(
binX + 1);
251 double binvalY =
h->GetYaxis()->GetBinCenter(
binY + 1);
252 std::string binname = Form(
"%s_Bin((%u,%u) | %.*e,%.*e)",
name.c_str(),
binX,
binY, 2, binvalX, 2, binvalY);
253 std::string sigbinname = Form(
"%s_EBin((%u,%u) | %.*e,%.*e)",
name.c_str(),
binX,
binY, 2, binvalX, 2, binvalY);
255 result->tags_[binname.c_str()] = (bincon / h_entries);
256 result->tags_[sigbinname.c_str()] = ebincon;
259 result->tags_[binname.c_str()] = bincon;
260 result->tags_[sigbinname.c_str()] = ebincon;
271 std::string pub_excess = Form(
"%s_PROBLEM_Publishable_UnPrinted",
name.c_str());