6 #include <boost/regex.hpp>
48 m_dqm_path( config.getUntrackedParameter<std::
string>(
"dqmPath" ) )
85 static const boost::regex running_n_processes(
".*/Running [0-9]+ processes");
87 std::vector<std::string> subdirs = dqm->
getSubdirs();
88 for (
auto const & subdir: subdirs) {
89 if (boost::regex_match(subdir, running_n_processes)) {
91 if (dqm->
get(subdir +
"/event"))
112 static const boost::regex
process_name(
".*/process .*");
114 std::vector<std::string> subdirs = dqm->
getSubdirs();
115 for (
auto const & subdir: subdirs) {
116 if (boost::regex_match(subdir, process_name)) {
124 if (dqm->
dirExists(current_path +
"/Paths"))
135 TProfile
const *
paths =
nullptr;
139 if (( me = dqm->
get(current_path +
"/paths_active_time") )) {
141 size = paths->GetXaxis()->GetNbins();
143 if (( me = dqm->
get(current_path +
"/paths_total_time") )) {
145 size = paths->GetXaxis()->GetNbins();
147 if (( me = dqm->
get(current_path +
"/paths_exclusive_time") )) {
149 size = paths->GetXaxis()->GetNbins();
152 if (paths ==
nullptr)
160 for (uint32_t
p = 1;
p <=
size; ++
p) {
163 MonitorElement * me_counter = dqm->
get( current_path +
"/Paths/" + label +
"_module_counter" );
164 MonitorElement * me_total = dqm->
get( current_path +
"/Paths/" + label +
"_module_total" );
165 if (me_counter == 0
or me_total == 0)
169 uint32_t bins = counter->GetXaxis()->GetNbins();
170 double min = counter->GetXaxis()->GetXmin();
171 double max = counter->GetXaxis()->GetXmax();
172 TH1F *
average = dqm->
book1D(label +
"_module_average", label +
" module average", bins, min, max)->
getTH1F();
173 average ->SetYTitle(
"processing time [ms]");
174 TH1F * running = dqm->
book1D(label +
"_module_running", label +
" module running", bins, min, max)->
getTH1F();
175 running ->SetYTitle(
"processing time [ms]");
176 TH1F *
efficiency = dqm->
book1D(label +
"_module_efficiency", label +
" module efficiency", bins, min, max)->
getTH1F();
177 efficiency->SetYTitle(
"filter efficiency");
178 efficiency->SetMaximum(1.05);
179 for (uint32_t
i = 1;
i <= bins; ++
i) {
180 const char *
module = counter->GetXaxis()->GetBinLabel(
i);
181 average ->GetXaxis()->SetBinLabel(
i, module);
182 running ->GetXaxis()->SetBinLabel(
i, module);
183 efficiency->GetXaxis()->SetBinLabel(
i, module);
184 double t = total ->GetBinContent(
i);
185 double n = counter->GetBinContent(
i);
186 double p = counter->GetBinContent(
i+1);
187 average ->SetBinContent(
i, t / events);
189 running ->SetBinContent(
i, t / n);
190 efficiency->SetBinContent(
i, p / n);
203 descriptions.
add(
"fastTimerServiceClient", desc);
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
std::vector< std::string > getSubdirs(void) const
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
#define DEFINE_FWK_MODULE(type)
void endLuminosityBlock(edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) override
const T & max(const T &a, const T &b)
~FastTimerServiceClient()
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
FastTimerServiceClient(edm::ParameterSet const &)
bool dirExists(const std::string &path) const
true if directory exists
void fillProcessSummaryPlots(std::string const &path)
void analyze(const edm::Event &event, const edm::EventSetup &setup) override
void endRun(edm::Run const &run, edm::EventSetup const &setup) override
TH1F * getTH1F(void) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
static std::atomic< unsigned int > counter
TProfile * getTProfile(void) const
void fillPathSummaryPlots(double events, std::string const &path)
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
tuple size
Write out results.
void setCurrentFolder(const std::string &fullpath)