10 edm::LogInfo(
"SiStripSummaryCreator") <<
" Creating SiStripSummaryCreator "
15 edm::LogInfo(
"SiStripSummaryCreator") <<
" Deleting SiStripSummaryCreator "
24 std::cout <<
"SiStripSummaryCreator::readConfiguration: Failed to read Summary configuration parameters!! ";
29 std::cout <<
"SiStripSummaryCreator::readConfiguration: Failed to read Summary configuration parameters!! ";
37 for (std::map<std::string, std::string>::const_iterator
isum = me_names.begin();
isum != me_names.end();
isum++) {
49 std::vector<std::string> subdirs = dqm_store.
getSubdirs();
51 for (std::vector<std::string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
52 if ((*it).find(
"module_") == std::string::npos)
59 for (std::vector<std::string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
72 std::map<std::string, MonitorElement*> MEMap;
73 std::vector<std::string> subdirs = dqm_store.
getSubdirs();
83 for (std::vector<std::string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
84 if ((*it).find(
"module_") == std::string::npos)
90 for (std::vector<MonitorElement*>::const_iterator im =
contents.begin(); im !=
contents.end(); im++) {
95 if (name_i.find(
name) == std::string::npos)
97 std::map<std::string, MonitorElement*>::iterator iPos = MEMap.find(
name);
100 if (iPos == MEMap.end()) {
102 MEMap.insert(std::pair<std::string, MonitorElement*>(
name,
me));
118 std::map<std::string, MonitorElement*> MEMap;
121 if ((
dir_name.find(
"SiStrip") == 0) || (
dir_name.find(
"Collector") == 0) || (
dir_name.find(
"MechanicalView") == 0) ||
124 std::vector<std::string> subdirs = dqm_store.
getSubdirs();
132 if (
isum->second ==
"sum" ||
isum->second ==
"sum")
133 summary_name =
"Summary_" +
isum->first;
135 summary_name =
"Summary_Mean" +
isum->first;
138 for (std::vector<std::string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
142 for (std::vector<MonitorElement*>::const_iterator im =
contents.begin(); im !=
contents.end(); im++) {
147 if (name_i.find((summary_name)) != std::string::npos) {
148 std::map<std::string, MonitorElement*>::iterator iPos = MEMap.find(
name);
150 if (iPos == MEMap.end()) {
151 if (htype ==
"sum" || htype ==
"Sum") {
156 MEMap.insert(std::pair<std::string, MonitorElement*>(
name,
me));
159 if (htype ==
"sum" || htype ==
"Sum") {
180 if (
dname.find(
"_") != std::string::npos)
182 if (htype ==
"sum" && htype ==
"Sum") {
183 sum_name =
"Summary" +
name +
"__" +
dname;
184 tag_name =
"Summary" +
name;
186 sum_name =
"Summary_Mean" +
name +
"__" +
dname;
187 tag_name =
"Summary_Mean" +
name;
191 for (std::vector<MonitorElement*>::const_iterator im =
contents.begin(); im !=
contents.end(); im++) {
196 if (me_name.find(sum_name) == 0) {
199 TH1* hist1 =
me->getTH1();
207 std::map<int, std::string>
tags;
210 std::vector<std::string> subdirs = dqm_store.
getSubdirs();
212 if (htype ==
"mean" || htype ==
"Mean") {
213 nBins = subdirs.size();
216 for (
auto const& subdir : subdirs) {
217 std::string subdir_name = subdir.substr(subdir.find_last_of(
"/") + 1);
219 tags.emplace(ibin, subdir_name);
221 }
else if (htype ==
"bin-by-bin" || htype ==
"Bin-by-Bin") {
222 for (
auto const& subdir : subdirs) {
223 dqm_store.
cd(subdir);
224 std::string subdir_name = subdir.substr(subdir.find_last_of(
"/") + 1);
226 for (
auto const* s_me : s_contents) {
230 if (s_me_name.find(
name) == 0 || s_me_name.find(tag_name) == 0) {
231 int ibin = s_me->getNbinsX();
233 tags.emplace(
nBins - ibin / 2, subdir_name);
240 }
else if (htype ==
"sum" || htype ==
"Sum") {
241 for (
auto const& subdir : subdirs) {
242 dqm_store.
cd(subdir);
245 for (
auto* s_me : s_contents) {
249 if (s_me_name.find(
name) == std::string::npos)
252 TH1F* hist1 = s_me->getTH1F();
254 nBins = s_me->getNbinsX();
256 sum_name, sum_name,
nBins, hist1->GetXaxis()->GetXmin(), hist1->GetXaxis()->GetXmax());
266 TH1F*
hist =
me->getTH1F();
268 if (
name.find(
"NoisyStrips") != std::string::npos)
269 hist->GetYaxis()->SetTitle(
"Noisy Strips (%)");
271 hist->GetYaxis()->SetTitle(
name.c_str());
276 hist->LabelsOption(
"uv");
285 TH1F* hist1 =
nullptr;
286 TH2F* hist2 =
nullptr;
288 hist1 =
me->getTH1F();
290 hist2 =
me->getTH2F();
294 if (htype ==
"mean" || htype ==
"Mean") {
295 if (hist2 &&
name.find(
"NoisyStrips") != std::string::npos) {
299 float binEntry = entries /
nbins;
300 for (
int k = 1;
k <
nbins + 1;
k++) {
303 if (noisy >= binEntry * 0.5 || dead >= binEntry * 0.5)
306 bad = bad * 100.0 /
nbins;
311 }
else if (htype ==
"bin-by-bin" || htype ==
"Bin-by-Bin") {
312 for (
int k = 1;
k <
nbins + 1;
k++) {
315 }
else if (htype ==
"sum" || htype ==
"Sum") {
317 for (
int k = 1;
k <
nbins + 1;
k++) {
319 me->setBinContent(
k,
val);