CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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< T > 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 (edm::ParameterSet const &iConfig)
 
 DQMEDHarvester ()
 
virtual void dqmEndRun (DQMStore::IBooker &, DQMStore::IGetter &, edm::Run const &, edm::EventSetup const &)
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &es) final
 
void endProcessBlockProduce (edm::ProcessBlock &) 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< T >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () 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
 
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)
 
 ~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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex >
const & 
esGetTokenRecordIndicesVector (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::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
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_
 
bool fillEveryLumiSection_
 
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
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, 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)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 
- Protected Attributes inherited from DQMEDHarvester
DQMStoredqmstore_
 
edm::GetterOfProducts< DQMTokenjobmegetter_
 
edm::EDPutTokenT< DQMTokenjobToken_
 
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 ( edm::ParameterSet const &  config)
explicit

Definition at line 76 of file FastTimerServiceClient.cc.

77  : m_dqm_path(config.getUntrackedParameter<std::string>("dqmPath")),
78  doPlotsVsScalLumi_(config.getParameter<bool>("doPlotsVsScalLumi")),
79  doPlotsVsPixelLumi_(config.getParameter<bool>("doPlotsVsPixelLumi")),
80  doPlotsVsPU_(config.getParameter<bool>("doPlotsVsPU")),
82  : MEPSet{}),
84  : MEPSet{}),
85  puMEPSet_(doPlotsVsPU_ ? getHistoPSet(config.getParameter<edm::ParameterSet>("puME")) : MEPSet{}),
86  fillEveryLumiSection_(config.getParameter<bool>("fillEveryLumiSection")) {}
static MEPSet getHistoPSet(const edm::ParameterSet &pset)
tuple config
parse the configuration file
FastTimerServiceClient::~FastTimerServiceClient ( )
overridedefault

Member Function Documentation

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

Implements DQMEDHarvester.

Definition at line 90 of file FastTimerServiceClient.cc.

References fillSummaryPlots().

90  {
91  fillSummaryPlots(booker, getter);
92 }
void fillSummaryPlots(DQMStore::IBooker &booker, DQMStore::IGetter &getter)
void FastTimerServiceClient::dqmEndLuminosityBlock ( DQMStore::IBooker booker,
DQMStore::IGetter getter,
edm::LuminosityBlock const &  lumi,
edm::EventSetup const &  setup 
)
overrideprivatevirtual

Reimplemented from DQMEDHarvester.

Definition at line 94 of file FastTimerServiceClient.cc.

References fillEveryLumiSection_, and fillSummaryPlots().

97  {
99  fillSummaryPlots(booker, getter);
100 }
void fillSummaryPlots(DQMStore::IBooker &booker, DQMStore::IGetter &getter)
void FastTimerServiceClient::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 475 of file FastTimerServiceClient.cc.

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

475  {
476  // The following says we do not know what parameters are allowed so do no validation
477  // Please change this to state exactly what you do use, even if it is no parameters
479  desc.addUntracked<std::string>("dqmPath", "HLT/TimerService");
480  desc.add<bool>("doPlotsVsScalLumi", true);
481  desc.add<bool>("doPlotsVsPixelLumi", false);
482  desc.add<bool>("doPlotsVsPU", true);
483 
484  edm::ParameterSetDescription scalLumiMEPSet;
485  fillLumiMePSetDescription(scalLumiMEPSet);
486  desc.add<edm::ParameterSetDescription>("scalLumiME", scalLumiMEPSet);
487 
488  edm::ParameterSetDescription pixelLumiMEPSet;
489  fillLumiMePSetDescription(pixelLumiMEPSet);
490  desc.add<edm::ParameterSetDescription>("pixelLumiME", pixelLumiMEPSet);
491 
493  fillPUMePSetDescription(puMEPSet);
494  desc.add<edm::ParameterSetDescription>("puME", puMEPSet);
495  desc.add<bool>("fillEveryLumiSection", true);
496  descriptions.add("fastTimerServiceClient", desc);
497 }
static void fillPUMePSetDescription(edm::ParameterSetDescription &pset)
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
static void fillLumiMePSetDescription(edm::ParameterSetDescription &pset)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void FastTimerServiceClient::fillLumiMePSetDescription ( edm::ParameterSetDescription pset)
static

Definition at line 449 of file FastTimerServiceClient.cc.

References edm::ParameterSetDescription::add(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by fillDescriptions().

449  {
450  pset.add<std::string>("folder", "HLT/LumiMonitoring");
451  pset.add<std::string>("name", "lumiVsLS");
452  pset.add<int>("nbins", 440);
453  pset.add<double>("xmin", 0.);
454  pset.add<double>("xmax", 22000.);
455 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void FastTimerServiceClient::fillPathSummaryPlots ( DQMStore::IBooker booker,
DQMStore::IGetter getter,
double  events,
std::string const &  path 
)
private

Definition at line 167 of file FastTimerServiceClient.cc.

References cms::cuda::assert(), dqm::implementation::IBooker::book1D(), counter, doPlotsVsPixelLumi_, doPlotsVsPU_, doPlotsVsScalLumi_, compareTotals::efficiency, fillPlotsVsLumi(), dqm::implementation::IGetter::get(), dqm::impl::MonitorElement::getMean(), 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, SiStripPI::min, callgraph::module, dqmiodumpmetadata::n, or, AlCaHLTBitMon_ParallelJobs::p, fed_dqm_sourceclient-live_cfg::path, pixelLumiMEPSet_, PostProcessorHGCAL_cfi::prefix, puMEPSet_, scalLumiMEPSet_, dqm::impl::MonitorElement::setBinContent(), dqm::impl::MonitorElement::setBinLabel(), dqm::implementation::NavigatorBase::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, submitPVValidationJobs::t, and ctpps_dqm_sourceclient-live_cfg::test.

Referenced by fillProcessSummaryPlots().

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

Definition at line 366 of file FastTimerServiceClient.cc.

References cms::cuda::assert(), dqm::implementation::IBooker::bookProfile(), dqm::impl::MonitorElement::Fill(), printsummarytable::folder, MEPSet::folder, dqm::implementation::IGetter::get(), dqm::implementation::IGetter::getMEs(), dqm::legacy::MonitorElement::getTProfile(), label, dqmdumpme::lumi, visualization-live-secondInstance_cfg::m, SiStripPI::max, hlt_dqm_clientPB-live_cfg::me, MEPSet::name, mergeVDriftHistosByStation::name, MEPSet::nbins, hlt_dqm_clientPB-live_cfg::nbins, dqm::impl::MonitorElement::Reset(), dqm::implementation::NavigatorBase::setCurrentFolder(), findQualityFiles::size, AlCaHLTBitMon_QueryRunRegistry::string, ctpps_dqm_sourceclient-live_cfg::test, MEPSet::xmax, hlt_dqm_clientPB-live_cfg::xmax, MEPSet::xmin, hlt_dqm_clientPB-live_cfg::xmin, compareTotals::xtitle, y, SiStrip_OfflineMonitoring_cff::ymax, SiStrip_OfflineMonitoring_cff::ymin, and compareTotals::ytitle.

Referenced by fillPathSummaryPlots(), and fillProcessSummaryPlots().

370  {
371  std::vector<std::string> menames;
372 
373  static const boost::regex byls(".*byls");
374  static const boost::regex test(suffix);
375  // get all MEs in the current_path
376  getter.setCurrentFolder(current_path);
377  std::vector<std::string> allmenames = getter.getMEs();
378  for (auto const& m : allmenames) {
379  // get only MEs vs LS
380  if (boost::regex_match(m, byls))
381  menames.push_back(m);
382  }
383  // if no MEs available, return
384  if (menames.empty())
385  return;
386 
387  // get info for getting the lumi VS LS histogram
388  std::string folder = pset.folder;
389  std::string name = pset.name;
390  int nbins = pset.nbins;
391  double xmin = pset.xmin;
392  double xmax = pset.xmax;
393 
394  // get lumi/PU VS LS ME
395  getter.setCurrentFolder(folder);
396  MonitorElement* lumiVsLS = getter.get(folder + "/" + name);
397  // if no ME available, return
398  if (!lumiVsLS) {
399  edm::LogWarning("FastTimerServiceClient") << "no " << name << " ME is available in " << folder << std::endl;
400  return;
401  }
402 
403  // get range and binning for new MEs x-axis
404  size_t size = lumiVsLS->getTProfile()->GetXaxis()->GetNbins();
405  std::string xtitle = lumiVsLS->getTProfile()->GetYaxis()->GetTitle();
406 
407  std::vector<double> lumi;
408  std::vector<int> LS;
409  for (size_t ibin = 1; ibin <= size; ++ibin) {
410  // avoid to store points w/ no info
411  if (lumiVsLS->getTProfile()->GetBinContent(ibin) == 0.)
412  continue;
413 
414  lumi.push_back(lumiVsLS->getTProfile()->GetBinContent(ibin));
415  LS.push_back(lumiVsLS->getTProfile()->GetXaxis()->GetBinCenter(ibin));
416  }
417 
418  booker.setCurrentFolder(current_path);
419  getter.setCurrentFolder(current_path);
420  for (auto const& m : menames) {
421  std::string label = m;
422  label.erase(label.find("_byls"));
423 
424  MonitorElement* me = getter.get(current_path + "/" + m);
425  float ymin = 0.;
427  std::string ytitle = me->getTProfile()->GetYaxis()->GetTitle();
428 
429  MonitorElement* meVsLumi = getter.get(current_path + "/" + label + "_" + suffix);
430  if (meVsLumi) {
431  assert(meVsLumi->getTProfile()->GetXaxis()->GetXmin() == xmin);
432  assert(meVsLumi->getTProfile()->GetXaxis()->GetXmax() == xmax);
433  meVsLumi->Reset(); // do I have to do it ?!?!?
434  } else {
435  meVsLumi = booker.bookProfile(label + "_" + suffix, label + "_" + suffix, nbins, xmin, xmax, ymin, ymax);
436  // TProfile* meVsLumi_p = meVsLumi->getTProfile();
437  meVsLumi->getTProfile()->GetXaxis()->SetTitle(xtitle.c_str());
438  meVsLumi->getTProfile()->GetYaxis()->SetTitle(ytitle.c_str());
439  }
440  for (size_t ils = 0; ils < LS.size(); ++ils) {
441  int ibin = me->getTProfile()->GetXaxis()->FindBin(LS[ils]);
442  double y = me->getTProfile()->GetBinContent(ibin);
443 
444  meVsLumi->Fill(lumi[ils], y);
445  }
446  }
447 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
std::string folder
assert(be >=bs)
void Fill(long long x)
virtual void Reset()
Remove all data from the ME, keept the empty histogram with all its settings.
char const * label
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:322
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:673
list lumi
Definition: dqmdumpme.py:53
std::string name
virtual TProfile * getTProfile() const
virtual std::vector< std::string > getMEs() const
Definition: DQMStore.cc:720
Log< level::Warning, false > LogWarning
tuple size
Write out results.
void FastTimerServiceClient::fillProcessSummaryPlots ( DQMStore::IBooker booker,
DQMStore::IGetter getter,
std::string const &  path 
)
private

Definition at line 128 of file FastTimerServiceClient.cc.

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

Referenced by fillSummaryPlots().

130  {
131  MonitorElement* me = getter.get(current_path + "/event time_real");
132  if (me == nullptr)
133  // no FastTimerService DQM information
134  return;
135 
136  if (doPlotsVsScalLumi_)
137  fillPlotsVsLumi(booker, getter, current_path, "VsScalLumi", scalLumiMEPSet_);
139  fillPlotsVsLumi(booker, getter, current_path, "VsPixelLumi", pixelLumiMEPSet_);
140  if (doPlotsVsPU_)
141  fillPlotsVsLumi(booker, getter, current_path, "VsPU", puMEPSet_);
142 
143  // getter.setCurrentFolder(current_path);
144 
145  double events = me->getTH1F()->GetEntries();
146 
147  // look for per-process directories
148  static const boost::regex process_name(".*/process .*");
149 
150  booker.setCurrentFolder(current_path); // ?!?!?
151  std::vector<std::string> subdirs = getter.getSubdirs();
152  for (auto const& subdir : subdirs) {
153  if (boost::regex_match(subdir, process_name)) {
154  getter.setCurrentFolder(subdir);
155  // look for per-path plots inside each per-process directory
156  std::vector<std::string> subsubdirs = getter.getSubdirs();
157  for (auto const& subsubdir : subsubdirs) {
158  if (getter.get(subsubdir + "/path time_real")) {
159  fillPathSummaryPlots(booker, getter, events, subdir);
160  break;
161  }
162  }
163  }
164  } // loop on subdir
165 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
virtual DQM_DEPRECATED std::vector< std::string > getSubdirs() const
Definition: DQMStore.cc:700
void fillPlotsVsLumi(DQMStore::IBooker &booker, DQMStore::IGetter &getter, std::string const &current_path, std::string const &suffix, MEPSet pset)
virtual TH1F * getTH1F() const
void fillPathSummaryPlots(DQMStore::IBooker &booker, DQMStore::IGetter &getter, double events, std::string const &path)
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:673
tuple events
Definition: patZpeak.py:20
void FastTimerServiceClient::fillPUMePSetDescription ( edm::ParameterSetDescription pset)
static

Definition at line 457 of file FastTimerServiceClient.cc.

References edm::ParameterSetDescription::add(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by fillDescriptions().

457  {
458  pset.add<std::string>("folder", "HLT/LumiMonitoring");
459  pset.add<std::string>("name", "puVsLS");
460  pset.add<int>("nbins", 260);
461  pset.add<double>("xmin", 0.);
462  pset.add<double>("xmax", 130.);
463 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void FastTimerServiceClient::fillSummaryPlots ( DQMStore::IBooker booker,
DQMStore::IGetter getter 
)
private

Definition at line 102 of file FastTimerServiceClient.cc.

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

Referenced by dqmEndJob(), and dqmEndLuminosityBlock().

102  {
103  if (getter.get(m_dqm_path + "/event time_real")) {
104  // the plots are directly in the configured folder
105  fillProcessSummaryPlots(booker, getter, m_dqm_path);
106  } else {
107  static const boost::regex running_n_processes(".*/Running .*");
108 
110  std::vector<std::string> subdirs = getter.getSubdirs();
111  for (auto const& subdir : subdirs) {
112  // the plots are in a per-number-of-processes folder
113  if (boost::regex_match(subdir, running_n_processes)) {
114  booker.setCurrentFolder(subdir);
115  if (getter.get(subdir + "/event time_real"))
116  fillProcessSummaryPlots(booker, getter, subdir);
117 
118  std::vector<std::string> subsubdirs = getter.getSubdirs();
119  for (auto const& subsubdir : subsubdirs) {
120  if (getter.get(subsubdir + "/event time_real"))
121  fillProcessSummaryPlots(booker, getter, subsubdir);
122  }
123  }
124  } // loop on subdirs
125  }
126 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
virtual DQM_DEPRECATED std::vector< std::string > getSubdirs() const
Definition: DQMStore.cc:700
void fillProcessSummaryPlots(DQMStore::IBooker &booker, DQMStore::IGetter &getter, std::string const &path)
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:673
MEPSet FastTimerServiceClient::getHistoPSet ( const edm::ParameterSet pset)
staticprivate

Definition at line 465 of file FastTimerServiceClient.cc.

References edm::ParameterSet::getParameter(), and AlCaHLTBitMon_QueryRunRegistry::string.

465  {
466  return MEPSet{
467  pset.getParameter<std::string>("folder"),
468  pset.getParameter<std::string>("name"),
469  pset.getParameter<int>("nbins"),
470  pset.getParameter<double>("xmin"),
471  pset.getParameter<double>("xmax"),
472  };
473 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303

Member Data Documentation

bool FastTimerServiceClient::doPlotsVsPixelLumi_
private

Definition at line 66 of file FastTimerServiceClient.cc.

Referenced by fillPathSummaryPlots(), and fillProcessSummaryPlots().

bool FastTimerServiceClient::doPlotsVsPU_
private

Definition at line 67 of file FastTimerServiceClient.cc.

Referenced by fillPathSummaryPlots(), and fillProcessSummaryPlots().

bool FastTimerServiceClient::doPlotsVsScalLumi_
private

Definition at line 65 of file FastTimerServiceClient.cc.

Referenced by fillPathSummaryPlots(), and fillProcessSummaryPlots().

bool FastTimerServiceClient::fillEveryLumiSection_
private

Definition at line 73 of file FastTimerServiceClient.cc.

Referenced by dqmEndLuminosityBlock().

std::string FastTimerServiceClient::m_dqm_path
private

Definition at line 43 of file FastTimerServiceClient.cc.

Referenced by fillSummaryPlots().

MEPSet FastTimerServiceClient::pixelLumiMEPSet_
private

Definition at line 70 of file FastTimerServiceClient.cc.

Referenced by fillPathSummaryPlots(), and fillProcessSummaryPlots().

MEPSet FastTimerServiceClient::puMEPSet_
private

Definition at line 71 of file FastTimerServiceClient.cc.

Referenced by fillPathSummaryPlots(), and fillProcessSummaryPlots().

MEPSet FastTimerServiceClient::scalLumiMEPSet_
private

Definition at line 69 of file FastTimerServiceClient.cc.

Referenced by fillPathSummaryPlots(), and fillProcessSummaryPlots().