CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
DaqTestHistograms Class Reference
Inheritance diagram for DaqTestHistograms:
DQMGlobalEDAnalyzer< RunBasedHistograms > DQMGlobalEDAnalyzerBase< RunBasedHistograms, Args... > edm::global::EDProducer< edm::RunCache< RunBasedHistograms >, edm::EndRunProducer, edm::Accumulator, Args... > edm::global::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 DaqTestHistograms (edm::ParameterSet const &)
 
 ~DaqTestHistograms () override=default
 
- Public Member Functions inherited from DQMGlobalEDAnalyzer< RunBasedHistograms >
virtual void dqmEndRun (edm::Run const &, edm::EventSetup const &, RunBasedHistograms const &) const
 
void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup) const final
 
- Public Member Functions inherited from DQMGlobalEDAnalyzerBase< RunBasedHistograms, Args... >
void accumulate (edm::StreamID id, edm::Event const &event, edm::EventSetup const &setup) const final
 
 DQMGlobalEDAnalyzerBase ()
 
std::shared_ptr< RunBasedHistograms > globalBeginRun (edm::Run const &run, edm::EventSetup const &setup) const final
 
void globalEndRun (edm::Run const &, edm::EventSetup const &) const final
 
- Public Member Functions inherited from edm::global::EDProducer< edm::RunCache< RunBasedHistograms >, edm::EndRunProducer, edm::Accumulator, Args... >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () 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 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 Public Member Functions inherited from edm::global::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &, RunBasedHistograms &) const override
 
void dqmAnalyze (edm::Event const &, edm::EventSetup const &, RunBasedHistograms const &) const override
 
void dqmBeginRun (edm::Run const &, edm::EventSetup const &, RunBasedHistograms &) const override
 

Private Attributes

const std::string m_dqm_path
 
const uint32_t m_lumisections_range
 
const uint32_t m_num_histograms
 

Additional Inherited Members

- Public Types inherited from DQMGlobalEDAnalyzerBase< RunBasedHistograms, Args... >
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
template<typename T >
using BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T >
 
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 DQMGlobalEDAnalyzerBase< RunBasedHistograms, Args... >
uint64_t meId (edm::Run const &run) const
 
- Protected Member Functions inherited from edm::ProducerBase
template<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
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)
 
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 ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
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 DQMGlobalEDAnalyzerBase< RunBasedHistograms, Args... >
DQMStoredqmstore_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 28 of file DaqTestHistograms.cc.

Constructor & Destructor Documentation

◆ DaqTestHistograms()

DaqTestHistograms::DaqTestHistograms ( edm::ParameterSet const &  config)
explicit

Definition at line 57 of file DaqTestHistograms.cc.

58  : // module configuration
59  m_dqm_path(config.getUntrackedParameter<std::string>("dqmPath")),
60  m_lumisections_range(config.getUntrackedParameter<uint32_t>("lumisectionRange")),
61  m_num_histograms(config.getUntrackedParameter<uint32_t>("numberOfHistograms")) {}
const std::string m_dqm_path
const uint32_t m_num_histograms
Definition: config.py:1
const uint32_t m_lumisections_range

◆ ~DaqTestHistograms()

DaqTestHistograms::~DaqTestHistograms ( )
overridedefault

Member Function Documentation

◆ bookHistograms()

void DaqTestHistograms::bookHistograms ( DQMStore::IBooker booker,
edm::Run const &  run,
edm::EventSetup const &  setup,
RunBasedHistograms &  histograms 
) const
overrideprivatevirtual

Implements DQMGlobalEDAnalyzerBase< RunBasedHistograms, Args... >.

Definition at line 69 of file DaqTestHistograms.cc.

References dqm::implementation::IBooker::book1D(), mps_fire::i, m_dqm_path, m_lumisections_range, and dqm::implementation::NavigatorBase::setCurrentFolder().

72  {
73  // book the overall event count and event types histograms
75  histograms.events_processed = booker.book1D(
76  "events", "Processed events vs. lumisection", m_lumisections_range + 1, -0.5, m_lumisections_range + 0.5);
77  for (size_t i = 0; i < histograms.element_array.size(); i++) {
78  std::stringstream strs;
79  strs << "element " << i;
80  std::stringstream strs2;
81  strs2 << "e vs ls " << i;
82  histograms.element_array[i] =
83  booker.book1D(strs.str(), strs2.str(), m_lumisections_range + 1, -0.5, m_lumisections_range + 0.5);
84  }
85 }
const std::string m_dqm_path
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
const uint32_t m_lumisections_range

◆ dqmAnalyze()

void DaqTestHistograms::dqmAnalyze ( edm::Event const &  event,
edm::EventSetup const &  setup,
RunBasedHistograms const &  histograms 
) const
overrideprivatevirtual

Implements DQMGlobalEDAnalyzerBase< RunBasedHistograms, Args... >.

Definition at line 87 of file DaqTestHistograms.cc.

References mps_fire::i.

89  {
90  unsigned int lumisection = event.luminosityBlock();
91 
92  histograms.events_processed->Fill(lumisection);
93  for (size_t i = 0; i < histograms.element_array.size(); i++) {
94  histograms.element_array[i]->Fill(lumisection);
95  }
96 }

◆ dqmBeginRun()

void DaqTestHistograms::dqmBeginRun ( edm::Run const &  run,
edm::EventSetup const &  setup,
RunBasedHistograms &  histograms 
) const
overrideprivatevirtual

Reimplemented from DQMGlobalEDAnalyzerBase< RunBasedHistograms, Args... >.

Definition at line 63 of file DaqTestHistograms.cc.

References m_num_histograms.

65  {
66  histograms.element_array.resize(m_num_histograms);
67 }
const uint32_t m_num_histograms

◆ fillDescriptions()

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

Definition at line 49 of file DaqTestHistograms.cc.

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

49  {
51  desc.addUntracked<std::string>("dqmPath", "DAQTEST/Test");
52  desc.addUntracked<uint32_t>("lumisectionRange", 25);
53  desc.addUntracked<uint32_t>("numberOfHistograms", 10);
54  descriptions.add("dqmHLTTestMonitor", desc);
55 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

Member Data Documentation

◆ m_dqm_path

const std::string DaqTestHistograms::m_dqm_path
private

Definition at line 44 of file DaqTestHistograms.cc.

Referenced by bookHistograms().

◆ m_lumisections_range

const uint32_t DaqTestHistograms::m_lumisections_range
private

Definition at line 45 of file DaqTestHistograms.cc.

Referenced by bookHistograms().

◆ m_num_histograms

const uint32_t DaqTestHistograms::m_num_histograms
private

Definition at line 46 of file DaqTestHistograms.cc.

Referenced by dqmBeginRun().