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::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

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
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

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 DQMEDAnalyzer
uint64_t meId () const
 

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::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 22 of file EventShapeDQM.h.

Constructor & Destructor Documentation

◆ EventShapeDQM()

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

Definition at line 8 of file EventShapeDQM.cc.

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 }

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

◆ ~EventShapeDQM()

EventShapeDQM::~EventShapeDQM ( )
overridedefault

Member Function Documentation

◆ analyze()

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

Reimplemented from DQMEDAnalyzer.

Definition at line 30 of file EventShapeDQM.cc.

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 }

References MillePedeFileConverter_cfg::e, EPidx_, EPlvl_, dqm::impl::MonitorElement::Fill(), h_Q, HLTBitAnalyser_cfi::hltresults, edm::HandleBase::isValid(), theEPCollection_, triggerPath_, triggerResults_, and trigNames.

◆ bookHistograms()

void EventShapeDQM::bookHistograms ( DQMStore::IBooker ibooker_,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 20 of file EventShapeDQM.cc.

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 }

References dqm::implementation::IBooker::book1D(), dqm::implementation::NavigatorBase::cd(), h_Q, order_, dqm::implementation::NavigatorBase::setCurrentFolder(), and triggerPath_.

Member Data Documentation

◆ EPidx_

int EventShapeDQM::EPidx_
private

Definition at line 37 of file EventShapeDQM.h.

Referenced by analyze(), and EventShapeDQM().

◆ EPlvl_

int EventShapeDQM::EPlvl_
private

Definition at line 38 of file EventShapeDQM.h.

Referenced by analyze(), and EventShapeDQM().

◆ h_Q

MonitorElement* EventShapeDQM::h_Q
private

Definition at line 41 of file EventShapeDQM.h.

Referenced by analyze(), and bookHistograms().

◆ order_

int EventShapeDQM::order_
private

Definition at line 36 of file EventShapeDQM.h.

Referenced by bookHistograms(), and EventShapeDQM().

◆ theEPCollection_

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

Definition at line 33 of file EventShapeDQM.h.

Referenced by analyze(), and EventShapeDQM().

◆ triggerPath_

std::string EventShapeDQM::triggerPath_
private

Definition at line 35 of file EventShapeDQM.h.

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

◆ triggerResults_

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

Definition at line 32 of file EventShapeDQM.h.

Referenced by analyze(), and EventShapeDQM().

EventShapeDQM::triggerResults_
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
Definition: EventShapeDQM.h:32
trigNames
static const char *const trigNames[]
Definition: EcalDumpRaw.cc:57
HLTBitAnalyser_cfi.hltresults
hltresults
Definition: HLTBitAnalyser_cfi.py:13
EventShapeDQM::EPidx_
int EPidx_
Definition: EventShapeDQM.h:37
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
EventShapeDQM::EPlvl_
int EPlvl_
Definition: EventShapeDQM.h:38
EventShapeDQM::theEPCollection_
edm::EDGetTokenT< reco::EvtPlaneCollection > theEPCollection_
Definition: EventShapeDQM.h:33
edm::Handle< edm::TriggerResults >
EventShapeDQM::order_
int order_
Definition: EventShapeDQM.h:36
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
dqm::implementation::NavigatorBase::cd
virtual void cd()
Definition: DQMStore.cc:29
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EventShapeDQM::h_Q
MonitorElement * h_Q
Definition: EventShapeDQM.h:41
edm::TriggerNames
Definition: TriggerNames.h:55
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
EventShapeDQM::triggerPath_
std::string triggerPath_
Definition: EventShapeDQM.h:35
edm::InputTag
Definition: InputTag.h:15
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
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37