CMS 3D CMS Logo

EventShapeDQM.cc
Go to the documentation of this file.
7 
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 }
17 
19 
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 }
29 
30 void EventShapeDQM::analyze(edm::Event const& e, edm::EventSetup const& eSetup) {
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 }
57 
EventShapeDQM::analyze
void analyze(edm::Event const &e, edm::EventSetup const &eSetup) override
Definition: EventShapeDQM.cc:30
EventShapeDQM::triggerResults_
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
Definition: EventShapeDQM.h:32
MessageLogger.h
trigNames
static const char *const trigNames[]
Definition: EcalDumpRaw.cc:57
HLTBitAnalyser_cfi.hltresults
hltresults
Definition: HLTBitAnalyser_cfi.py:13
edm::Run
Definition: Run.h:45
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 >
MakerMacros.h
EventShapeDQM::order_
int order_
Definition: EventShapeDQM.h:36
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
EventShapeDQM::EventShapeDQM
EventShapeDQM(const edm::ParameterSet &ps)
Definition: EventShapeDQM.cc:8
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
dqm::implementation::NavigatorBase::cd
virtual void cd()
Definition: DQMStore.cc:29
EventShapeDQM::~EventShapeDQM
~EventShapeDQM() override
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
TriggerNames.h
EventShapeDQM
Definition: EventShapeDQM.h:22
edm::EventSetup
Definition: EventSetup.h:57
TriggerObject.h
EventShapeDQM::h_Q
MonitorElement * h_Q
Definition: EventShapeDQM.h:41
EventShapeDQM.h
Frameworkfwd.h
edm::TriggerNames
Definition: TriggerNames.h:55
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
dqm::implementation::IBooker
Definition: DQMStore.h:43
EventShapeDQM::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: EventShapeDQM.cc:20
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
edm::Event
Definition: Event.h:73
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