CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
FastTimerServiceClient Class Reference
Inheritance diagram for FastTimerServiceClient:
DQMEDHarvester edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 FastTimerServiceClient (edm::ParameterSet const &)
 
 ~FastTimerServiceClient () override
 
- Public Member Functions inherited from DQMEDHarvester
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
void beginJob () override
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &) override
 
virtual void dqmAnalyze (DQMStore::IBooker &, DQMStore::IGetter &, edm::Event const &, edm::EventSetup const &)
 
 DQMEDHarvester ()
 
 DQMEDHarvester (edm::ParameterSet const &iConfig)
 
virtual void dqmEndRun (DQMStore::IBooker &, DQMStore::IGetter &, edm::Run const &, edm::EventSetup const &)
 
void endJob () final
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &es) final
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &es) final
 
 ~DQMEDHarvester () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
static void fillLumiMePSetDescription (edm::ParameterSetDescription &pset)
 
static void fillPUMePSetDescription (edm::ParameterSetDescription &pset)
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

void dqmEndJob (DQMStore::IBooker &booker, DQMStore::IGetter &getter) override
 
void dqmEndLuminosityBlock (DQMStore::IBooker &booker, DQMStore::IGetter &getter, edm::LuminosityBlock const &, edm::EventSetup const &) override
 
void fillPathSummaryPlots (DQMStore::IBooker &booker, DQMStore::IGetter &getter, double events, std::string const &path)
 
void fillPlotsVsLumi (DQMStore::IBooker &booker, DQMStore::IGetter &getter, std::string const &current_path, std::string const &suffix, MEPSet pset)
 
void fillProcessSummaryPlots (DQMStore::IBooker &booker, DQMStore::IGetter &getter, std::string const &path)
 
void fillSummaryPlots (DQMStore::IBooker &booker, DQMStore::IGetter &getter)
 

Static Private Member Functions

static MEPSet getHistoPSet (const edm::ParameterSet &pset)
 

Private Attributes

bool doPlotsVsPixelLumi_
 
bool doPlotsVsPU_
 
bool doPlotsVsScalLumi_
 
std::string m_dqm_path
 
MEPSet pixelLumiMEPSet_
 
MEPSet puMEPSet_
 
MEPSet scalLumiMEPSet_
 

Additional Inherited Members

- Public Types inherited from DQMEDHarvester
typedef dqm::harvesting::DQMStore DQMStore
 
typedef dqm::harvesting::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
- Protected Attributes inherited from DQMEDHarvester
DQMStoredqmstore_
 
edm::GetterOfProducts< DQMTokenlumimegetter_
 
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::GetterOfProducts< DQMTokenrunmegetter_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 33 of file FastTimerServiceClient.cc.

Constructor & Destructor Documentation

◆ FastTimerServiceClient()

FastTimerServiceClient::FastTimerServiceClient ( edm::ParameterSet const &  config)
explicit

Definition at line 74 of file FastTimerServiceClient.cc.

75  : m_dqm_path(config.getUntrackedParameter<std::string>("dqmPath")),
76  doPlotsVsScalLumi_(config.getParameter<bool>("doPlotsVsScalLumi")),
77  doPlotsVsPixelLumi_(config.getParameter<bool>("doPlotsVsPixelLumi")),
78  doPlotsVsPU_(config.getParameter<bool>("doPlotsVsPU")),
80  : MEPSet{}),
82  : MEPSet{}),
83  puMEPSet_(doPlotsVsPU_ ? getHistoPSet(config.getParameter<edm::ParameterSet>("puME")) : MEPSet{}) {}

◆ ~FastTimerServiceClient()

FastTimerServiceClient::~FastTimerServiceClient ( )
overridedefault

Member Function Documentation

◆ dqmEndJob()

void FastTimerServiceClient::dqmEndJob ( DQMStore::IBooker booker,
DQMStore::IGetter getter 
)
overrideprivatevirtual

Implements DQMEDHarvester.

Definition at line 87 of file FastTimerServiceClient.cc.

87  {
88  fillSummaryPlots(booker, getter);
89 }

References fillSummaryPlots().

◆ dqmEndLuminosityBlock()

void FastTimerServiceClient::dqmEndLuminosityBlock ( DQMStore::IBooker booker,
DQMStore::IGetter getter,
edm::LuminosityBlock const &  lumi,
edm::EventSetup const &  setup 
)
overrideprivatevirtual

Reimplemented from DQMEDHarvester.

Definition at line 91 of file FastTimerServiceClient.cc.

94  {
95  fillSummaryPlots(booker, getter);
96 }

References fillSummaryPlots().

◆ fillDescriptions()

void FastTimerServiceClient::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 471 of file FastTimerServiceClient.cc.

471  {
472  // The following says we do not know what parameters are allowed so do no validation
473  // Please change this to state exactly what you do use, even if it is no parameters
475  desc.addUntracked<std::string>("dqmPath", "HLT/TimerService");
476  desc.add<bool>("doPlotsVsScalLumi", true);
477  desc.add<bool>("doPlotsVsPixelLumi", false);
478  desc.add<bool>("doPlotsVsPU", true);
479 
480  edm::ParameterSetDescription scalLumiMEPSet;
481  fillLumiMePSetDescription(scalLumiMEPSet);
482  desc.add<edm::ParameterSetDescription>("scalLumiME", scalLumiMEPSet);
483 
484  edm::ParameterSetDescription pixelLumiMEPSet;
485  fillLumiMePSetDescription(pixelLumiMEPSet);
486  desc.add<edm::ParameterSetDescription>("pixelLumiME", pixelLumiMEPSet);
487 
489  fillPUMePSetDescription(puMEPSet);
490  desc.add<edm::ParameterSetDescription>("puME", puMEPSet);
491 
492  descriptions.add("fastTimerServiceClient", desc);
493 }

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addUntracked(), fillLumiMePSetDescription(), fillPUMePSetDescription(), and AlCaHLTBitMon_QueryRunRegistry::string.

◆ fillLumiMePSetDescription()

void FastTimerServiceClient::fillLumiMePSetDescription ( edm::ParameterSetDescription pset)
static

Definition at line 445 of file FastTimerServiceClient.cc.

445  {
446  pset.add<std::string>("folder", "HLT/LumiMonitoring");
447  pset.add<std::string>("name", "lumiVsLS");
448  pset.add<int>("nbins", 440);
449  pset.add<double>("xmin", 0.);
450  pset.add<double>("xmax", 22000.);
451 }

References muonDTDigis_cfi::pset, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by fillDescriptions().

◆ fillPathSummaryPlots()

void FastTimerServiceClient::fillPathSummaryPlots ( DQMStore::IBooker booker,
DQMStore::IGetter getter,
double  events,
std::string const &  path 
)
private

Definition at line 163 of file FastTimerServiceClient.cc.

166  {
167  // note: the following checks need to be kept separate, as any of these histograms might be missing
168 
169  booker.setCurrentFolder(current_path);
170  std::vector<std::string> subsubdirs = getter.getSubdirs();
171  size_t npaths = subsubdirs.size();
172 
173  MonitorElement* paths_time =
174  booker.book1D("paths_time_real", "Total (real) time spent in each path", npaths, -0.5, double(npaths) - 0.5);
175  MonitorElement* paths_thread =
176  booker.book1D("paths_time_thread", "Total (thread) time spent in each path", npaths, -0.5, double(npaths) - 0.5);
177  MonitorElement* paths_allocated =
178  booker.book1D("paths_allocated", "Total allocated memory in each path", npaths, -0.5, double(npaths) - 0.5);
179  MonitorElement* paths_deallocated =
180  booker.book1D("paths_deallocated", "Total deallocated in each path", npaths, -0.5, double(npaths) - 0.5);
181 
183  double mean = -1.;
184 
185  // extract the list of Paths and EndPaths from the summary plots
186  int ibin = 1;
187  for (auto const& subsubdir : subsubdirs) {
188  std::string test = "/path ";
189  if (subsubdir.find(test) == std::string::npos)
190  continue;
191 
192  static const boost::regex prefix(current_path + "/path ");
193  std::string path = boost::regex_replace(subsubdir, prefix, "");
194 
195  paths_time->setBinLabel(ibin, path);
196  paths_thread->setBinLabel(ibin, path);
197  paths_allocated->setBinLabel(ibin, path);
198  paths_deallocated->setBinLabel(ibin, path);
199 
200  if ((me = getter.get(subsubdir + "/path time_real"))) {
201  mean = me->getMean();
202  paths_time->setBinContent(ibin, mean);
203  }
204  if ((me = getter.get(subsubdir + "/path time_thread"))) {
205  mean = me->getMean();
206  paths_thread->setBinContent(ibin, mean);
207  }
208  if ((me = getter.get(subsubdir + "/path allocated"))) {
209  mean = me->getMean();
210  paths_allocated->setBinContent(ibin, mean);
211  }
212 
213  if ((me = getter.get(subsubdir + "/path deallocated"))) {
214  mean = me->getMean();
215  paths_deallocated->setBinContent(ibin, mean);
216  }
217 
218  ibin++;
219  }
220 
221  for (auto const& subsubdir : subsubdirs) {
222  // for each path, fill histograms with
223  // - the average time spent in each module (total time spent in that module, averaged over all events)
224  // - the running time spent in each module (total time spent in that module, averaged over the events where that module actually ran)
225  // - the "efficiency" of each module (number of time a module succeded divided by the number of times the has run)
226 
227  getter.setCurrentFolder(subsubdir);
228  std::vector<std::string> allmenames = getter.getMEs();
229  if (allmenames.empty())
230  continue;
231 
232  MonitorElement* me_counter = getter.get(subsubdir + "/module_counter");
233  MonitorElement* me_real_total = getter.get(subsubdir + "/module_time_real_total");
234  MonitorElement* me_thread_total = getter.get(subsubdir + "/module_time_thread_total");
235 
236  if (me_counter == nullptr or me_real_total == nullptr)
237  continue;
238 
239  TH1D* counter = me_counter->getTH1D();
240  TH1D* real_total = me_real_total->getTH1D();
241  TH1D* thread_total = me_thread_total->getTH1D();
242  uint32_t bins = counter->GetXaxis()->GetNbins() - 1;
243  double min = counter->GetXaxis()->GetXmin();
244  double max = counter->GetXaxis()->GetXmax() - 1;
245 
246  TH1F* real_average;
247  TH1F* real_running;
248  TH1F* thread_average;
249  TH1F* thread_running;
250  TH1F* efficiency;
252 
253  booker.setCurrentFolder(subsubdir);
254  me = getter.get("module_time_real_average");
255  if (me) {
256  real_average = me->getTH1F();
257  assert(me->getTH1F()->GetXaxis()->GetXmin() == min);
258  assert(me->getTH1F()->GetXaxis()->GetXmax() == max);
259  real_average->Reset();
260  } else {
261  real_average = booker.book1D("module_time_real_average", "module real average timing", bins, min, max)->getTH1F();
262  real_average->SetYTitle("average processing (real) time [ms]");
263  for (uint32_t i = 1; i <= bins; ++i) {
264  const char* module = counter->GetXaxis()->GetBinLabel(i);
265  real_average->GetXaxis()->SetBinLabel(i, module);
266  }
267  }
268 
269  me = getter.get("module_time_thread_average");
270  if (me) {
271  thread_average = me->getTH1F();
272  assert(me->getTH1F()->GetXaxis()->GetXmin() == min);
273  assert(me->getTH1F()->GetXaxis()->GetXmax() == max);
274  thread_average->Reset();
275  } else {
276  thread_average =
277  booker.book1D("module_time_thread_average", "module thread average timing", bins, min, max)->getTH1F();
278  thread_average->SetYTitle("average processing (thread) time [ms]");
279  for (uint32_t i = 1; i <= bins; ++i) {
280  const char* module = counter->GetXaxis()->GetBinLabel(i);
281  thread_average->GetXaxis()->SetBinLabel(i, module);
282  }
283  }
284 
285  me = getter.get("module_time_real_running");
286  if (me) {
287  real_running = me->getTH1F();
288  assert(me->getTH1F()->GetXaxis()->GetXmin() == min);
289  assert(me->getTH1F()->GetXaxis()->GetXmax() == max);
290  real_running->Reset();
291  } else {
292  real_running = booker.book1D("module_time_real_running", "module real running timing", bins, min, max)->getTH1F();
293  real_running->SetYTitle("running processing (real) time [ms]");
294  for (uint32_t i = 1; i <= bins; ++i) {
295  const char* module = counter->GetXaxis()->GetBinLabel(i);
296  real_running->GetXaxis()->SetBinLabel(i, module);
297  }
298  }
299 
300  me = getter.get("module_time_thread_running");
301  if (me) {
302  thread_running = me->getTH1F();
303  assert(me->getTH1F()->GetXaxis()->GetXmin() == min);
304  assert(me->getTH1F()->GetXaxis()->GetXmax() == max);
305  thread_running->Reset();
306  } else {
307  thread_running =
308  booker.book1D("module_time_thread_running", "module thread running timing", bins, min, max)->getTH1F();
309  thread_running->SetYTitle("running processing (thread) time [ms]");
310  for (uint32_t i = 1; i <= bins; ++i) {
311  const char* module = counter->GetXaxis()->GetBinLabel(i);
312  thread_running->GetXaxis()->SetBinLabel(i, module);
313  }
314  }
315 
316  me = getter.get("module_efficiency");
317  if (me) {
318  efficiency = me->getTH1F();
319  assert(me->getTH1F()->GetXaxis()->GetXmin() == min);
320  assert(me->getTH1F()->GetXaxis()->GetXmax() == max);
321  efficiency->Reset();
322  } else {
323  efficiency = booker.book1D("module_efficiency", "module efficiency", bins, min, max)->getTH1F();
324  efficiency->SetYTitle("filter efficiency");
325  efficiency->SetMaximum(1.05);
326  for (uint32_t i = 1; i <= bins; ++i) {
327  const char* module = counter->GetXaxis()->GetBinLabel(i);
328  efficiency->GetXaxis()->SetBinLabel(i, module);
329  }
330  }
331 
332  for (uint32_t i = 1; i <= bins; ++i) {
333  double n = counter->GetBinContent(i);
334  double p = counter->GetBinContent(i + 1);
335  if (n)
336  efficiency->SetBinContent(i, p / n);
337 
338  // real timing
339  double t = real_total->GetBinContent(i);
340  real_average->SetBinContent(i, t / events);
341  if (n)
342  real_running->SetBinContent(i, t / n);
343 
344  // thread timing
345  t = thread_total->GetBinContent(i);
346  thread_average->SetBinContent(i, t / events);
347  if (n)
348  thread_running->SetBinContent(i, t / n);
349  }
350 
351  // vs lumi
352  if (doPlotsVsScalLumi_)
353  fillPlotsVsLumi(booker, getter, subsubdir, "VsScalLumi", scalLumiMEPSet_);
355  fillPlotsVsLumi(booker, getter, subsubdir, "VsPixelLumi", pixelLumiMEPSet_);
356  if (doPlotsVsPU_)
357  fillPlotsVsLumi(booker, getter, subsubdir, "VsPU", puMEPSet_);
358  }
359 }

References cms::cuda::assert(), trigObjTnPSource_cfi::bins, dqm::implementation::IBooker::book1D(), doPlotsVsPixelLumi_, doPlotsVsPU_, doPlotsVsScalLumi_, L1TObjectsTimingClient_cff::efficiency, patZpeak::events, fillPlotsVsLumi(), dqm::implementation::IGetter::get(), dqm::implementation::IGetter::getMEs(), dqm::implementation::IGetter::getSubdirs(), dqm::legacy::MonitorElement::getTH1D(), dqm::legacy::MonitorElement::getTH1F(), mps_fire::i, SiStripPI::max, hlt_dqm_clientPB-live_cfg::me, SiStripPI::mean, min(), dqmiodumpmetadata::n, or, AlCaHLTBitMon_ParallelJobs::p, castor_dqm_sourceclient_file_cfg::path, pixelLumiMEPSet_, ZMuMuAnalysisNtupler_cff::prefix, puMEPSet_, scalLumiMEPSet_, dqm::impl::MonitorElement::setBinContent(), dqm::impl::MonitorElement::setBinLabel(), dqm::implementation::NavigatorBase::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, and OrderedSet::t.

Referenced by fillProcessSummaryPlots().

◆ fillPlotsVsLumi()

void FastTimerServiceClient::fillPlotsVsLumi ( DQMStore::IBooker booker,
DQMStore::IGetter getter,
std::string const &  current_path,
std::string const &  suffix,
MEPSet  pset 
)
private

Definition at line 362 of file FastTimerServiceClient.cc.

366  {
367  std::vector<std::string> menames;
368 
369  static const boost::regex byls(".*byls");
370  static const boost::regex test(suffix);
371  // get all MEs in the current_path
372  getter.setCurrentFolder(current_path);
373  std::vector<std::string> allmenames = getter.getMEs();
374  for (auto const& m : allmenames) {
375  // get only MEs vs LS
376  if (boost::regex_match(m, byls))
377  menames.push_back(m);
378  }
379  // if no MEs available, return
380  if (menames.empty())
381  return;
382 
383  // get info for getting the lumi VS LS histogram
384  std::string folder = pset.folder;
385  std::string name = pset.name;
386  int nbins = pset.nbins;
387  double xmin = pset.xmin;
388  double xmax = pset.xmax;
389 
390  // get lumi/PU VS LS ME
391  getter.setCurrentFolder(folder);
392  MonitorElement* lumiVsLS = getter.get(folder + "/" + name);
393  // if no ME available, return
394  if (!lumiVsLS) {
395  edm::LogWarning("FastTimerServiceClient") << "no " << name << " ME is available in " << folder << std::endl;
396  return;
397  }
398 
399  // get range and binning for new MEs x-axis
400  size_t size = lumiVsLS->getTProfile()->GetXaxis()->GetNbins();
401  std::string xtitle = lumiVsLS->getTProfile()->GetYaxis()->GetTitle();
402 
403  std::vector<double> lumi;
404  std::vector<int> LS;
405  for (size_t ibin = 1; ibin <= size; ++ibin) {
406  // avoid to store points w/ no info
407  if (lumiVsLS->getTProfile()->GetBinContent(ibin) == 0.)
408  continue;
409 
410  lumi.push_back(lumiVsLS->getTProfile()->GetBinContent(ibin));
411  LS.push_back(lumiVsLS->getTProfile()->GetXaxis()->GetBinCenter(ibin));
412  }
413 
414  booker.setCurrentFolder(current_path);
415  getter.setCurrentFolder(current_path);
416  for (auto const& m : menames) {
417  std::string label = m;
418  label.erase(label.find("_byls"));
419 
420  MonitorElement* me = getter.get(current_path + "/" + m);
421  float ymin = 0.;
423  std::string ytitle = me->getTProfile()->GetYaxis()->GetTitle();
424 
425  MonitorElement* meVsLumi = getter.get(current_path + "/" + label + "_" + suffix);
426  if (meVsLumi) {
427  assert(meVsLumi->getTProfile()->GetXaxis()->GetXmin() == xmin);
428  assert(meVsLumi->getTProfile()->GetXaxis()->GetXmax() == xmax);
429  meVsLumi->Reset(); // do I have to do it ?!?!?
430  } else {
431  meVsLumi = booker.bookProfile(label + "_" + suffix, label + "_" + suffix, nbins, xmin, xmax, ymin, ymax);
432  // TProfile* meVsLumi_p = meVsLumi->getTProfile();
433  meVsLumi->getTProfile()->GetXaxis()->SetTitle(xtitle.c_str());
434  meVsLumi->getTProfile()->GetYaxis()->SetTitle(ytitle.c_str());
435  }
436  for (size_t ils = 0; ils < LS.size(); ++ils) {
437  int ibin = me->getTProfile()->GetXaxis()->FindBin(LS[ils]);
438  double y = me->getTProfile()->GetBinContent(ibin);
439 
440  meVsLumi->Fill(lumi[ils], y);
441  }
442  }
443 }

References cms::cuda::assert(), dqm::implementation::IBooker::bookProfile(), dqm::impl::MonitorElement::Fill(), printsummarytable::folder, dqm::implementation::IGetter::get(), dqm::implementation::IGetter::getMEs(), dqm::legacy::MonitorElement::getTProfile(), label, BXlumiParameters_cfi::lumi, visualization-live-secondInstance_cfg::m, SiStripPI::max, hlt_dqm_clientPB-live_cfg::me, Skims_PA_cff::name, LaserClient_cfi::nbins, muonDTDigis_cfi::pset, dqm::impl::MonitorElement::Reset(), dqm::implementation::NavigatorBase::setCurrentFolder(), findQualityFiles::size, AlCaHLTBitMon_QueryRunRegistry::string, createPayload::suffix, ctpps_dqm_sourceclient-live_cfg::test, TrackerOfflineValidation_Dqm_cff::xmax, TrackerOfflineValidation_Dqm_cff::xmin, hgcalPlots::xtitle, y, L1TOccupancyClient_cfi::ymax, L1TOccupancyClient_cfi::ymin, and hgcalPlots::ytitle.

Referenced by fillPathSummaryPlots(), and fillProcessSummaryPlots().

◆ fillProcessSummaryPlots()

void FastTimerServiceClient::fillProcessSummaryPlots ( DQMStore::IBooker booker,
DQMStore::IGetter getter,
std::string const &  path 
)
private

Definition at line 124 of file FastTimerServiceClient.cc.

126  {
127  MonitorElement* me = getter.get(current_path + "/event time_real");
128  if (me == nullptr)
129  // no FastTimerService DQM information
130  return;
131 
132  if (doPlotsVsScalLumi_)
133  fillPlotsVsLumi(booker, getter, current_path, "VsScalLumi", scalLumiMEPSet_);
135  fillPlotsVsLumi(booker, getter, current_path, "VsPixelLumi", pixelLumiMEPSet_);
136  if (doPlotsVsPU_)
137  fillPlotsVsLumi(booker, getter, current_path, "VsPU", puMEPSet_);
138 
139  // getter.setCurrentFolder(current_path);
140 
141  double events = me->getTH1F()->GetEntries();
142 
143  // look for per-process directories
144  static const boost::regex process_name(".*/process .*");
145 
146  booker.setCurrentFolder(current_path); // ?!?!?
147  std::vector<std::string> subdirs = getter.getSubdirs();
148  for (auto const& subdir : subdirs) {
149  if (boost::regex_match(subdir, process_name)) {
150  getter.setCurrentFolder(subdir);
151  // look for per-path plots inside each per-process directory
152  std::vector<std::string> subsubdirs = getter.getSubdirs();
153  for (auto const& subsubdir : subsubdirs) {
154  if (getter.get(subsubdir + "/path time_real")) {
155  fillPathSummaryPlots(booker, getter, events, subdir);
156  break;
157  }
158  }
159  }
160  } // loop on subdir
161 }

References doPlotsVsPixelLumi_, doPlotsVsPU_, doPlotsVsScalLumi_, patZpeak::events, fillPathSummaryPlots(), fillPlotsVsLumi(), dqm::implementation::IGetter::get(), dqm::implementation::IGetter::getSubdirs(), hlt_dqm_clientPB-live_cfg::me, pixelLumiMEPSet_, puMEPSet_, scalLumiMEPSet_, and dqm::implementation::NavigatorBase::setCurrentFolder().

Referenced by fillSummaryPlots().

◆ fillPUMePSetDescription()

void FastTimerServiceClient::fillPUMePSetDescription ( edm::ParameterSetDescription pset)
static

Definition at line 453 of file FastTimerServiceClient.cc.

453  {
454  pset.add<std::string>("folder", "HLT/LumiMonitoring");
455  pset.add<std::string>("name", "puVsLS");
456  pset.add<int>("nbins", 260);
457  pset.add<double>("xmin", 0.);
458  pset.add<double>("xmax", 130.);
459 }

References muonDTDigis_cfi::pset, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by fillDescriptions().

◆ fillSummaryPlots()

void FastTimerServiceClient::fillSummaryPlots ( DQMStore::IBooker booker,
DQMStore::IGetter getter 
)
private

Definition at line 98 of file FastTimerServiceClient.cc.

98  {
99  if (getter.get(m_dqm_path + "/event time_real")) {
100  // the plots are directly in the configured folder
101  fillProcessSummaryPlots(booker, getter, m_dqm_path);
102  } else {
103  static const boost::regex running_n_processes(".*/Running .*");
104 
105  booker.setCurrentFolder(m_dqm_path);
106  std::vector<std::string> subdirs = getter.getSubdirs();
107  for (auto const& subdir : subdirs) {
108  // the plots are in a per-number-of-processes folder
109  if (boost::regex_match(subdir, running_n_processes)) {
110  booker.setCurrentFolder(subdir);
111  if (getter.get(subdir + "/event time_real"))
112  fillProcessSummaryPlots(booker, getter, subdir);
113 
114  std::vector<std::string> subsubdirs = getter.getSubdirs();
115  for (auto const& subsubdir : subsubdirs) {
116  if (getter.get(subsubdir + "/event time_real"))
117  fillProcessSummaryPlots(booker, getter, subsubdir);
118  }
119  }
120  } // loop on subdirs
121  }
122 }

References fillProcessSummaryPlots(), dqm::implementation::IGetter::get(), dqm::implementation::IGetter::getSubdirs(), m_dqm_path, and dqm::implementation::NavigatorBase::setCurrentFolder().

Referenced by dqmEndJob(), and dqmEndLuminosityBlock().

◆ getHistoPSet()

MEPSet FastTimerServiceClient::getHistoPSet ( const edm::ParameterSet pset)
staticprivate

Definition at line 461 of file FastTimerServiceClient.cc.

461  {
462  return MEPSet{
463  pset.getParameter<std::string>("folder"),
464  pset.getParameter<std::string>("name"),
465  pset.getParameter<int>("nbins"),
466  pset.getParameter<double>("xmin"),
467  pset.getParameter<double>("xmax"),
468  };
469 }

References muonDTDigis_cfi::pset, and AlCaHLTBitMon_QueryRunRegistry::string.

Member Data Documentation

◆ doPlotsVsPixelLumi_

bool FastTimerServiceClient::doPlotsVsPixelLumi_
private

Definition at line 66 of file FastTimerServiceClient.cc.

Referenced by fillPathSummaryPlots(), and fillProcessSummaryPlots().

◆ doPlotsVsPU_

bool FastTimerServiceClient::doPlotsVsPU_
private

Definition at line 67 of file FastTimerServiceClient.cc.

Referenced by fillPathSummaryPlots(), and fillProcessSummaryPlots().

◆ doPlotsVsScalLumi_

bool FastTimerServiceClient::doPlotsVsScalLumi_
private

Definition at line 65 of file FastTimerServiceClient.cc.

Referenced by fillPathSummaryPlots(), and fillProcessSummaryPlots().

◆ m_dqm_path

std::string FastTimerServiceClient::m_dqm_path
private

Definition at line 43 of file FastTimerServiceClient.cc.

Referenced by fillSummaryPlots().

◆ pixelLumiMEPSet_

MEPSet FastTimerServiceClient::pixelLumiMEPSet_
private

Definition at line 70 of file FastTimerServiceClient.cc.

Referenced by fillPathSummaryPlots(), and fillProcessSummaryPlots().

◆ puMEPSet_

MEPSet FastTimerServiceClient::puMEPSet_
private

Definition at line 71 of file FastTimerServiceClient.cc.

Referenced by fillPathSummaryPlots(), and fillProcessSummaryPlots().

◆ scalLumiMEPSet_

MEPSet FastTimerServiceClient::scalLumiMEPSet_
private

Definition at line 69 of file FastTimerServiceClient.cc.

Referenced by fillPathSummaryPlots(), and fillProcessSummaryPlots().

counter
Definition: counter.py:1
DDAxes::y
mps_fire.i
i
Definition: mps_fire.py:355
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
SiStripPI::mean
Definition: SiStripPayloadInspectorHelper.h:169
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
FastTimerServiceClient::scalLumiMEPSet_
MEPSet scalLumiMEPSet_
Definition: FastTimerServiceClient.cc:69
FastTimerServiceClient::pixelLumiMEPSet_
MEPSet pixelLumiMEPSet_
Definition: FastTimerServiceClient.cc:70
min
T min(T a, T b)
Definition: MathUtil.h:58
printsummarytable.folder
folder
Definition: printsummarytable.py:7
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
FastTimerServiceClient::fillLumiMePSetDescription
static void fillLumiMePSetDescription(edm::ParameterSetDescription &pset)
Definition: FastTimerServiceClient.cc:445
cms::cuda::assert
assert(be >=bs)
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
L1TObjectsTimingClient_cff.efficiency
efficiency
Definition: L1TObjectsTimingClient_cff.py:10
FastTimerServiceClient::doPlotsVsPU_
bool doPlotsVsPU_
Definition: FastTimerServiceClient.cc:67
patZpeak.events
events
Definition: patZpeak.py:20
createPayload.suffix
suffix
Definition: createPayload.py:281
FastTimerServiceClient::doPlotsVsScalLumi_
bool doPlotsVsScalLumi_
Definition: FastTimerServiceClient.cc:65
config
Definition: config.py:1
BXlumiParameters_cfi.lumi
lumi
Definition: BXlumiParameters_cfi.py:6
FastTimerServiceClient::doPlotsVsPixelLumi_
bool doPlotsVsPixelLumi_
Definition: FastTimerServiceClient.cc:66
test
Definition: SmallWORMDict.h:13
ctpps_dqm_sourceclient-live_cfg.test
test
Definition: ctpps_dqm_sourceclient-live_cfg.py:7
L1TOccupancyClient_cfi.ymax
ymax
Definition: L1TOccupancyClient_cfi.py:43
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
FastTimerServiceClient::puMEPSet_
MEPSet puMEPSet_
Definition: FastTimerServiceClient.cc:71
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
dqm::impl::MonitorElement::Reset
virtual void Reset()
Remove all data from the ME, keept the empty histogram with all its settings.
Definition: MonitorElement.cc:354
LaserClient_cfi.nbins
nbins
Definition: LaserClient_cfi.py:51
hgcalPlots.xtitle
xtitle
Definition: hgcalPlots.py:94
dqm::legacy::MonitorElement::getTProfile
virtual TProfile * getTProfile() const
Definition: MonitorElement.h:506
OrderedSet.t
t
Definition: OrderedSet.py:90
dqm::legacy::MonitorElement::getTH1D
virtual TH1D * getTH1D() const
Definition: MonitorElement.h:486
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::LogWarning
Definition: MessageLogger.h:141
edm::ParameterSetDescription::addUntracked
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:100
edm::ParameterSet
Definition: ParameterSet.h:36
FastTimerServiceClient::fillProcessSummaryPlots
void fillProcessSummaryPlots(DQMStore::IBooker &booker, DQMStore::IGetter &getter, std::string const &path)
Definition: FastTimerServiceClient.cc:124
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
FastTimerServiceClient::fillPUMePSetDescription
static void fillPUMePSetDescription(edm::ParameterSetDescription &pset)
Definition: FastTimerServiceClient.cc:453
FastTimerServiceClient::fillPlotsVsLumi
void fillPlotsVsLumi(DQMStore::IBooker &booker, DQMStore::IGetter &getter, std::string const &current_path, std::string const &suffix, MEPSet pset)
Definition: FastTimerServiceClient.cc:362
dqm::impl::MonitorElement::setBinLabel
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:771
MEPSet
Definition: DQMCorrelationClient.h:17
module
Definition: vlib.h:198
dqm::impl::MonitorElement::setBinContent
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
Definition: MonitorElement.cc:691
L1TOccupancyClient_cfi.ymin
ymin
Definition: L1TOccupancyClient_cfi.py:43
TrackerOfflineValidation_Dqm_cff.xmax
xmax
Definition: TrackerOfflineValidation_Dqm_cff.py:11
FastTimerServiceClient::m_dqm_path
std::string m_dqm_path
Definition: FastTimerServiceClient.cc:43
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
or
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::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
FastTimerServiceClient::fillPathSummaryPlots
void fillPathSummaryPlots(DQMStore::IBooker &booker, DQMStore::IGetter &getter, double events, std::string const &path)
Definition: FastTimerServiceClient.cc:163
trigObjTnPSource_cfi.bins
bins
Definition: trigObjTnPSource_cfi.py:20
TrackerOfflineValidation_Dqm_cff.xmin
xmin
Definition: TrackerOfflineValidation_Dqm_cff.py:10
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:61
lumi
Definition: LumiSectionData.h:20
FastTimerServiceClient::getHistoPSet
static MEPSet getHistoPSet(const edm::ParameterSet &pset)
Definition: FastTimerServiceClient.cc:461
label
const char * label
Definition: PFTauDecayModeTools.cc:11
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
hgcalPlots.ytitle
ytitle
Definition: hgcalPlots.py:1410
ZMuMuAnalysisNtupler_cff.prefix
prefix
Definition: ZMuMuAnalysisNtupler_cff.py:14
FastTimerServiceClient::fillSummaryPlots
void fillSummaryPlots(DQMStore::IBooker &booker, DQMStore::IGetter &getter)
Definition: FastTimerServiceClient.cc:98