CMS 3D CMS Logo

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

#include <DQMServices/Demo/plugins/DemoOneDQMEDAnalyzer.cc>

Inheritance diagram for DemoOneDQMEDAnalyzer:
DQMOneEDAnalyzer<> edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 DemoOneDQMEDAnalyzer (const edm::ParameterSet &)
 
 ~DemoOneDQMEDAnalyzer () override
 
- Public Member Functions inherited from DQMOneEDAnalyzer<>
void accumulate (edm::Event const &event, edm::EventSetup const &setup) override
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
 DQMOneEDAnalyzer ()
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... >
 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)
 

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)
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 

Private Attributes

int eventCount_ = 0
 
MonitorElementexample2D_
 
MonitorElementexample3D_
 
MonitorElementexample_
 
MonitorElementexampleTProfile2D_
 
MonitorElementexampleTProfile_
 
std::string folder_
 

Additional Inherited Members

- Public Types inherited from DQMOneEDAnalyzer<>
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::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 DQMOneEDAnalyzer<>
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
virtual void dqmEndRun (edm::Run const &, edm::EventSetup const &)
 
- 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 Attributes inherited from DQMOneEDAnalyzer<>
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Description: [one line class summary]

Implementation: [Notes on implementation]

Definition at line 28 of file DemoOneDQMEDAnalyzer.cc.

Constructor & Destructor Documentation

◆ DemoOneDQMEDAnalyzer()

DemoOneDQMEDAnalyzer::DemoOneDQMEDAnalyzer ( const edm::ParameterSet iConfig)
explicit

Definition at line 49 of file DemoOneDQMEDAnalyzer.cc.

50  : folder_(iConfig.getParameter<std::string>("folder")) {
51  // now do what ever initialization is needed
52 }

◆ ~DemoOneDQMEDAnalyzer()

DemoOneDQMEDAnalyzer::~DemoOneDQMEDAnalyzer ( )
override

Definition at line 54 of file DemoOneDQMEDAnalyzer.cc.

54  {
55  // do anything here that needs to be done at desctruction time
56  // (e.g. close files, deallocate resources etc.)
57 }

Member Function Documentation

◆ analyze()

void DemoOneDQMEDAnalyzer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from DQMOneEDAnalyzer<>.

Definition at line 60 of file DemoOneDQMEDAnalyzer.cc.

60  {
61  using namespace edm;
62 
63  eventCount_++;
64 
65  example_->Fill(5);
70 }

References eventCount_, example2D_, example3D_, example_, exampleTProfile2D_, exampleTProfile_, f, and dqm::impl::MonitorElement::Fill().

◆ bookHistograms()

void DemoOneDQMEDAnalyzer::bookHistograms ( DQMStore::IBooker ibook,
edm::Run const &  run,
edm::EventSetup const &  iSetup 
)
overrideprivatevirtual

Implements DQMOneEDAnalyzer<>.

Definition at line 72 of file DemoOneDQMEDAnalyzer.cc.

74  {
76 
77  example_ = ibook.book1D("EXAMPLE", "Example 1D", 20, 0., 10.);
78  example2D_ = ibook.book2D("EXAMPLE_2D", "Example 2D", 20, 0, 20, 15, 0, 15);
79  example3D_ = ibook.book3D("EXAMPLE_3D", "Example 3D", 20, 0, 20, 15, 0, 15, 25, 0, 25);
80  exampleTProfile_ = ibook.bookProfile("EXAMPLE_TPROFILE", "Example TProfile", 20, 0, 20, 15, 0, 15);
81  exampleTProfile2D_ = ibook.bookProfile2D("EXAMPLE_TPROFILE2D", "Example TProfile 2D", 20, 0, 20, 15, 0, 15, 0, 100);
82 }

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), dqm::implementation::IBooker::book3D(), dqm::implementation::IBooker::bookProfile(), dqm::implementation::IBooker::bookProfile2D(), example2D_, example3D_, example_, exampleTProfile2D_, exampleTProfile_, folder_, and dqm::implementation::NavigatorBase::setCurrentFolder().

◆ fillDescriptions()

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

Definition at line 85 of file DemoOneDQMEDAnalyzer.cc.

85  {
87  desc.add<std::string>("folder", "MY_FOLDER");
88  descriptions.add("demoone", desc);
89 }

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, and AlCaHLTBitMon_QueryRunRegistry::string.

Member Data Documentation

◆ eventCount_

int DemoOneDQMEDAnalyzer::eventCount_ = 0
private

Definition at line 46 of file DemoOneDQMEDAnalyzer.cc.

Referenced by analyze().

◆ example2D_

MonitorElement* DemoOneDQMEDAnalyzer::example2D_
private

Definition at line 42 of file DemoOneDQMEDAnalyzer.cc.

Referenced by analyze(), and bookHistograms().

◆ example3D_

MonitorElement* DemoOneDQMEDAnalyzer::example3D_
private

Definition at line 43 of file DemoOneDQMEDAnalyzer.cc.

Referenced by analyze(), and bookHistograms().

◆ example_

MonitorElement* DemoOneDQMEDAnalyzer::example_
private

Definition at line 41 of file DemoOneDQMEDAnalyzer.cc.

Referenced by analyze(), and bookHistograms().

◆ exampleTProfile2D_

MonitorElement* DemoOneDQMEDAnalyzer::exampleTProfile2D_
private

Definition at line 45 of file DemoOneDQMEDAnalyzer.cc.

Referenced by analyze(), and bookHistograms().

◆ exampleTProfile_

MonitorElement* DemoOneDQMEDAnalyzer::exampleTProfile_
private

Definition at line 44 of file DemoOneDQMEDAnalyzer.cc.

Referenced by analyze(), and bookHistograms().

◆ folder_

std::string DemoOneDQMEDAnalyzer::folder_
private

Definition at line 40 of file DemoOneDQMEDAnalyzer.cc.

Referenced by bookHistograms().

DemoOneDQMEDAnalyzer::example_
MonitorElement * example_
Definition: DemoOneDQMEDAnalyzer.cc:41
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
DemoOneDQMEDAnalyzer::eventCount_
int eventCount_
Definition: DemoOneDQMEDAnalyzer.cc:46
edm
HLT enums.
Definition: AlignableModifier.h:19
dqm::implementation::IBooker::bookProfile2D
MonitorElement * bookProfile2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, double lowZ, double highZ, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:399
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
DemoOneDQMEDAnalyzer::exampleTProfile2D_
MonitorElement * exampleTProfile2D_
Definition: DemoOneDQMEDAnalyzer.cc:45
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
dqm::implementation::IBooker::bookProfile
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
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DemoOneDQMEDAnalyzer::folder_
std::string folder_
Definition: DemoOneDQMEDAnalyzer.cc:40
DemoOneDQMEDAnalyzer::exampleTProfile_
MonitorElement * exampleTProfile_
Definition: DemoOneDQMEDAnalyzer.cc:44
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
DemoOneDQMEDAnalyzer::example2D_
MonitorElement * example2D_
Definition: DemoOneDQMEDAnalyzer.cc:42
dqm::implementation::IBooker::book2D
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
dqm::implementation::IBooker::book3D
MonitorElement * book3D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, FUNC onbooking=NOOP())
Definition: DQMStore.h:290
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
DemoOneDQMEDAnalyzer::example3D_
MonitorElement * example3D_
Definition: DemoOneDQMEDAnalyzer.cc:43
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98