966 std::map<std::string, TH1*> m_histo;
969 int nTriggers(0), nTriggers_c(0), nTriggers_gl(0), nModules_c(0), nModules_gl(0);
972 if (idSummary.second.accepted_o > 0)
974 if (idSummary.second.keepForGL())
976 if (idSummary.second.keepForC())
980 if (idSummary.second.keepForGL())
982 if (idSummary.second.keepForC())
987 nTriggers_gl =
std::max(1, nTriggers_gl);
988 nTriggers_c =
std::max(1, nTriggers_c);
989 nModules_c =
std::max(1, nModules_c);
990 nModules_gl =
std::max(1, nModules_gl);
994 m_histo.emplace(
name,
new TH1F(
name.c_str(),
";;Events accepted^{OLD}", nTriggers, 0, nTriggers));
995 name =
"trigger_gained";
996 m_histo.emplace(
name,
new TH1F(
name.c_str(),
";;Events gained", nTriggers_gl, 0, nTriggers_gl));
997 name =
"trigger_lost";
998 m_histo.emplace(
name,
new TH1F(
name.c_str(),
";;Events lost", nTriggers_gl, 0, nTriggers_gl));
999 name =
"trigger_changed";
1000 m_histo.emplace(
name,
new TH1F(
name.c_str(),
";;Events changed", nTriggers_c, 0, nTriggers_c));
1001 name =
"trigger_gained_frac";
1002 m_histo.emplace(
name,
new TH1F(
name.c_str(),
";;#frac{gained}{accepted}", nTriggers_gl, 0, nTriggers_gl));
1003 name =
"trigger_lost_frac";
1004 m_histo.emplace(
name,
new TH1F(
name.c_str(),
";;#frac{lost}{accepted}", nTriggers_gl, 0, nTriggers_gl));
1005 name =
"trigger_changed_frac";
1006 m_histo.emplace(
name,
new TH1F(
name.c_str(),
";;#frac{changed}{all - accepted}", nTriggers_c, 0, nTriggers_c));
1007 name =
"module_changed";
1008 m_histo.emplace(
name,
new TH1F(
name.c_str(),
";;Events changed", nModules_c, 0, nModules_c));
1009 name =
"module_gained";
1010 m_histo.emplace(
name,
new TH1F(
name.c_str(),
";;Events gained", nModules_gl, 0, nModules_gl));
1011 name =
"module_lost";
1012 m_histo.emplace(
name,
new TH1F(
name.c_str(),
";;Events lost", nModules_gl, 0, nModules_gl));
1015 size_t bin(0), bin_c(0), bin_gl(0);
1021 m_histo.at(
"trigger_accepted")->SetBinContent(
bin,
summary.accepted_o);
1023 m_histo.at(
"trigger_accepted")->GetXaxis()->SetBinLabel(
bin,
summary.name.c_str());
1028 m_histo.at(
"trigger_gained")->SetBinContent(bin_gl,
summary.gained().v);
1029 m_histo.at(
"trigger_lost")->SetBinContent(bin_gl, -
summary.lost().v);
1030 m_histo.at(
"trigger_gained_frac")->SetBinContent(bin_gl,
summary.gained(1).v);
1031 m_histo.at(
"trigger_lost_frac")->SetBinContent(bin_gl, -
summary.lost(1).v);
1033 m_histo.at(
"trigger_gained_frac")->SetBinError(bin_gl,
summary.gained(1).e);
1034 m_histo.at(
"trigger_lost_frac")->SetBinError(bin_gl, -
summary.lost(1).e);
1036 m_histo.at(
"trigger_gained")->GetXaxis()->SetBinLabel(bin_gl,
summary.name.c_str());
1037 m_histo.at(
"trigger_lost")->GetXaxis()->SetBinLabel(bin_gl,
summary.name.c_str());
1038 m_histo.at(
"trigger_gained_frac")->GetXaxis()->SetBinLabel(bin_gl,
summary.name.c_str());
1039 m_histo.at(
"trigger_lost_frac")->GetXaxis()->SetBinLabel(bin_gl,
summary.name.c_str());
1044 m_histo.at(
"trigger_changed")->SetBinContent(bin_c,
summary.changed().v);
1045 m_histo.at(
"trigger_changed_frac")->SetBinContent(bin_c,
summary.changed(1).v);
1047 m_histo.at(
"trigger_changed_frac")->SetBinError(bin_c,
summary.changed(1).e);
1049 m_histo.at(
"trigger_changed")->GetXaxis()->SetBinLabel(bin_c,
summary.name.c_str());
1050 m_histo.at(
"trigger_changed_frac")->GetXaxis()->SetBinLabel(bin_c,
summary.name.c_str());
1060 const GenericSummary&
summary = idSummary.second;
1064 m_histo.at(
"module_gained")->SetBinContent(bin_gl,
summary.gained().v);
1065 m_histo.at(
"module_lost")->SetBinContent(bin_gl, -
summary.lost().v);
1067 m_histo.at(
"module_gained")->GetXaxis()->SetBinLabel(bin_gl,
summary.name.c_str());
1068 m_histo.at(
"module_lost")->GetXaxis()->SetBinLabel(bin_gl,
summary.name.c_str());
1073 m_histo.at(
"module_changed")->SetBinContent(bin_c,
summary.changed().v);
1075 m_histo.at(
"module_changed")->GetXaxis()->SetBinLabel(bin_c,
summary.name.c_str());
1080 for (
const auto& nameHisto : m_histo) {
1082 TH1*
histo = nameHisto.second;
1083 if (
name.find(
"gained") != std::string::npos ||
name.find(
"changed") != std::string::npos) {
1084 if (
name.find(
"frac") != std::string::npos)
1085 histo->GetYaxis()->SetRangeUser(0.0, 1.0);
1087 if (
name.find(
"lost") != std::string::npos) {
1088 if (
name.find(
"frac") != std::string::npos)
1089 histo->GetYaxis()->SetRangeUser(-1.0, 0.0);
1094 char savePath[1000];
1095 sprintf(savePath,
"DQMData/Run %d/HLT/Run summary/EventByEvent/", this->
run);
1097 gDirectory->cd(savePath);
1098 gDirectory->Write();
1099 for (
const auto& nameHisto : m_histo)
1100 nameHisto.second->Write(nameHisto.first.c_str());