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:
one::DQMEDAnalyzer< T > one::dqmimplementation::DQMBaseClass< T... >

Public Member Functions

 EventShapeDQM (const edm::ParameterSet &ps)
 
 ~EventShapeDQM () override
 
- Public Member Functions inherited from one::DQMEDAnalyzer< T >
 DQMEDAnalyzer ()=default
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > &&)=delete
 
 ~DQMEDAnalyzer () override=default
 

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
 

Private Attributes

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

Detailed Description

Definition at line 23 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().

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

Referenced by EventShapeDQM().

Member Function Documentation

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

Definition at line 32 of file EventShapeDQM.cc.

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

33 {
34 
36  e.getByToken(triggerResults_,hltresults);
37  if(!hltresults.isValid())
38  {
39  return;
40  }
41 
42  bool hasFired = false;
43  const edm::TriggerNames& trigNames = e.triggerNames(*hltresults);
44  unsigned int numTriggers = trigNames.size();
45  for( unsigned int hltIndex=0; hltIndex<numTriggers; ++hltIndex ) {
46  if (trigNames.triggerName(hltIndex).find(triggerPath_) != std::string::npos && hltresults->wasrun(hltIndex) && hltresults->accept(hltIndex)){
47  hasFired = true;
48  }
49  }
50 
52  e.getByToken(theEPCollection_, ep_);
53  if ( !ep_.isValid() ) {
54  return;
55  }
56 
57  if ( hasFired ) {
58  h_Q->Fill( (*ep_)[EPidx_].vn(EPlvl_) );
59  }
60 
61 }
bool wasrun() const
Was at least one path run?
MonitorElement * h_Q
Definition: EventShapeDQM.h:42
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:36
bool isValid() const
Definition: HandleBase.h:74
static const char *const trigNames[]
Definition: EcalDumpRaw.cc:74
std::string const & triggerName(unsigned int index) const
Definition: TriggerNames.cc:22
edm::EDGetTokenT< reco::EvtPlaneCollection > theEPCollection_
Definition: EventShapeDQM.h:34
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
Definition: EventShapeDQM.h:33
void EventShapeDQM::bookHistograms ( DQMStore::IBooker ibooker_,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotected

Definition at line 22 of file EventShapeDQM.cc.

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

23 {
24  ibooker_.cd();;
25  ibooker_.setCurrentFolder("HLT/HI/" + triggerPath_);
26 
27  h_Q = ibooker_.book1D("hQn", Form("Q%i;Q%i", order_, order_), 500, 0, 0.5);
28 
29  ibooker_.cd();
30 }
MonitorElement * h_Q
Definition: EventShapeDQM.h:42
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
std::string triggerPath_
Definition: EventShapeDQM.h:36
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106

Member Data Documentation

int EventShapeDQM::EPidx_
private

Definition at line 38 of file EventShapeDQM.h.

Referenced by analyze(), and EventShapeDQM().

int EventShapeDQM::EPlvl_
private

Definition at line 39 of file EventShapeDQM.h.

Referenced by analyze(), and EventShapeDQM().

MonitorElement* EventShapeDQM::h_Q
private

Definition at line 42 of file EventShapeDQM.h.

Referenced by analyze(), and bookHistograms().

int EventShapeDQM::order_
private

Definition at line 37 of file EventShapeDQM.h.

Referenced by bookHistograms(), and EventShapeDQM().

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

Definition at line 34 of file EventShapeDQM.h.

Referenced by analyze(), and EventShapeDQM().

std::string EventShapeDQM::triggerPath_
private

Definition at line 36 of file EventShapeDQM.h.

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

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

Definition at line 33 of file EventShapeDQM.h.

Referenced by analyze(), and EventShapeDQM().