130 {
131
132 dqm_core::Result*
result =
new dqm_core::Result();
133 result->status_ = dqm_core::Result::Undefined;
134
137
138 if (!
data.IsA()->InheritsFrom(
"TH1")) {
139 throw dqm_core::BadConfig(ERS_HERE, name, "does not inherit from TH1");
140 }
141 const TH1*
h =
static_cast<const TH1*
>(&
data);
142 if (
h->GetDimension() > 2) {
143 throw dqm_core::BadConfig(ERS_HERE, name, "dimension > 2 ");
144 }
145
146
147 int Npublished = 0;
154
155
156
157
158 if (
h->GetDimension() == 1) {
160
161
162 std::vector<bool> Mask;
164
165
166 double h_entries =
h->GetEntries();
168
169
171 double bincon =
h->GetBinContent(bin + 1);
172 double ebincon =
h->GetBinError(bin + 1);
173
174
175 if( Mask[bin] ) {
176 bool do_printbin = false;
182 ) do_printbin = true;
187 ) do_printbin = ! do_printbin;
188 if(do_printbin) {
189
190 Npublished++;
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);
196
197
198
199
201 result->tags_[binname.c_str()] = (bincon / h_entries);
202 if (Error ==1 )
result->tags_[sigbinname.c_str()] = ebincon ;
203 } else {
204 result->tags_[binname.c_str()] = bincon;
205 if (Error ==1 )
result->tags_[sigbinname.c_str()] = ebincon ;
206 }
207 }
208 }
209 }
210 }
211 }
212
213
214
215
216 if (
h->GetDimension() == 2) {
219
220
221 std::vector< std::vector<bool> > Mask;
223
224
225 double h_entries =
h->GetEntries();
227
228
231 double bincon =
h->GetBinContent(binX + 1, binY + 1);
232 double ebincon =
h->GetBinError(binX + 1, binY + 1);
233 if( !Mask[binX][binY] ) {
234 bool do_printbin = false;
240 ) do_printbin = true;
245 ) do_printbin = ! do_printbin;
246 if(do_printbin) {
247 Npublished++;
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;
257 } else {
258 }
259 result->tags_[binname.c_str()] = bincon;
260 result->tags_[sigbinname.c_str()] = ebincon;
261 }
262 }
263 }
264 }
265 }
266 }
267
268
271 std::string pub_excess = Form(
"%s_PROBLEM_Publishable_UnPrinted",
name.c_str());
273 }
274
276 }
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.