CMS 3D CMS Logo

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

#include <EcalDQMonitorClient.h>

Inheritance diagram for EcalDQMonitorClient:
DQMEDHarvester ecaldqm::EcalDQMonitor edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::EndProcessBlockProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 EcalDQMonitorClient (edm::ParameterSet const &)
 
 ~EcalDQMonitorClient () 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 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< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::EndProcessBlockProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator >
 EDProducer ()=default
 
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
 
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
 
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
 
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::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)
 
- Public Member Functions inherited from ecaldqm::EcalDQMonitor
 EcalDQMonitor (edm::ParameterSet const &)
 
virtual ~EcalDQMonitor () noexcept(false)
 

Static Public Member Functions

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

Private Member Functions

void beginRun (edm::Run const &, edm::EventSetup const &) override
 
void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
void runWorkers (DQMStore::IGetter &, ecaldqm::DQWorkerClient::ProcessType)
 

Private Attributes

unsigned eventCycleLength_
 
unsigned iEvt_
 
ecaldqm::StatusManager statusManager_
 

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 = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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 Member Functions inherited from ecaldqm::EcalDQMonitor
void ecaldqmBeginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) const
 
void ecaldqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
void ecaldqmEndLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
void ecaldqmEndRun (edm::Run const &, edm::EventSetup const &)
 
void ecaldqmGetSetupObjects (edm::EventSetup const &)
 
template<typename FuncOnWorker >
void executeOnWorkers_ (FuncOnWorker, std::string const &, std::string const &="", int=1) const
 
- Protected Attributes inherited from DQMEDHarvester
DQMStoredqmstore_
 
edm::GetterOfProducts< DQMTokenjobmegetter_
 
edm::EDPutTokenT< DQMTokenjobToken_
 
edm::GetterOfProducts< DQMTokenlumimegetter_
 
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::GetterOfProducts< DQMTokenrunmegetter_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
- Protected Attributes inherited from ecaldqm::EcalDQMonitor
const std::string moduleName_
 
const int verbosity_
 
std::vector< DQWorker * > workers_
 

Detailed Description

Definition at line 10 of file EcalDQMonitorClient.h.

Constructor & Destructor Documentation

◆ EcalDQMonitorClient()

EcalDQMonitorClient::EcalDQMonitorClient ( edm::ParameterSet const &  _ps)

Definition at line 27 of file EcalDQMonitorClient.cc.

30  [this](ecaldqm::DQWorker* worker) {
31  ecaldqm::DQWorkerClient* client(dynamic_cast<ecaldqm::DQWorkerClient*>(worker));
32  if (!client)
33  throw cms::Exception("InvalidConfiguration") << "Non-client DQWorker " << worker->getName() << " passed";
34  client->setStatusManager(this->statusManager_);
35  },
36  "initialization");
37 
38  if (_ps.existsAs<edm::FileInPath>("PNMaskFile", false)) {
39  std::ifstream maskFile(_ps.getUntrackedParameter<edm::FileInPath>("PNMaskFile").fullPath());
40  if (maskFile.is_open())
42  }
43 }

References HLTObjectMonitor_Client_cff::client, Exception, ecaldqm::EcalDQMonitor::executeOnWorkers_(), edm::ParameterSet::existsAs(), edm::FileInPath::fullPath(), ecaldqm::DQWorker::getName(), edm::ParameterSet::getUntrackedParameter(), l1RctEmulDigis_ECALGREN1_cff::maskFile, ecaldqm::StatusManager::readFromStream(), and statusManager_.

◆ ~EcalDQMonitorClient()

EcalDQMonitorClient::~EcalDQMonitorClient ( )
override

Definition at line 45 of file EcalDQMonitorClient.cc.

45 {}

Member Function Documentation

◆ beginRun()

void EcalDQMonitorClient::beginRun ( edm::Run const &  _run,
edm::EventSetup const &  _es 
)
overrideprivate

Definition at line 64 of file EcalDQMonitorClient.cc.

64  {
66 
67  if (_es.find(edm::eventsetup::EventSetupRecordKey::makeKey<EcalDQMChannelStatusRcd>()) &&
68  _es.find(edm::eventsetup::EventSetupRecordKey::makeKey<EcalDQMTowerStatusRcd>())) {
70  _es.get<EcalDQMChannelStatusRcd>().get(cStHndl);
71 
73  _es.get<EcalDQMTowerStatusRcd>().get(tStHndl);
74 
75  statusManager_.readFromObj(*cStHndl, *tStHndl);
76  }
77 
78  ecaldqmBeginRun(_run, _es);
79 }

References ecaldqm::EcalDQMonitor::ecaldqmBeginRun(), ecaldqm::EcalDQMonitor::ecaldqmGetSetupObjects(), edm::EventSetup::find(), edm::EventSetup::get(), get, ecaldqm::StatusManager::readFromObj(), and statusManager_.

◆ dqmEndJob()

void EcalDQMonitorClient::dqmEndJob ( DQMStore::IBooker _ibooker,
DQMStore::IGetter _igetter 
)
overrideprivatevirtual

Implements DQMEDHarvester.

Definition at line 110 of file EcalDQMonitorClient.cc.

110  {
112  [&_ibooker](ecaldqm::DQWorker* worker) {
113  worker->bookMEs(_ibooker); // worker returns if already booked
114  },
115  "bookMEs",
116  "Booking MEs");
117 
119 
120  executeOnWorkers_([](ecaldqm::DQWorker* worker) { worker->releaseMEs(); }, "releaseMEs", "releasing histograms");
121 }

References ecaldqm::DQWorker::bookMEs(), ecaldqm::EcalDQMonitor::executeOnWorkers_(), ecaldqm::DQWorkerClient::kJob, ecaldqm::DQWorker::releaseMEs(), and runWorkers().

◆ dqmEndLuminosityBlock()

void EcalDQMonitorClient::dqmEndLuminosityBlock ( DQMStore::IBooker _ibooker,
DQMStore::IGetter _igetter,
edm::LuminosityBlock const &  _lumi,
edm::EventSetup const &  _es 
)
overrideprivatevirtual

Reimplemented from DQMEDHarvester.

Definition at line 83 of file EcalDQMonitorClient.cc.

86  {
88  [&_ibooker](ecaldqm::DQWorker* worker) {
89  ecaldqm::DQWorkerClient* client(static_cast<ecaldqm::DQWorkerClient*>(worker));
90  if (!client->onlineMode() && !client->runsOn(ecaldqm::DQWorkerClient::kLumi))
91  return;
92  client->bookMEs(_ibooker);
93  },
94  "bookMEs",
95  "Booking MEs");
96 
97  ecaldqmEndLuminosityBlock(_lumi, _es);
98 
100 
102  [](ecaldqm::DQWorker* worker) {
103  ecaldqm::DQWorkerClient* client(static_cast<ecaldqm::DQWorkerClient*>(worker));
104  client->resetPerLumi();
105  },
106  "dqmEndLuminosityBlock",
107  "Reset per-lumi MEs");
108 }

References HLTObjectMonitor_Client_cff::client, ecaldqm::EcalDQMonitor::ecaldqmEndLuminosityBlock(), ecaldqm::EcalDQMonitor::executeOnWorkers_(), ecaldqm::DQWorkerClient::kLumi, and runWorkers().

◆ endRun()

void EcalDQMonitorClient::endRun ( edm::Run const &  _run,
edm::EventSetup const &  _es 
)
overrideprivate

Definition at line 81 of file EcalDQMonitorClient.cc.

81 { ecaldqmEndRun(_run, _es); }

References ecaldqm::EcalDQMonitor::ecaldqmEndRun().

◆ fillDescriptions()

void EcalDQMonitorClient::fillDescriptions ( edm::ConfigurationDescriptions _descs)
static

◆ runWorkers()

void EcalDQMonitorClient::runWorkers ( DQMStore::IGetter _igetter,
ecaldqm::DQWorkerClient::ProcessType  _type 
)
private

Definition at line 123 of file EcalDQMonitorClient.cc.

123  {
124  if (verbosity_ > 0)
125  edm::LogInfo("EcalDQM") << moduleName_ << ": Starting worker modules..";
126 
128  [&_igetter, &_type](ecaldqm::DQWorker* worker) {
129  ecaldqm::DQWorkerClient* client(static_cast<ecaldqm::DQWorkerClient*>(worker));
130  if (!client->onlineMode() && !client->runsOn(_type))
131  return;
132  client->releaseSource();
133  client->resetMEs();
134  if (!client->retrieveSource(_igetter, _type))
135  return;
136  if (client->onlineMode())
137  client->setTime(time(nullptr));
138  client->producePlots(_type);
139  },
140  "retrieveAndRun",
141  "producing plots");
142 
143  if (verbosity_ > 0)
144  edm::LogInfo("EcalDQM") << " done." << std::endl;
145 }

References HLTObjectMonitor_Client_cff::client, ecaldqm::EcalDQMonitor::executeOnWorkers_(), ecaldqm::EcalDQMonitor::moduleName_, ntuplemaker::time, and ecaldqm::EcalDQMonitor::verbosity_.

Referenced by dqmEndJob(), and dqmEndLuminosityBlock().

Member Data Documentation

◆ eventCycleLength_

unsigned EcalDQMonitorClient::eventCycleLength_
private

Definition at line 28 of file EcalDQMonitorClient.h.

◆ iEvt_

unsigned EcalDQMonitorClient::iEvt_
private

Definition at line 29 of file EcalDQMonitorClient.h.

◆ statusManager_

ecaldqm::StatusManager EcalDQMonitorClient::statusManager_
private

Definition at line 31 of file EcalDQMonitorClient.h.

Referenced by beginRun(), and EcalDQMonitorClient().

ecaldqm::EcalDQMonitor::moduleName_
const std::string moduleName_
Definition: EcalDQMonitor.h:46
ecaldqm::DQWorkerClient::fillDescriptions
static void fillDescriptions(edm::ParameterSetDescription &)
Definition: DQWorkerClient.cc:21
edm::ParameterWildcard
Definition: ParameterWildcard.h:23
ecaldqm::EcalDQMonitor::executeOnWorkers_
void executeOnWorkers_(FuncOnWorker, std::string const &, std::string const &="", int=1) const
Definition: EcalDQMonitor.h:51
ecaldqm::EcalDQMonitor::verbosity_
const int verbosity_
Definition: EcalDQMonitor.h:47
ecaldqm::EcalDQMonitor::ecaldqmBeginRun
void ecaldqmBeginRun(edm::Run const &, edm::EventSetup const &)
Definition: EcalDQMonitor.cc:87
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
EcalDQMonitorClient::runWorkers
void runWorkers(DQMStore::IGetter &, ecaldqm::DQWorkerClient::ProcessType)
Definition: EcalDQMonitorClient.cc:123
ecaldqm::EcalDQMonitor::fillDescriptions
static void fillDescriptions(edm::ParameterSetDescription &)
Definition: EcalDQMonitor.cc:53
ecaldqm::DQWorker::bookMEs
virtual void bookMEs(DQMStore::IBooker &)
Definition: DQWorker.cc:66
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
ecaldqm::StatusManager::readFromStream
void readFromStream(std::istream &)
Definition: StatusManager.cc:124
ecaldqm::EcalDQMonitor
Definition: EcalDQMonitor.h:25
ecaldqm::DQWorker::releaseMEs
virtual void releaseMEs()
Definition: DQWorker.cc:60
ecaldqm::StatusManager::readFromObj
void readFromObj(EcalDQMChannelStatus const &, EcalDQMTowerStatus const &)
Definition: StatusManager.cc:200
ecaldqm::DQWorker
Definition: DQWorker.h:28
edm::FileInPath
Definition: FileInPath.h:64
HLTObjectMonitor_Client_cff.client
client
Definition: HLTObjectMonitor_Client_cff.py:6
ecaldqm::DQWorkerClient::kJob
Definition: DQWorkerClient.h:15
edm::ESHandle
Definition: DTSurvey.h:22
l1RctEmulDigis_ECALGREN1_cff.maskFile
maskFile
Definition: l1RctEmulDigis_ECALGREN1_cff.py:5
ecaldqm::DQWorkerClient::kLumi
Definition: DQWorkerClient.h:15
ecaldqm::EcalDQMonitor::ecaldqmEndLuminosityBlock
void ecaldqmEndLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
Definition: EcalDQMonitor.cc:129
EcalDQMTowerStatusRcd
Definition: EcalDQMTowerStatusRcd.h:5
EcalDQMonitorClient::iEvt_
unsigned iEvt_
Definition: EcalDQMonitorClient.h:29
DQMEDHarvester::DQMEDHarvester
DQMEDHarvester()
Definition: DQMEDHarvester.h:98
EcalDQMChannelStatusRcd
Definition: EcalDQMChannelStatusRcd.h:5
edm::ParameterSetDescription::addNode
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
Definition: ParameterSetDescription.cc:41
ecaldqm::DQWorkerClient
Definition: DQWorkerClient.h:13
get
#define get
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
ecaldqm::EcalDQMonitor::ecaldqmEndRun
void ecaldqmEndRun(edm::Run const &, edm::EventSetup const &)
Definition: EcalDQMonitor.cc:101
ecaldqm::DQWorker::getName
const std::string & getName() const
Definition: DQWorker.h:71
Exception
Definition: hltDiff.cc:246
ntuplemaker.time
time
Definition: ntuplemaker.py:310
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:99
edm::RequireZeroOrMore
Definition: ParameterWildcardBase.h:17
EcalDQMonitorClient::statusManager_
ecaldqm::StatusManager statusManager_
Definition: EcalDQMonitorClient.h:31
ecaldqm::EcalDQMonitor::ecaldqmGetSetupObjects
void ecaldqmGetSetupObjects(edm::EventSetup const &)
Definition: EcalDQMonitor.cc:64
edm::FileInPath::fullPath
std::string fullPath() const
Definition: FileInPath.cc:163