1 #ifndef ALIGNMENT_OFFLINEVALIDATION_JETHTANALYZER_SMARTSELECTIONMONITOR_H 2 #define ALIGNMENT_OFFLINEVALIDATION_JETHTANALYZER_SMARTSELECTIONMONITOR_H 11 #include <unordered_map> 25 typedef std::unordered_map<std::string, std::map<std::string, TH1*>*>
Monitor_t;
41 if (
map->find(
"all") ==
map->end())
44 TH1*
base = (*map)[
"all"];
45 TString allName =
base->GetName();
46 TString
name =
tag +
"_" + allName.Data();
51 h->SetDirectory(gROOT);
77 std::map<std::string, TH1*>*
map =
it->second;
78 bool neverFilled =
true;
80 for (std::map<std::string, TH1*>::iterator
h =
map->begin();
h !=
map->end();
h++) {
82 printf(
"histo = %30s %15s IS NULL",
it->first.c_str(),
h->first.c_str());
85 if (
h->second->GetEntries() > 0)
88 if (
h->first ==
"all") {
89 h->second->SetName(Form(
"%s_%s",
h->first.c_str(),
h->second->GetName()));
96 "SmartSelectionMonitor: histo = '%s' is empty for all categories, you may want to cleanup your project to " 97 "remove this histogram\n",
106 std::map<std::string, TH1*>*
map =
it->second;
107 for (std::map<std::string, TH1*>::iterator
h =
map->begin();
h !=
map->end();
h++) {
123 std::vector<std::string>
tags,
127 bool useBinWidth =
false);
131 std::vector<std::string>
tags,
134 bool useBinWidth =
false);
136 std::vector<std::string>
tags,
140 bool useBinWidth =
false);
TH1 * getHisto(std::string histo, std::string tag="all")
bool fillHisto(std::string name, std::string tag, double valx, double weight, bool useBinWidth=false)
bool hasTag(std::map< std::string, TH1 *> *map, std::string tag)
std::unordered_map< std::string, std::map< std::string, TH1 * > * > Monitor_t
void initMonitorForStep(std::string tag)
TH1 * addHistogram(TH1 *h, std::string tag)
~SmartSelectionMonitor()=default
bool fillProfile(std::string name, std::string tag, double valx, double valy, double weight)
Monitor_t & getAllMonitors()
bool hasBaseHisto(std::string histo)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
bool hasTag(std::string histo, std::string tag)