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 > edm::global::EDAnalyzer< edm::RunCache< RunBasedHistograms >, Args... > edm::global::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 DaqTestHistograms (edm::ParameterSet const &)
 
 ~DaqTestHistograms () override=default
 
- Public Member Functions inherited from edm::global::EDAnalyzer< edm::RunCache< RunBasedHistograms >, Args... >
 EDAnalyzer ()=default
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDAnalyzerBase () 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
 
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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
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::global::EDAnalyzerBase
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 DQMGlobalEDAnalyzer< RunBasedHistograms >
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::global::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
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<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)
 

Detailed Description

Definition at line 28 of file DaqTestHistograms.cc.

Constructor & Destructor Documentation

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 ( )
overridedefault

Member Function Documentation

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

Implements DQMGlobalEDAnalyzer< RunBasedHistograms >.

Definition at line 69 of file DaqTestHistograms.cc.

References dqm::dqmstoreimpl::DQMStore::IBooker::book1D(), mps_fire::i, m_dqm_path, m_lumisections_range, and dqm::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder().

72  {
73  // book the overall event count and event types histograms
74  booker.setCurrentFolder(m_dqm_path);
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
const uint32_t m_lumisections_range
void DaqTestHistograms::dqmAnalyze ( edm::Event const &  event,
edm::EventSetup const &  setup,
RunBasedHistograms const &  histograms 
) const
overrideprivate

Definition at line 87 of file DaqTestHistograms.cc.

References DEFINE_FWK_MODULE, and 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 }
void DaqTestHistograms::dqmBeginRun ( edm::Run const &  run,
edm::EventSetup const &  setup,
RunBasedHistograms &  histograms 
) const
overrideprivatevirtual

Reimplemented from DQMGlobalEDAnalyzer< RunBasedHistograms >.

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
void DaqTestHistograms::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 49 of file DaqTestHistograms.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::addUntracked(), 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 }
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)

Member Data Documentation

const std::string DaqTestHistograms::m_dqm_path
private

Definition at line 44 of file DaqTestHistograms.cc.

Referenced by bookHistograms().

const uint32_t DaqTestHistograms::m_lumisections_range
private

Definition at line 45 of file DaqTestHistograms.cc.

Referenced by bookHistograms().

const uint32_t DaqTestHistograms::m_num_histograms
private

Definition at line 46 of file DaqTestHistograms.cc.

Referenced by dqmBeginRun().