CMS 3D CMS Logo

MonitorLTC.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: SiStripMonitorCluster
4 // Class: MonitorLTC
5 //
6 // class MonitorLTC MonitorLTC.cc DQM/SiStripMonitorCluster/src/MonitorLTC.cc
7 
8 #include <vector>
9 #include <iostream>
10 #include <numeric>
11 
15 
17 // ltcDigiCollectionTag_(iConfig.getParameter<edm::InputTag>("ltcDigiCollectionTag"))
18 {
19  HLTDirectory = "HLTResults";
20  conf_ = iConfig;
21 
22  ltcDigiCollectionTagToken_ = consumes<LTCDigiCollection>(conf_.getParameter<edm::InputTag>("ltcDigiCollectionTag"));
23 }
24 
27  // 0 DT
28  // 1 CSC
29  // 2 RBC1 (RPC techn. cosmic trigger for wheel +1, sector 10)
30  // 3 RBC2 (RPC techn. cosmic trigger for wheel +2, sector 10)
31  // 4 RPCTB (RPC Trigger Board trigger, covering both sectors 10 of both
32  // wheels, but with different geometrical acceptance ("pointing")) 5 unused
33  // edm::CurrentProcessingContext const* current_processing_context =
34  // currentContext(); std::string const* the_label = moduleLabel();
35  std::string the_label = conf_.getParameter<std::string>("@module_label");
36  std::string ltctitle = the_label + "_LTCTriggerDecision";
37  LTCTriggerDecision_all = ibooker.book1D(ltctitle, ltctitle, 8, -0.5, 7.5);
43 }
44 
47  iEvent.getByToken(ltcDigiCollectionTagToken_, ltcdigis);
48  // unsigned int ltc_run;
49  // unsigned int ltc_event;
50  // unsigned int ltc_triggerNumber;
51  // unsigned int ltc_mask; // eight bits
52  // unsigned long long int ltc_gpstime;
53  // unsigned int ltc_orbit;
54  // unsigned int ltc_bunch;
55  // unsigned int ltc_inhibit;
56  for (LTCDigiCollection::const_iterator ltcdigiItr = ltcdigis->begin(); ltcdigiItr != ltcdigis->end(); ++ltcdigiItr) {
57  // ltc_run = ltcdigiItr->runNumber();
58  // ltc_event = ltcdigiItr->eventNumber();
59  // ltc_triggerNumber = ltcdigiItr->eventID();
60  // ltc_bunch = ltcdigiItr->bunchNumber();
61  // ltc_orbit = ltcdigiItr->orbitNumber();
62  // ltc_inhibit = ltcdigiItr->triggerInhibitNumber();
63  // ltc_mask = (unsigned int)(ltcdigiItr->externTriggerMask());
64  // ltc_gpstime = ltcdigiItr->bstGpsTime();
65  for (int ibit = 0; ibit < 7; ++ibit) {
66  if (ltcdigiItr->HasTriggered(ibit)) {
67  LTCTriggerDecision_all->Fill(ibit, 1.);
68  }
69  }
70  //
71  // std::cout << "XXX: "
72  // << ltcdigiItr->runNumber() << " "
73  // << ltcdigiItr->eventNumber() << " "
74  // << ltcdigiItr->bunchNumber() << " "
75  // << ltcdigiItr->orbitNumber() << " "
76  // << "0x" << std::hex
77  // << int(ltcdigiItr->externTriggerMask()) << " "
78  // << std::dec
79  // << ltcdigiItr->triggerInhibitNumber() << " "
80  // << ltcdigiItr->bstGpsTime() << " "
81  // << std::endl;
82  // std::cout << (*ltcdigiItr) << std::endl;
83  }
84 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
MonitorElement * LTCTriggerDecision_all
Definition: MonitorLTC.h:31
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: MonitorLTC.cc:45
void Fill(long long x)
int iEvent
Definition: GenABIO.cc:224
std::string HLTDirectory
Definition: MonitorLTC.h:33
edm::EDGetTokenT< LTCDigiCollection > ltcDigiCollectionTagToken_
Definition: MonitorLTC.h:35
virtual 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)
MonitorLTC(const edm::ParameterSet &)
Definition: MonitorLTC.cc:16
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: MonitorLTC.cc:25
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
edm::ParameterSet conf_
Definition: MonitorLTC.h:29
Definition: Run.h:45