CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
DQMGlobalEDAnalyzer< H, Args > Class Template Referenceabstract

#include <DQMGlobalEDAnalyzer.h>

Inheritance diagram for DQMGlobalEDAnalyzer< H, Args >:
edm::global::EDProducer< edm::RunCache< H >, edm::EndRunProducer, edm::Accumulator, Args... > edm::global::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Types

typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::global::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
 

Public Member Functions

void accumulate (edm::StreamID id, edm::Event const &event, edm::EventSetup const &setup) const final
 
virtual void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &, H &) const =0
 
virtual void dqmAnalyze (edm::Event const &, edm::EventSetup const &, H const &) const =0
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &, H &) const
 
virtual void dqmEndRun (edm::Run const &, edm::EventSetup const &, H const &) const
 
 DQMGlobalEDAnalyzer ()
 
std::shared_ptr< H > globalBeginRun (edm::Run const &run, edm::EventSetup const &setup) const final
 
void globalEndRun (edm::Run const &, edm::EventSetup const &) const final
 
void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup) const final
 
- Public Member Functions inherited from edm::global::EDProducer< edm::RunCache< H >, edm::EndRunProducer, edm::Accumulator, Args... >
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () 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)
 

Private Member Functions

uint64_t meId (edm::Run const &run) const
 

Private Attributes

DQMStoredqmstore_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::global::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- 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)
 

Detailed Description

template<typename H, typename... Args>
class DQMGlobalEDAnalyzer< H, Args >

Definition at line 13 of file DQMGlobalEDAnalyzer.h.

Member Typedef Documentation

◆ DQMStore

template<typename H, typename... Args>
typedef dqm::reco::DQMStore DQMGlobalEDAnalyzer< H, Args >::DQMStore

Definition at line 21 of file DQMGlobalEDAnalyzer.h.

◆ MonitorElement

template<typename H, typename... Args>
typedef dqm::reco::MonitorElement DQMGlobalEDAnalyzer< H, Args >::MonitorElement

Definition at line 22 of file DQMGlobalEDAnalyzer.h.

Constructor & Destructor Documentation

◆ DQMGlobalEDAnalyzer()

template<typename H, typename... Args>
DQMGlobalEDAnalyzer< H, Args >::DQMGlobalEDAnalyzer ( )
inline

Definition at line 25 of file DQMGlobalEDAnalyzer.h.

25  {
26  // for whatever reason we need the explicit `template` keyword here.
27  runToken_ = this->template produces<DQMToken, edm::Transition::EndRun>("DQMGenerationRecoRun");
28  dqmstore_ = edm::Service<DQMStore>().operator->();
29  }

Member Function Documentation

◆ accumulate()

template<typename H, typename... Args>
void DQMGlobalEDAnalyzer< H, Args >::accumulate ( edm::StreamID  id,
edm::Event const &  event,
edm::EventSetup const &  setup 
) const
inlinefinal

Definition at line 53 of file DQMGlobalEDAnalyzer.h.

53  {
54  auto const& h = *this->runCache(event.getRun().index());
56  }

◆ bookHistograms()

template<typename H, typename... Args>
virtual void DQMGlobalEDAnalyzer< H, Args >::bookHistograms ( DQMStore::IBooker ,
edm::Run const &  ,
edm::EventSetup const &  ,
H &   
) const
pure virtual

◆ dqmAnalyze()

template<typename H, typename... Args>
virtual void DQMGlobalEDAnalyzer< H, Args >::dqmAnalyze ( edm::Event const &  ,
edm::EventSetup const &  ,
H const &   
) const
pure virtual

◆ dqmBeginRun()

template<typename H, typename... Args>
virtual void DQMGlobalEDAnalyzer< H, Args >::dqmBeginRun ( edm::Run const &  ,
edm::EventSetup const &  ,
H &   
) const
inlinevirtual

◆ dqmEndRun()

template<typename H, typename... Args>
virtual void DQMGlobalEDAnalyzer< H, Args >::dqmEndRun ( edm::Run const &  ,
edm::EventSetup const &  ,
H const &   
) const
inlinevirtual

◆ globalBeginRun()

template<typename H, typename... Args>
std::shared_ptr<H> DQMGlobalEDAnalyzer< H, Args >::globalBeginRun ( edm::Run const &  run,
edm::EventSetup const &  setup 
) const
inlinefinal

Definition at line 31 of file DQMGlobalEDAnalyzer.h.

31  {
32  auto h = std::make_shared<H>();
33 
34  dqmBeginRun(run, setup, *h);
35 
36  // in case of concurrent runs, this will create clones of the already
37  // booked MEs.
39  [&, this](DQMStore::IBooker& b) {
40  // this runs while holding the DQMStore lock
41  b.cd();
42  bookHistograms(b, run, setup, *h);
43  },
44  // The run number is part of the module ID here, since we want distinct
45  // local MEs for each run cache.
46  meId(run),
47  /* canSaveByLumi */ false);
48  dqmstore_->initLumi(run.run(), /* lumi */ 0, meId(run));
49  dqmstore_->enterLumi(run.run(), /* lumi */ 0, meId(run));
50  return h;
51  }

◆ globalEndRun()

template<typename H, typename... Args>
void DQMGlobalEDAnalyzer< H, Args >::globalEndRun ( edm::Run const &  ,
edm::EventSetup const &   
) const
inlinefinal

Definition at line 67 of file DQMGlobalEDAnalyzer.h.

67 {};

◆ globalEndRunProduce()

template<typename H, typename... Args>
void DQMGlobalEDAnalyzer< H, Args >::globalEndRunProduce ( edm::Run run,
edm::EventSetup const &  setup 
) const
inlinefinal

Definition at line 58 of file DQMGlobalEDAnalyzer.h.

58  {
59  auto const& h = *this->runCache(run.index());
60  dqmEndRun(run, setup, h);
61  dqmstore_->leaveLumi(run.run(), /* lumi */ 0, meId(run));
62  run.emplace(runToken_);
63  }

◆ meId()

template<typename H, typename... Args>
uint64_t DQMGlobalEDAnalyzer< H, Args >::meId ( edm::Run const &  run) const
inlineprivate

Member Data Documentation

◆ dqmstore_

template<typename H, typename... Args>
DQMStore* DQMGlobalEDAnalyzer< H, Args >::dqmstore_
private

◆ runToken_

template<typename H, typename... Args>
edm::EDPutTokenT<DQMToken> DQMGlobalEDAnalyzer< H, Args >::runToken_
private
dqm::implementation::DQMStore::leaveLumi
void leaveLumi(edm::RunNumber_t run, edm::LuminosityBlockNumber_t lumi, uint64_t moduleID)
Definition: DQMStore.cc:492
dqm::implementation::DQMStore::initLumi
void initLumi(edm::RunNumber_t run, edm::LuminosityBlockNumber_t lumi)
Definition: DQMStore.cc:360
h
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
Definition: L1TUtmAlgorithmRcd.h:4
DQMGlobalEDAnalyzer::dqmBeginRun
virtual void dqmBeginRun(edm::Run const &, edm::EventSetup const &, H &) const
Definition: DQMGlobalEDAnalyzer.h:70
edm::global::EDProducerBase::moduleDescription
ModuleDescription const & moduleDescription() const
Definition: EDProducerBase.h:69
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
dqm::legacy::DQMStore::IBooker
dqm::implementation::IBooker IBooker
Definition: DQMStore.h:729
DQMGlobalEDAnalyzer::dqmEndRun
virtual void dqmEndRun(edm::Run const &, edm::EventSetup const &, H const &) const
Definition: DQMGlobalEDAnalyzer.h:74
h
b
double b
Definition: hdecay.h:118
DQMGlobalEDAnalyzer::dqmstore_
DQMStore * dqmstore_
Definition: DQMGlobalEDAnalyzer.h:77
edm::Service
Definition: Service.h:30
writedatasetfile.run
run
Definition: writedatasetfile.py:27
DQMGlobalEDAnalyzer::runToken_
edm::EDPutTokenT< DQMToken > runToken_
Definition: DQMGlobalEDAnalyzer.h:78
dqm::implementation::DQMStore::bookTransaction
void bookTransaction(iFunc f, uint64_t moduleId, bool canSaveByLumi)
Definition: DQMStore.h:578
DQMGlobalEDAnalyzer::dqmAnalyze
virtual void dqmAnalyze(edm::Event const &, edm::EventSetup const &, H const &) const =0
DQMGlobalEDAnalyzer::bookHistograms
virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &, H &) const =0
cond::uint64_t
unsigned long long uint64_t
Definition: Time.h:13
dqm::implementation::DQMStore::enterLumi
void enterLumi(edm::RunNumber_t run, edm::LuminosityBlockNumber_t lumi, uint64_t moduleID)
Definition: DQMStore.cc:448
event
Definition: event.py:1
DQMGlobalEDAnalyzer::meId
uint64_t meId(edm::Run const &run) const
Definition: DQMGlobalEDAnalyzer.h:79
edm::ModuleDescription::id
unsigned int id() const
Definition: ModuleDescription.h:46