CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Attributes
EventShapeDQM Class Reference

#include <EventShapeDQM.h>

Inheritance diagram for EventShapeDQM:
DQMEDAnalyzer edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 EventShapeDQM (const edm::ParameterSet &ps)
 
 ~EventShapeDQM () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual void dqmBeginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
virtual void dqmEndLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmEndRun (edm::Run const &, edm::EventSetup const &)
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
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::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () 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
 
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)
 
 ~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
 
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)
 

Protected Member Functions

void analyze (edm::Event const &e, edm::EventSetup const &eSetup) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
- Protected Member Functions inherited from edm::ProducerBase
ProducesCollector producesCollector ()
 
- 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)
 

Private Attributes

int EPidx_
 
int EPlvl_
 
MonitorElementh_Q
 
int order_
 
edm::EDGetTokenT< reco::EvtPlaneCollectiontheEPCollection_
 
std::string triggerPath_
 
edm::EDGetTokenT< edm::TriggerResultstriggerResults_
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
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
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 22 of file EventShapeDQM.h.

Constructor & Destructor Documentation

EventShapeDQM::EventShapeDQM ( const edm::ParameterSet ps)

Definition at line 8 of file EventShapeDQM.cc.

References EPidx_, EPlvl_, edm::ParameterSet::getParameter(), order_, AlCaHLTBitMon_QueryRunRegistry::string, theEPCollection_, triggerPath_, triggerResults_, and ~EventShapeDQM().

8  {
9  triggerResults_ = consumes<edm::TriggerResults>(ps.getParameter<edm::InputTag>("triggerResults"));
10  theEPCollection_ = consumes<reco::EvtPlaneCollection>(ps.getParameter<edm::InputTag>("EPlabel"));
11  triggerPath_ = ps.getParameter<std::string>("triggerPath");
12 
13  order_ = ps.getParameter<int>("order");
14  EPidx_ = ps.getParameter<int>("EPidx");
15  EPlvl_ = ps.getParameter<int>("EPlvl");
16 }
T getParameter(std::string const &) const
std::string triggerPath_
Definition: EventShapeDQM.h:35
edm::EDGetTokenT< reco::EvtPlaneCollection > theEPCollection_
Definition: EventShapeDQM.h:33
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
Definition: EventShapeDQM.h:32
EventShapeDQM::~EventShapeDQM ( )
overridedefault

Referenced by EventShapeDQM().

Member Function Documentation

void EventShapeDQM::analyze ( edm::Event const &  e,
edm::EventSetup const &  eSetup 
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 30 of file EventShapeDQM.cc.

References edm::HLTGlobalStatus::accept(), DEFINE_FWK_MODULE, EPidx_, EPlvl_, dqm::impl::MonitorElement::Fill(), edm::Event::getByToken(), h_Q, HLTBitAnalyser_cfi::hltresults, edm::HandleBase::isValid(), edm::TriggerNames::size(), theEPCollection_, edm::TriggerNames::triggerName(), edm::Event::triggerNames(), triggerPath_, triggerResults_, trigNames, and edm::HLTGlobalStatus::wasrun().

30  {
32  e.getByToken(triggerResults_, hltresults);
33  if (!hltresults.isValid()) {
34  return;
35  }
36 
37  bool hasFired = false;
38  const edm::TriggerNames& trigNames = e.triggerNames(*hltresults);
39  unsigned int numTriggers = trigNames.size();
40  for (unsigned int hltIndex = 0; hltIndex < numTriggers; ++hltIndex) {
41  if (trigNames.triggerName(hltIndex).find(triggerPath_) != std::string::npos && hltresults->wasrun(hltIndex) &&
42  hltresults->accept(hltIndex)) {
43  hasFired = true;
44  }
45  }
46 
48  e.getByToken(theEPCollection_, ep_);
49  if (!ep_.isValid()) {
50  return;
51  }
52 
53  if (hasFired) {
54  h_Q->Fill((*ep_)[EPidx_].vn(EPlvl_));
55  }
56 }
bool wasrun() const
Was at least one path run?
MonitorElement * h_Q
Definition: EventShapeDQM.h:41
bool accept() const
Has at least one path accepted the event?
Strings::size_type size() const
Definition: TriggerNames.cc:31
void Fill(long long x)
std::string triggerPath_
Definition: EventShapeDQM.h:35
bool isValid() const
Definition: HandleBase.h:70
static const char *const trigNames[]
Definition: EcalDumpRaw.cc:57
std::string const & triggerName(unsigned int index) const
Definition: TriggerNames.cc:22
edm::EDGetTokenT< reco::EvtPlaneCollection > theEPCollection_
Definition: EventShapeDQM.h:33
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
Definition: EventShapeDQM.h:32
void EventShapeDQM::bookHistograms ( DQMStore::IBooker ibooker_,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 20 of file EventShapeDQM.cc.

References dqm::dqmstoreimpl::DQMStore::IBooker::book1D(), dqm::dqmstoreimpl::DQMStore::IBooker::cd(), h_Q, order_, dqm::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder(), and triggerPath_.

20  {
21  ibooker_.cd();
22  ;
23  ibooker_.setCurrentFolder("HLT/HI/" + triggerPath_);
24 
25  h_Q = ibooker_.book1D("hQn", Form("Q%i;Q%i", order_, order_), 500, 0, 0.5);
26 
27  ibooker_.cd();
28 }
MonitorElement * h_Q
Definition: EventShapeDQM.h:41
std::string triggerPath_
Definition: EventShapeDQM.h:35

Member Data Documentation

int EventShapeDQM::EPidx_
private

Definition at line 37 of file EventShapeDQM.h.

Referenced by analyze(), and EventShapeDQM().

int EventShapeDQM::EPlvl_
private

Definition at line 38 of file EventShapeDQM.h.

Referenced by analyze(), and EventShapeDQM().

MonitorElement* EventShapeDQM::h_Q
private

Definition at line 41 of file EventShapeDQM.h.

Referenced by analyze(), and bookHistograms().

int EventShapeDQM::order_
private

Definition at line 36 of file EventShapeDQM.h.

Referenced by bookHistograms(), and EventShapeDQM().

edm::EDGetTokenT<reco::EvtPlaneCollection> EventShapeDQM::theEPCollection_
private

Definition at line 33 of file EventShapeDQM.h.

Referenced by analyze(), and EventShapeDQM().

std::string EventShapeDQM::triggerPath_
private

Definition at line 35 of file EventShapeDQM.h.

Referenced by analyze(), bookHistograms(), and EventShapeDQM().

edm::EDGetTokenT<edm::TriggerResults> EventShapeDQM::triggerResults_
private

Definition at line 32 of file EventShapeDQM.h.

Referenced by analyze(), and EventShapeDQM().