CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RPCDcsInfo.cc
Go to the documentation of this file.
5 
6 
8 
9 
10  subsystemname_ = ps.getUntrackedParameter<std::string>("subSystemFolder", "RPC") ;
11  dcsinfofolder_ = ps.getUntrackedParameter<std::string>("dcsInfoFolder", "DCSInfo") ;
12  scalersRawToDigiLabel_ = consumes<DcsStatusCollection>(ps.getParameter<edm::InputTag>("ScalersRawToDigiLabel"));
13 
14 }
15 
17 
19  edm::Run const & /* iRun */,
20  edm::EventSetup const & /* iSetup */) {
21 
22  // Fetch GlobalTag information and fill the string/ME.
23  ibooker.cd();
25 
26  DCSbyLS_ = ibooker.book1D("DCSbyLS","DCS",1,0.5,1.5);
28 
29  // initialize
30  dcs=true;
31 
32 }
33 
34 
36 
37  makeDcsInfo(e);
38  return;
39 }
40 
42 
43  // int nlumi = l.id().luminosityBlock();
44 
45  // fill dcs vs lumi
46  /* set those bins 0 for which bits are ON
47  needed for merge off lumi histograms across files */
48  if (dcs) DCSbyLS_->setBinContent(1,0.);
49  else DCSbyLS_->setBinContent(1,1.);
50 
51  dcs = true;
52 
53  return;
54 }
55 
56 
58 
60 
61  if ( ! e.getByToken(scalersRawToDigiLabel_, dcsStatus) ){
62  dcs = false;
63  return;
64  }
65 
66  if ( ! dcsStatus.isValid() )
67  {
68  edm::LogWarning("RPCDcsInfo") << "scalersRawToDigi not found" ;
69  dcs = false; // info not available: set to false
70  return;
71  }
72 
73 
74  for (DcsStatusCollection::const_iterator dcsStatusItr = dcsStatus->begin();
75  dcsStatusItr != dcsStatus->end(); ++dcsStatusItr) {
76 
77  if (!dcsStatusItr->ready(DcsStatus::RPC)) dcs=false;
78 
79  }
80 
81  return ;
82 }
83 
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
void setBinContent(int binx, double content)
set content of bin (1-D)
std::string dcsinfofolder_
Definition: RPCDcsInfo.h:44
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:449
void cd(void)
Definition: DQMStore.cc:266
virtual ~RPCDcsInfo()
Destructor.
Definition: RPCDcsInfo.cc:16
std::string subsystemname_
Definition: RPCDcsInfo.h:43
void makeDcsInfo(const edm::Event &e)
Definition: RPCDcsInfo.cc:57
void analyze(const edm::Event &e, const edm::EventSetup &c)
Analyze.
Definition: RPCDcsInfo.cc:35
void endLuminosityBlock(const edm::LuminosityBlock &l, const edm::EventSetup &c)
Definition: RPCDcsInfo.cc:41
return((rh^lh)&mask)
MonitorElement * DCSbyLS_
Definition: RPCDcsInfo.h:48
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
bool isValid() const
Definition: HandleBase.h:75
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
edm::EDGetTokenT< DcsStatusCollection > scalersRawToDigiLabel_
Definition: RPCDcsInfo.h:49
bool dcs
Definition: RPCDcsInfo.h:46
RPCDcsInfo(const edm::ParameterSet &ps)
Constructor.
Definition: RPCDcsInfo.cc:7
void setLumiFlag(void)
this ME is meant to be stored for each luminosity section
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: RPCDcsInfo.cc:18
Definition: Run.h:41