CMS 3D CMS Logo

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

#include <MonitorLTC.h>

Inheritance diagram for MonitorLTC:
one::DQMEDAnalyzer< T > one::dqmimplementation::DQMBaseClass< T... >

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
 MonitorLTC (const edm::ParameterSet &)
 
 ~MonitorLTC () override
 
- Public Member Functions inherited from one::DQMEDAnalyzer< T >
 DQMEDAnalyzer ()=default
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > &&)=delete
 
 ~DQMEDAnalyzer () override=default
 

Private Attributes

edm::ParameterSet conf_
 
std::string HLTDirectory
 
edm::EDGetTokenT< LTCDigiCollectionltcDigiCollectionTagToken_
 
MonitorElementLTCTriggerDecision_all
 

Detailed Description

Definition at line 26 of file MonitorLTC.h.

Constructor & Destructor Documentation

MonitorLTC::MonitorLTC ( const edm::ParameterSet iConfig)
explicit

Definition at line 17 of file MonitorLTC.cc.

References conf_, edm::ParameterSet::getParameter(), HLTDirectory, and ltcDigiCollectionTagToken_.

21 {
22  HLTDirectory = "HLTResults";
23  conf_ = iConfig;
24 
25  ltcDigiCollectionTagToken_ = consumes<LTCDigiCollection>(
26  conf_.getParameter<edm::InputTag>("ltcDigiCollectionTag"));
27 }
T getParameter(std::string const &) const
std::string HLTDirectory
Definition: MonitorLTC.h:39
edm::EDGetTokenT< LTCDigiCollection > ltcDigiCollectionTagToken_
Definition: MonitorLTC.h:41
edm::ParameterSet conf_
Definition: MonitorLTC.h:35
MonitorLTC::~MonitorLTC ( )
inlineoverride

Definition at line 29 of file MonitorLTC.h.

References analyze(), and bookHistograms().

29 {};

Member Function Documentation

void MonitorLTC::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 50 of file MonitorLTC.cc.

References MonitorElement::Fill(), edm::Event::getByToken(), ltcDigiCollectionTagToken_, and LTCTriggerDecision_all.

Referenced by ~MonitorLTC().

51  {
53  iEvent.getByToken(ltcDigiCollectionTagToken_, ltcdigis);
54  // unsigned int ltc_run;
55  // unsigned int ltc_event;
56  // unsigned int ltc_triggerNumber;
57  // unsigned int ltc_mask; // eight bits
58  // unsigned long long int ltc_gpstime;
59  // unsigned int ltc_orbit;
60  // unsigned int ltc_bunch;
61  // unsigned int ltc_inhibit;
62  for (LTCDigiCollection::const_iterator ltcdigiItr = ltcdigis->begin();
63  ltcdigiItr != ltcdigis->end(); ++ltcdigiItr) {
64  // ltc_run = ltcdigiItr->runNumber();
65  // ltc_event = ltcdigiItr->eventNumber();
66  // ltc_triggerNumber = ltcdigiItr->eventID();
67  // ltc_bunch = ltcdigiItr->bunchNumber();
68  // ltc_orbit = ltcdigiItr->orbitNumber();
69  // ltc_inhibit = ltcdigiItr->triggerInhibitNumber();
70  // ltc_mask = (unsigned int)(ltcdigiItr->externTriggerMask());
71  // ltc_gpstime = ltcdigiItr->bstGpsTime();
72  for (int ibit = 0; ibit < 7; ++ibit) {
73  if (ltcdigiItr->HasTriggered(ibit)) {
74  LTCTriggerDecision_all->Fill(ibit, 1.);
75  }
76  }
77  //
78  // std::cout << "XXX: "
79  // << ltcdigiItr->runNumber() << " "
80  // << ltcdigiItr->eventNumber() << " "
81  // << ltcdigiItr->bunchNumber() << " "
82  // << ltcdigiItr->orbitNumber() << " "
83  // << "0x" << std::hex
84  // << int(ltcdigiItr->externTriggerMask()) << " "
85  // << std::dec
86  // << ltcdigiItr->triggerInhibitNumber() << " "
87  // << ltcdigiItr->bstGpsTime() << " "
88  // << std::endl;
89  // std::cout << (*ltcdigiItr) << std::endl;
90  }
91 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
MonitorElement * LTCTriggerDecision_all
Definition: MonitorLTC.h:37
void Fill(long long x)
edm::EDGetTokenT< LTCDigiCollection > ltcDigiCollectionTagToken_
Definition: MonitorLTC.h:41
void MonitorLTC::bookHistograms ( DQMStore::IBooker ,
edm::Run const &  ,
edm::EventSetup const &   
)
override

Definition at line 29 of file MonitorLTC.cc.

References DQMStore::IBooker::book1D(), conf_, edm::ParameterSet::getParameter(), HLTDirectory, LTCTriggerDecision_all, MonitorElement::setBinLabel(), DQMStore::IBooker::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by ~MonitorLTC().

30  {
31  ibooker.setCurrentFolder(HLTDirectory);
32  // 0 DT
33  // 1 CSC
34  // 2 RBC1 (RPC techn. cosmic trigger for wheel +1, sector 10)
35  // 3 RBC2 (RPC techn. cosmic trigger for wheel +2, sector 10)
36  // 4 RPCTB (RPC Trigger Board trigger, covering both sectors 10 of both
37  // wheels, but with different geometrical acceptance ("pointing")) 5 unused
38  // edm::CurrentProcessingContext const* current_processing_context =
39  // currentContext(); std::string const* the_label = moduleLabel();
40  std::string the_label = conf_.getParameter<std::string>("@module_label");
41  std::string ltctitle = the_label + "_LTCTriggerDecision";
42  LTCTriggerDecision_all = ibooker.book1D(ltctitle, ltctitle, 8, -0.5, 7.5);
48 }
T getParameter(std::string const &) const
MonitorElement * LTCTriggerDecision_all
Definition: MonitorLTC.h:37
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
std::string HLTDirectory
Definition: MonitorLTC.h:39
edm::ParameterSet conf_
Definition: MonitorLTC.h:35

Member Data Documentation

edm::ParameterSet MonitorLTC::conf_
private

Definition at line 35 of file MonitorLTC.h.

Referenced by bookHistograms(), and MonitorLTC().

std::string MonitorLTC::HLTDirectory
private

Definition at line 39 of file MonitorLTC.h.

Referenced by bookHistograms(), and MonitorLTC().

edm::EDGetTokenT<LTCDigiCollection> MonitorLTC::ltcDigiCollectionTagToken_
private

Definition at line 41 of file MonitorLTC.h.

Referenced by analyze(), and MonitorLTC().

MonitorElement* MonitorLTC::LTCTriggerDecision_all
private

Definition at line 37 of file MonitorLTC.h.

Referenced by analyze(), and bookHistograms().