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.
6 
7 
9 
11 
12  subsystemname_ = ps.getUntrackedParameter<std::string>("subSystemFolder", "RPC") ;
13  dcsinfofolder_ = ps.getUntrackedParameter<std::string>("dcsInfoFolder", "DCSInfo") ;
14  scalersRawToDigiLabel_ = ps.getUntrackedParameter<std::string>("ScalersRawToDigiLabel", "scalersRawToDigi");
15 
16  // initialize
17  dcs = true;
18 }
19 
21 
23 
24  dbe_->cd();
26 
27  DCSbyLS_=dbe_->book1D("DCSbyLS","DCS",1,0.5,1.5);
29 
30  // initialize
31  dcs=true;
32 }
33 
35 
36  makeDcsInfo(e);
37  return;
38 }
39 
41 
42  // int nlumi = l.id().luminosityBlock();
43 
44  // fill dcs vs lumi
45  /* set those bins 0 for which bits are ON
46  needed for merge off lumi histograms across files */
47  if (dcs) DCSbyLS_->setBinContent(1,0.);
48  else DCSbyLS_->setBinContent(1,1.);
49 
50  dcs = true;
51 
52  return;
53 }
54 
55 
57 
59 
60  if ( ! e.getByLabel("scalersRawToDigi", dcsStatus) ){
61  dcs = false;
62  return;
63  }
64 
65  if ( ! dcsStatus.isValid() )
66  {
67  edm::LogWarning("RPCDcsInfo") << "scalersRawToDigi not found" ;
68  dcs = false; // info not available: set to false
69  return;
70  }
71 
72 
73  for (DcsStatusCollection::const_iterator dcsStatusItr = dcsStatus->begin();
74  dcsStatusItr != dcsStatus->end(); ++dcsStatusItr) {
75 
76  if (!dcsStatusItr->ready(DcsStatus::RPC)) dcs=false;
77 
78  }
79 
80  return ;
81 }
82 
T getUntrackedParameter(std::string const &, T const &) const
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:514
std::string dcsinfofolder_
Definition: RPCDcsInfo.h:39
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:209
virtual ~RPCDcsInfo()
Destructor.
Definition: RPCDcsInfo.cc:20
std::string subsystemname_
Definition: RPCDcsInfo.h:38
void makeDcsInfo(const edm::Event &e)
Definition: RPCDcsInfo.cc:56
void analyze(const edm::Event &e, const edm::EventSetup &c)
Analyze.
Definition: RPCDcsInfo.cc:34
void endLuminosityBlock(const edm::LuminosityBlock &l, const edm::EventSetup &c)
Definition: RPCDcsInfo.cc:40
return((rh^lh)&mask)
MonitorElement * DCSbyLS_
Definition: RPCDcsInfo.h:43
bool isValid() const
Definition: HandleBase.h:76
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:355
DQMStore * dbe_
Definition: RPCDcsInfo.h:35
bool dcs
Definition: RPCDcsInfo.h:41
std::string scalersRawToDigiLabel_
Definition: RPCDcsInfo.h:36
RPCDcsInfo(const edm::ParameterSet &ps)
Constructor.
Definition: RPCDcsInfo.cc:8
void setLumiFlag(void)
this ME is meant to be stored for each luminosity section
void beginRun(const edm::Run &r, const edm::EventSetup &c)
Definition: RPCDcsInfo.cc:22
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:232
Definition: Run.h:32