CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes
TriggerRatesMonitorClient Class Reference

#include <TriggerRatesMonitorClient.h>

Inheritance diagram for TriggerRatesMonitorClient:
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

 TriggerRatesMonitorClient (const edm::ParameterSet &ps)
 
 ~TriggerRatesMonitorClient () override=default
 
- 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 Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Protected Member Functions

void beginJob () override
 
void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
 
- 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)
 

Private Attributes

std::string m_dqm_path
 
std::vector< TH2F * > m_hltXpd_counts
 

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 Attributes inherited from DQMEDHarvester
DQMStoredqmstore_
 
edm::GetterOfProducts< DQMTokenlumimegetter_
 
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::GetterOfProducts< DQMTokenrunmegetter_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 17 of file TriggerRatesMonitorClient.h.

Constructor & Destructor Documentation

◆ TriggerRatesMonitorClient()

TriggerRatesMonitorClient::TriggerRatesMonitorClient ( const edm::ParameterSet ps)

Definition at line 8 of file TriggerRatesMonitorClient.cc.

9  : m_dqm_path(iConfig.getUntrackedParameter<std::string>("dqmPath")) {
10  edm::LogInfo("TriggerRatesMonitorClient")
11  << "Constructor TriggerRatesMonitorClient::TriggerRatesMonitorClient " << std::endl;
12 }

◆ ~TriggerRatesMonitorClient()

TriggerRatesMonitorClient::~TriggerRatesMonitorClient ( )
overridedefault

Member Function Documentation

◆ beginJob()

void TriggerRatesMonitorClient::beginJob ( void  )
overrideprotectedvirtual

Reimplemented from edm::one::EDProducerBase.

Definition at line 17 of file TriggerRatesMonitorClient.cc.

17  {
18  edm::LogInfo("TriggerRatesMonitorClient") << "TriggerRatesMonitorClient::beginJob " << std::endl;
19 }

◆ dqmEndJob()

void TriggerRatesMonitorClient::dqmEndJob ( DQMStore::IBooker ibooker_,
DQMStore::IGetter igetter_ 
)
overrideprotectedvirtual

Implements DQMEDHarvester.

Definition at line 24 of file TriggerRatesMonitorClient.cc.

24  {
25  // create and cd into new folder
26  ibooker_.setCurrentFolder(m_dqm_path);
27 
28  //get available histograms
29  std::vector<std::string> directories = igetter_.getSubdirs();
30  m_hltXpd_counts.resize(directories.size());
31 
32  int i = 0;
33  for (auto const& dir : directories) {
34  // std::cout << "dir: " << dir << std::endl;
35  ibooker_.setCurrentFolder(m_dqm_path + "/" + dir);
36 
37  std::vector<std::string> const& all_mes = igetter_.getMEs();
38  std::vector<std::string> mes;
39  for (auto const& me : all_mes)
40  if (me.find("accept") != std::string::npos)
41  mes.push_back(me);
42 
43  int nbinsY = mes.size();
44  double xminY = 0.;
45  double xmaxY = xminY + 1. * nbinsY;
46  int nbinsX = 0;
47  int ibinY = 1;
48  for (auto const& me : mes) {
49  // std::cout << "me: " << me << std::endl;
50  ibooker_.setCurrentFolder(m_dqm_path + "/" + dir);
51  TH1F* histo = igetter_.get(me)->getTH1F();
52 
53  if (m_hltXpd_counts[i] == nullptr) {
54  // get range and binning for new MEs
55  nbinsX = histo->GetNbinsX();
56  double xminX = histo->GetXaxis()->GetXmin();
57  double xmaxX = histo->GetXaxis()->GetXmax();
58 
59  //book new histogram
60  std::string hname = dir + "_summary";
61  ibooker_.setCurrentFolder(m_dqm_path);
62  m_hltXpd_counts[i] = ibooker_.book2D(hname, hname, nbinsX, xminX, xmaxX, nbinsY, xminY, xmaxY)->getTH2F();
63  } else {
64  m_hltXpd_counts[i]->GetYaxis()->SetBinLabel(ibinY, me.c_str());
65  }
66 
67  // handle mes
68  for (int ibinX = 1; ibinX <= nbinsX; ++ibinX) {
69  float rate = histo->GetBinContent(ibinX);
70  m_hltXpd_counts[i]->SetBinContent(ibinX, ibinY, rate);
71  }
72  ibinY++;
73  }
74 
75  i++;
76  }
77 }

References dqm::implementation::IBooker::book2D(), DeadROC_duringRun::dir, dqm::implementation::IGetter::get(), dqm::implementation::IGetter::getMEs(), dqm::implementation::IGetter::getSubdirs(), dqm::legacy::MonitorElement::getTH1F(), dqm::legacy::MonitorElement::getTH2F(), timingPdfMaker::histo, mps_fire::i, m_dqm_path, m_hltXpd_counts, hlt_dqm_clientPB-live_cfg::me, hlt_dqm_clientPB-live_cfg::nbinsX, hlt_dqm_clientPB-live_cfg::nbinsY, RPCpg::rate(), dqm::implementation::NavigatorBase::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, hlt_dqm_clientPB-live_cfg::xmaxX, hlt_dqm_clientPB-live_cfg::xmaxY, hlt_dqm_clientPB-live_cfg::xminX, and hlt_dqm_clientPB-live_cfg::xminY.

◆ dqmEndLuminosityBlock()

void TriggerRatesMonitorClient::dqmEndLuminosityBlock ( DQMStore::IBooker ibooker_,
DQMStore::IGetter igetter_,
edm::LuminosityBlock const &  iLumi,
edm::EventSetup const &  iSetup 
)
overrideprotectedvirtual

Reimplemented from DQMEDHarvester.

Definition at line 82 of file TriggerRatesMonitorClient.cc.

85  {
86  edm::LogInfo("TriggerRatesMonitorClient") << "TriggerRatesMonitorClient::endLumi " << std::endl;
87 }

◆ fillDescriptions()

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

Definition at line 89 of file TriggerRatesMonitorClient.cc.

89  {
91  desc.addUntracked<std::string>("dqmPath", "HLT/Datasets");
92  descriptions.add("triggerRatesMonitorClient", desc);
93 }

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

Member Data Documentation

◆ m_dqm_path

std::string TriggerRatesMonitorClient::m_dqm_path
private

Definition at line 33 of file TriggerRatesMonitorClient.h.

Referenced by dqmEndJob().

◆ m_hltXpd_counts

std::vector<TH2F *> TriggerRatesMonitorClient::m_hltXpd_counts
private

Definition at line 36 of file TriggerRatesMonitorClient.h.

Referenced by dqmEndJob().

mps_fire.i
i
Definition: mps_fire.py:355
hlt_dqm_clientPB-live_cfg.xmaxX
xmaxX
Definition: hlt_dqm_clientPB-live_cfg.py:67
hlt_dqm_clientPB-live_cfg.xminY
xminY
Definition: hlt_dqm_clientPB-live_cfg.py:70
edm::LogInfo
Definition: MessageLogger.h:254
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
hlt_dqm_clientPB-live_cfg.nbinsX
nbinsX
Definition: hlt_dqm_clientPB-live_cfg.py:65
timingPdfMaker.histo
histo
Definition: timingPdfMaker.py:279
hlt_dqm_clientPB-live_cfg.xminX
xminX
Definition: hlt_dqm_clientPB-live_cfg.py:66
TriggerRatesMonitorClient::m_hltXpd_counts
std::vector< TH2F * > m_hltXpd_counts
Definition: TriggerRatesMonitorClient.h:36
RPCpg::rate
double rate(double x)
Definition: Constants.cc:3
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
TriggerRatesMonitorClient::m_dqm_path
std::string m_dqm_path
Definition: TriggerRatesMonitorClient.h:33
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
hlt_dqm_clientPB-live_cfg.nbinsY
nbinsY
Definition: hlt_dqm_clientPB-live_cfg.py:69
edm::ParameterSetDescription::addUntracked
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:100
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:61
hlt_dqm_clientPB-live_cfg.xmaxY
xmaxY
Definition: hlt_dqm_clientPB-live_cfg.py:71
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23