140 {
141
142 dqm_core::Result*
result =
new dqm_core::Result();
143 result->status_ = dqm_core::Result::Undefined;
144
147
148 if (!
data.IsA()->InheritsFrom(
"TH1")) {
149 throw dqm_core::BadConfig(ERS_HERE, name, "does not inherit from TH1");
150 }
151 const TH1*
h =
static_cast<const TH1*
>(&
data);
152 if (
h->GetDimension() > 2) {
153 throw dqm_core::BadConfig(ERS_HERE, name, "dimension > 2 ");
154 }
155
156
157 int Npublished = 0;
164
165
166
167
168 if (
h->GetDimension() == 1) {
170
171
172 std::vector<bool> Mask;
174
175
176 double h_entries =
h->GetEntries();
178
179
181 double bincon =
h->GetBinContent(bin + 1);
182 double ebincon =
h->GetBinError(bin + 1);
183
184
185 if( Mask[bin] ) {
186 bool do_printbin = false;
192 ) do_printbin = true;
197 ) do_printbin = ! do_printbin;
198 if(do_printbin) {
199
200 Npublished++;
203 double binvalX =
h->GetXaxis()->GetBinCenter(bin + 1);
204 std::string binname = Form(
"%s_Bin(%u | %.*e)",
name.c_str(), bin, 2, binvalX);
205 std::string sigbinname = Form(
"%s_EBin(%u | %.*e)",
name.c_str(), bin, 2, binvalX);
206
207
208
209
211 result->tags_[binname.c_str()] = (bincon / h_entries);
212 if (Error ==1 )
result->tags_[sigbinname.c_str()] = ebincon ;
213 } else {
214 result->tags_[binname.c_str()] = bincon;
215 if (Error ==1 )
result->tags_[sigbinname.c_str()] = ebincon ;
216 }
217 }
218 }
219 }
220 }
221 }
222
223
224
225
226 if (
h->GetDimension() == 2) {
229
230
231 std::vector< std::vector<bool> > Mask;
233
234
235 double h_entries =
h->GetEntries();
237
238
241 double bincon =
h->GetBinContent(binX + 1, binY + 1);
242 double ebincon =
h->GetBinError(binX + 1, binY + 1);
243 if( !Mask[binX][binY] ) {
244 bool do_printbin = false;
250 ) do_printbin = true;
255 ) do_printbin = ! do_printbin;
256 if(do_printbin) {
257 Npublished++;
260 double binvalX =
h->GetXaxis()->GetBinCenter(binX + 1);
261 double binvalY =
h->GetYaxis()->GetBinCenter(binY + 1);
262 std::string binname = Form(
"%s_Bin((%u,%u) | %.*e,%.*e)",
name.c_str(), binX, binY, 2, binvalX, 2, binvalY);
263 std::string sigbinname = Form(
"%s_EBin((%u,%u) | %.*e,%.*e)",
name.c_str(), binX, binY, 2, binvalX, 2, binvalY);
265 result->tags_[binname.c_str()] = (bincon / h_entries);
266 result->tags_[sigbinname.c_str()] = ebincon;
267 } else {
268 }
269 result->tags_[binname.c_str()] = bincon;
270 result->tags_[sigbinname.c_str()] = ebincon;
271 }
272 }
273 }
274 }
275 }
276 }
277
278
281 std::string pub_excess = Form(
"%s_PROBLEM_Publishable_UnPrinted",
name.c_str());
283 }
284
286 }
char data[hepevt_bytes_allocation_ATLAS]
int UseMaskValue_GetFromMap(const std::map< std::string, double > ¶ms)
std::vector< bool > Mask1D_GetFromMap(const std::map< std::string, double > ¶ms)
int UseValue_GetFromMap(const std::map< std::string, double > ¶ms)
double Value_GetFromMap(const std::map< std::string, double > ¶ms)
double MaskValue_GetFromMap(const std::map< std::string, double > ¶ms)
int TypeValue_GetFromMap(const std::map< std::string, double > ¶ms)
std::vector< std::vector< bool > > Mask2D_GetFromMap(const std::map< std::string, double > ¶ms)
Error
The different types of error that can be flagged in the L1TopoRDO.