CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DQMScalInfo.cc
Go to the documentation of this file.
1 /*
2  * \file DQMDcsInfo.cc
3  * \author A.Meyer - DESY
4  * Last Update:
5  *
6  */
7 
8 #include "DQMScalInfo.h"
13 
14 using namespace std;
15 
16 
17 // Framework
18 
19 
21 {
22  parameters_ = ps;
23 
24  scalfolder_ = parameters_.getUntrackedParameter<std::string>("dqmScalFolder", "Scal") ;
25  gtCollection_ = consumes<L1GlobalTriggerReadoutRecord>(parameters_.getUntrackedParameter<std::string>("gtCollection","gtDigis"));
26  dcsStatusCollection_ = consumes<DcsStatusCollection>(parameters_.getUntrackedParameter<std::string>("dcsStatusCollection","scalersRawToDigi"));
27  l1tscollectionToken_ = consumes<Level1TriggerScalersCollection>(parameters_.getUntrackedParameter<std::string>("l1TSCollection", "scalersRawToDigi"));
28 
29 }
30 
32 }
33 
35  edm::Run const & /* iRun */,
36  edm::EventSetup const & /* iSetup */) {
37 
38  // Fetch GlobalTag information and fill the string/ME.
39  ibooker.cd();
40  ibooker.setCurrentFolder(scalfolder_ +"/L1TriggerScalers/");
41  const int fracLS = 16;
42  const int maxLS = 250;
43  hlresync_ = ibooker.book1D("lresync","Orbit of last resync",fracLS*maxLS,0,maxLS*262144);
44  hlOC0_ = ibooker.book1D("lOC0","Orbit of last OC0",fracLS*maxLS,0,maxLS*262144);
45  hlTE_ = ibooker.book1D("lTE","Orbit of last TestEnable",fracLS*maxLS,0,maxLS*262144);
46  hlstart_ = ibooker.book1D("lstart","Orbit of last Start",fracLS*maxLS,0,maxLS*262144);
47  hlEC0_ = ibooker.book1D("lEC0","Orbit of last EC0",fracLS*maxLS,0,maxLS*262144);
48  hlHR_ = ibooker.book1D("lHR","Orbit of last HardReset",fracLS*maxLS,0,maxLS*262144);
49 }
50 
52  makeL1Scalars(e);
53  return;
54 }
55 
56 void
58 {
60  e.getByToken(l1tscollectionToken_,l1ts);
61  if(l1ts->size()==0) return;
62  hlresync_->Fill((*l1ts)[0].lastResync());
63  hlOC0_->Fill((*l1ts)[0].lastOrbitCounter0());
64  hlTE_->Fill((*l1ts)[0].lastTestEnable());
65  hlstart_->Fill((*l1ts)[0].lastStart());
66  hlEC0_->Fill((*l1ts)[0].lastEventCounter0());
67  hlHR_->Fill((*l1ts)[0].lastHardReset());
68 
69  return ;
70 }
T getUntrackedParameter(std::string const &, T const &) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:449
void cd(void)
Definition: DQMStore.cc:266
void makeL1Scalars(const edm::Event &e)
Definition: DQMScalInfo.cc:57
return((rh^lh)&mask)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: DQMScalInfo.cc:34
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
DQMScalInfo(const edm::ParameterSet &ps)
Constructor.
Definition: DQMScalInfo.cc:20
virtual ~DQMScalInfo()
Destructor.
Definition: DQMScalInfo.cc:31
void analyze(const edm::Event &e, const edm::EventSetup &c)
Analyze.
Definition: DQMScalInfo.cc:51
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
Definition: Run.h:41