6 #include <boost/regex.hpp>
46 m_dqm_path( config.getUntrackedParameter<std::
string>(
"dqmPath" ) )
73 static const boost::regex running_n_processes(
".*/Running [0-9]+ processes");
75 std::vector<std::string> subdirs = getter.
getSubdirs();
76 for (
auto const & subdir: subdirs) {
77 if (boost::regex_match(subdir, running_n_processes)) {
79 if (getter.
get(subdir +
"/event"))
100 std::vector<std::string> subdirs = getter.
getSubdirs();
101 for (
auto const & subdir: subdirs) {
102 if (boost::regex_match(subdir, process_name)) {
110 if (getter.
dirExists(current_path +
"/Paths"))
119 TProfile
const *
paths =
nullptr;
123 if (( me = getter.
get(current_path +
"/paths_active_time") )) {
125 size = paths->GetXaxis()->GetNbins();
127 if (( me = getter.
get(current_path +
"/paths_total_time") )) {
129 size = paths->GetXaxis()->GetNbins();
131 if (( me = getter.
get(current_path +
"/paths_exclusive_time") )) {
133 size = paths->GetXaxis()->GetNbins();
136 if (paths ==
nullptr)
144 for (uint32_t
p = 1;
p <=
size; ++
p) {
147 MonitorElement * me_counter = getter.
get( current_path +
"/Paths/" + label +
"_module_counter" );
148 MonitorElement * me_total = getter.
get( current_path +
"/Paths/" + label +
"_module_total" );
149 if (me_counter == 0
or me_total == 0)
153 uint32_t bins = counter->GetXaxis()->GetNbins() - 1;
154 double min = counter->GetXaxis()->GetXmin();
155 double max = counter->GetXaxis()->GetXmax() - 1;
163 me = getter.
get( current_path +
"/Paths/" + label +
"_module_average" );
171 average = booker.
book1D(label +
"_module_average", label +
" module average", bins, min, max)->
getTH1F();
172 average->SetYTitle(
"processing time [ms]");
173 for (uint32_t
i = 1;
i <= bins; ++
i) {
174 const char *
module = counter->GetXaxis()->GetBinLabel(
i);
175 average->GetXaxis()->SetBinLabel(
i, module);
179 me = getter.
get( current_path +
"/Paths/" + label +
"_module_running" );
187 running = booker.
book1D(label +
"_module_running", label +
" module running", bins, min, max)->
getTH1F();
188 running->SetYTitle(
"processing time [ms]");
189 for (uint32_t
i = 1;
i <= bins; ++
i) {
190 const char *
module = counter->GetXaxis()->GetBinLabel(
i);
191 running->GetXaxis()->SetBinLabel(
i, module);
195 me = getter.
get( current_path +
"/Paths/" + label +
"_module_efficiency" );
203 efficiency = booker.
book1D(label +
"_module_efficiency", label +
" module efficiency", bins, min, max)->
getTH1F();
204 efficiency->SetYTitle(
"filter efficiency");
205 efficiency->SetMaximum(1.05);
206 for (uint32_t
i = 1;
i <= bins; ++
i) {
207 const char *
module = counter->GetXaxis()->GetBinLabel(
i);
208 efficiency->GetXaxis()->SetBinLabel(
i, module);
212 for (uint32_t
i = 1;
i <= bins; ++
i) {
213 double t = total ->GetBinContent(
i);
214 double n = counter->GetBinContent(
i);
215 double p = counter->GetBinContent(
i+1);
216 average ->SetBinContent(
i, t / events);
218 running ->SetBinContent(
i, t / n);
219 efficiency->SetBinContent(
i, p / n);
232 descriptions.
add(
"fastTimerServiceClient", desc);
void dqmEndLuminosityBlock(DQMStore::IBooker &booker, DQMStore::IGetter &getter, edm::LuminosityBlock const &, edm::EventSetup const &) override
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
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
MonitorElement * get(const std::string &path)
#define DEFINE_FWK_MODULE(type)
void fillProcessSummaryPlots(DQMStore::IBooker &booker, DQMStore::IGetter &getter, std::string const &path)
void dqmEndJob(DQMStore::IBooker &booker, DQMStore::IGetter &getter) override
void fillPathSummaryPlots(DQMStore::IBooker &booker, DQMStore::IGetter &getter, double events, std::string const &path)
tuple path
else: Piece not in the list, fine.
MonitorElement * book1D(Args &&...args)
~FastTimerServiceClient()
FastTimerServiceClient(edm::ParameterSet const &)
void fillSummaryPlots(DQMStore::IBooker &booker, DQMStore::IGetter &getter)
bool dirExists(const std::string &path)
void setCurrentFolder(const std::string &fullpath)
TH1F * getTH1F(void) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::vector< std::string > getSubdirs(void)
static std::atomic< unsigned int > counter
TProfile * getTProfile(void) const
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
tuple size
Write out results.