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 <numeric>
10 #include <iostream>
11 
12 
13 
15 
18 
19 
21  // ltcDigiCollectionTag_(iConfig.getParameter<edm::InputTag>("ltcDigiCollectionTag"))
22 {
23  HLTDirectory="HLTResults";
25  conf_ = iConfig;
26 
27  ltcDigiCollectionTagToken_ = consumes<LTCDigiCollection>(conf_.getParameter<edm::InputTag>("ltcDigiCollectionTag") );
28 }
29 
31 {
33  // 0 DT
34  // 1 CSC
35  // 2 RBC1 (RPC techn. cosmic trigger for wheel +1, sector 10)
36  // 3 RBC2 (RPC techn. cosmic trigger for wheel +2, sector 10)
37  // 4 RPCTB (RPC Trigger Board trigger, covering both sectors 10 of both wheels, but with different geometrical acceptance ("pointing"))
38  // 5 unused
39  // edm::CurrentProcessingContext const* current_processing_context = currentContext();
40  // std::string const* the_label = moduleLabel();
41  std::string the_label = conf_.getParameter<std::string>("@module_label");
42  std::string ltctitle = the_label + "_LTCTriggerDecision";
43  LTCTriggerDecision_all = ibooker.book1D(ltctitle, ltctitle, 8, -0.5, 7.5);
48  LTCTriggerDecision_all->setBinLabel(5, "RPCTB");
49 }
50 
52 {
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() ; ltcdigiItr != ltcdigis->end() ; ++ltcdigiItr ) {
63 // ltc_run = ltcdigiItr->runNumber();
64 // ltc_event = ltcdigiItr->eventNumber();
65 // ltc_triggerNumber = ltcdigiItr->eventID();
66 // ltc_bunch = ltcdigiItr->bunchNumber();
67 // ltc_orbit = ltcdigiItr->orbitNumber();
68 // ltc_inhibit = ltcdigiItr->triggerInhibitNumber();
69 // ltc_mask = (unsigned int)(ltcdigiItr->externTriggerMask());
70 // ltc_gpstime = ltcdigiItr->bstGpsTime();
71  for ( int ibit = 0; ibit < 7; ++ibit ) {
72  if ( ltcdigiItr->HasTriggered(ibit) ) {
73  LTCTriggerDecision_all->Fill(ibit,1.);
74  }
75  }
76  //
77 // std::cout << "XXX: "
78 // << ltcdigiItr->runNumber() << " "
79 // << ltcdigiItr->eventNumber() << " "
80 // << ltcdigiItr->bunchNumber() << " "
81 // << ltcdigiItr->orbitNumber() << " "
82 // << "0x" << std::hex
83 // << int(ltcdigiItr->externTriggerMask()) << " "
84 // << std::dec
85 // << ltcdigiItr->triggerInhibitNumber() << " "
86 // << ltcdigiItr->bstGpsTime() << " "
87 // << std::endl;
88 // std::cout << (*ltcdigiItr) << std::endl;
89  }
90 
91 }
T getParameter(std::string const &) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:508
MonitorElement * LTCTriggerDecision_all
Definition: MonitorLTC.h:39
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)
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: MonitorLTC.cc:51
void Fill(long long x)
int iEvent
Definition: GenABIO.cc:230
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
std::string HLTDirectory
Definition: MonitorLTC.h:41
edm::EDGetTokenT< LTCDigiCollection > ltcDigiCollectionTagToken_
Definition: MonitorLTC.h:43
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
DQMStore * dqmStore_
Definition: MonitorLTC.h:36
MonitorLTC(const edm::ParameterSet &)
Definition: MonitorLTC.cc:20
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: MonitorLTC.cc:30
edm::ParameterSet conf_
Definition: MonitorLTC.h:37
Definition: Run.h:43