CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTTriggerCheck.cc
Go to the documentation of this file.
1 
2 /*
3  * See header file for a description of this class.
4  *
5  * \author S.Bologensi - INFN Torino
6  */
7 
9 
11 
13 
14 #include <iterator>
15 
16 using namespace edm;
17 using namespace std;
18 
20  isLocalRun(pset.getUntrackedParameter<bool>("localrun", true)) {
21 
22  if (!isLocalRun) {
23  ltcDigiCollectionToken_ = consumes<LTCDigiCollection>(
24  pset.getParameter<edm::InputTag>("ltcDigiCollectionTag"));
25  }
26 
28 
29  debug = pset.getUntrackedParameter<bool>("debug",false);
30 
31  theDbe->setCurrentFolder("DT/DTTriggerTask");
32  histo = theDbe->book1D("hNTriggerPerType",
33  "# of trigger per type",21, -1, 20);
34 }
35 
37 }
38 
40 }
41 
43 
44  if(debug)
45  cout<<"[DTTriggerCheck] endjob called!"<<endl;
46 
47  theDbe->rmdir("DT/DTTriggerTask");
48 }
49 
51  if(debug)
52  cout << "[DTTriggerCheck] Analyze #Run: " << event.id().run()
53  << " #Event: " << event.id().event() << endl;
54 
55  //Get the trigger source from ltc digis
57  if (!isLocalRun)
58  {
59  event.getByToken(ltcDigiCollectionToken_, ltcdigis);
60  for (std::vector<LTCDigi>::const_iterator ltc_it = ltcdigis->begin(); ltc_it != ltcdigis->end(); ltc_it++){
61  if (((*ltc_it).HasTriggered(0)) ||
62  ((*ltc_it).HasTriggered(1)) ||
63  ((*ltc_it).HasTriggered(2)) ||
64  ((*ltc_it).HasTriggered(3)) ||
65  ((*ltc_it).HasTriggered(4)))
66  histo->Fill(-1);
67  if ((*ltc_it).HasTriggered(0))
68  histo->Fill(0);
69  if ((*ltc_it).HasTriggered(1))
70  histo->Fill(1);
71  if ((*ltc_it).HasTriggered(2))
72  histo->Fill(2);
73  if ((*ltc_it).HasTriggered(3))
74  histo->Fill(3);
75  if ((*ltc_it).HasTriggered(4))
76  histo->Fill(4);
77  }
78  }
79  else
80  histo->Fill(0);
81 }
82 
83 // Local Variables:
84 // show-trailing-whitespace: t
85 // truncate-lines: t
86 // End:
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * histo
edm::EDGetTokenT< LTCDigiCollection > ltcDigiCollectionToken_
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:942
void rmdir(const std::string &fullpath)
Definition: DQMStore.cc:3051
void Fill(long long x)
DQMStore * theDbe
DTTriggerCheck(const edm::ParameterSet &pset)
Constructor.
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
virtual ~DTTriggerCheck()
Destructor.
void analyze(const edm::Event &event, const edm::EventSetup &setup)
Analyze.
tuple cout
Definition: gather_cfg.py:121
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:655