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