945 std::map<std::string, TH1*> m_histo;
948 int nTriggers(0), nTriggers_c(0), nTriggers_gl(0), nModules_c(0), nModules_gl(0);
951 if (idSummary.second.accepted_o > 0)
953 if (idSummary.second.keepForGL())
955 if (idSummary.second.keepForC())
959 if (idSummary.second.keepForGL())
961 if (idSummary.second.keepForC())
966 nTriggers_gl =
std::max(1, nTriggers_gl);
967 nTriggers_c =
std::max(1, nTriggers_c);
968 nModules_c =
std::max(1, nModules_c);
969 nModules_gl =
std::max(1, nModules_gl);
973 m_histo.emplace(
name,
new TH1F(
name.c_str(),
";;Events accepted^{OLD}", nTriggers, 0, nTriggers));
974 name =
"trigger_gained";
975 m_histo.emplace(
name,
new TH1F(
name.c_str(),
";;Events gained", nTriggers_gl, 0, nTriggers_gl));
976 name =
"trigger_lost";
977 m_histo.emplace(
name,
new TH1F(
name.c_str(),
";;Events lost", nTriggers_gl, 0, nTriggers_gl));
978 name =
"trigger_changed";
979 m_histo.emplace(
name,
new TH1F(
name.c_str(),
";;Events changed", nTriggers_c, 0, nTriggers_c));
980 name =
"trigger_gained_frac";
981 m_histo.emplace(
name,
new TH1F(
name.c_str(),
";;#frac{gained}{accepted}", nTriggers_gl, 0, nTriggers_gl));
982 name =
"trigger_lost_frac";
983 m_histo.emplace(
name,
new TH1F(
name.c_str(),
";;#frac{lost}{accepted}", nTriggers_gl, 0, nTriggers_gl));
984 name =
"trigger_changed_frac";
985 m_histo.emplace(
name,
new TH1F(
name.c_str(),
";;#frac{changed}{all - accepted}", nTriggers_c, 0, nTriggers_c));
986 name =
"module_changed";
987 m_histo.emplace(
name,
new TH1F(
name.c_str(),
";;Events changed", nModules_c, 0, nModules_c));
988 name =
"module_gained";
989 m_histo.emplace(
name,
new TH1F(
name.c_str(),
";;Events gained", nModules_gl, 0, nModules_gl));
990 name =
"module_lost";
991 m_histo.emplace(
name,
new TH1F(
name.c_str(),
";;Events lost", nModules_gl, 0, nModules_gl));
994 size_t bin(0), bin_c(0), bin_gl(0);
1000 m_histo.at(
"trigger_accepted")->SetBinContent(
bin,
summary.accepted_o);
1002 m_histo.at(
"trigger_accepted")->GetXaxis()->SetBinLabel(
bin,
summary.name.c_str());
1007 m_histo.at(
"trigger_gained")->SetBinContent(bin_gl,
summary.gained().v);
1008 m_histo.at(
"trigger_lost")->SetBinContent(bin_gl, -
summary.lost().v);
1009 m_histo.at(
"trigger_gained_frac")->SetBinContent(bin_gl,
summary.gained(1).v);
1010 m_histo.at(
"trigger_lost_frac")->SetBinContent(bin_gl, -
summary.lost(1).v);
1012 m_histo.at(
"trigger_gained_frac")->SetBinError(bin_gl,
summary.gained(1).e);
1013 m_histo.at(
"trigger_lost_frac")->SetBinError(bin_gl, -
summary.lost(1).e);
1015 m_histo.at(
"trigger_gained")->GetXaxis()->SetBinLabel(bin_gl,
summary.name.c_str());
1016 m_histo.at(
"trigger_lost")->GetXaxis()->SetBinLabel(bin_gl,
summary.name.c_str());
1017 m_histo.at(
"trigger_gained_frac")->GetXaxis()->SetBinLabel(bin_gl,
summary.name.c_str());
1018 m_histo.at(
"trigger_lost_frac")->GetXaxis()->SetBinLabel(bin_gl,
summary.name.c_str());
1023 m_histo.at(
"trigger_changed")->SetBinContent(bin_c,
summary.changed().v);
1024 m_histo.at(
"trigger_changed_frac")->SetBinContent(bin_c,
summary.changed(1).v);
1026 m_histo.at(
"trigger_changed_frac")->SetBinError(bin_c,
summary.changed(1).e);
1028 m_histo.at(
"trigger_changed")->GetXaxis()->SetBinLabel(bin_c,
summary.name.c_str());
1029 m_histo.at(
"trigger_changed_frac")->GetXaxis()->SetBinLabel(bin_c,
summary.name.c_str());
1039 const GenericSummary&
summary = idSummary.second;
1043 m_histo.at(
"module_gained")->SetBinContent(bin_gl,
summary.gained().v);
1044 m_histo.at(
"module_lost")->SetBinContent(bin_gl, -
summary.lost().v);
1046 m_histo.at(
"module_gained")->GetXaxis()->SetBinLabel(bin_gl,
summary.name.c_str());
1047 m_histo.at(
"module_lost")->GetXaxis()->SetBinLabel(bin_gl,
summary.name.c_str());
1052 m_histo.at(
"module_changed")->SetBinContent(bin_c,
summary.changed().v);
1054 m_histo.at(
"module_changed")->GetXaxis()->SetBinLabel(bin_c,
summary.name.c_str());
1059 for (
const auto& nameHisto : m_histo) {
1061 TH1*
histo = nameHisto.second;
1062 if (
name.find(
"gained") != std::string::npos ||
name.find(
"changed") != std::string::npos) {
1063 if (
name.find(
"frac") != std::string::npos)
1064 histo->GetYaxis()->SetRangeUser(0.0, 1.0);
1066 if (
name.find(
"lost") != std::string::npos) {
1067 if (
name.find(
"frac") != std::string::npos)
1068 histo->GetYaxis()->SetRangeUser(-1.0, 0.0);
1076 char savePath[1000];
1077 sprintf(savePath,
"DQMData/Run %d/HLT/Run summary/EventByEvent/", this->
run);
1079 gDirectory->cd(savePath);
1080 gDirectory->Write();
1081 for (
const auto& nameHisto : m_histo)
1082 nameHisto.second->Write(nameHisto.first.c_str());