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 
10 
11  subsystemname_ = ps.getUntrackedParameter<std::string>("subSystemFolder", "RPC") ;
12  dcsinfofolder_ = ps.getUntrackedParameter<std::string>("dcsInfoFolder", "DCSInfo") ;
13  scalersRawToDigiLabel_ = consumes<DcsStatusCollection>(ps.getParameter<edm::InputTag>("ScalersRawToDigiLabel"));
14 
15  // initialize
16  dcs = true;
17 }
18 
20 
22 
23  dbe_->cd();
25 
26  DCSbyLS_=dbe_->book1D("DCSbyLS","DCS",1,0.5,1.5);
28 
29  // initialize
30  dcs=true;
31 }
32 
34 
35  makeDcsInfo(e);
36  return;
37 }
38 
40 
41  // int nlumi = l.id().luminosityBlock();
42 
43  // fill dcs vs lumi
44  /* set those bins 0 for which bits are ON
45  needed for merge off lumi histograms across files */
46  if (dcs) DCSbyLS_->setBinContent(1,0.);
47  else DCSbyLS_->setBinContent(1,1.);
48 
49  dcs = true;
50 
51  return;
52 }
53 
54 
56 
58 
59  if ( ! e.getByToken(scalersRawToDigiLabel_, dcsStatus) ){
60  dcs = false;
61  return;
62  }
63 
64  if ( ! dcsStatus.isValid() )
65  {
66  edm::LogWarning("RPCDcsInfo") << "scalersRawToDigi not found" ;
67  dcs = false; // info not available: set to false
68  return;
69  }
70 
71 
72  for (DcsStatusCollection::const_iterator dcsStatusItr = dcsStatus->begin();
73  dcsStatusItr != dcsStatus->end(); ++dcsStatusItr) {
74 
75  if (!dcsStatusItr->ready(DcsStatus::RPC)) dcs=false;
76 
77  }
78 
79  return ;
80 }
81 
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)
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:872
std::string dcsinfofolder_
Definition: RPCDcsInfo.h:41
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:561
virtual ~RPCDcsInfo()
Destructor.
Definition: RPCDcsInfo.cc:19
std::string subsystemname_
Definition: RPCDcsInfo.h:40
void makeDcsInfo(const edm::Event &e)
Definition: RPCDcsInfo.cc:55
void analyze(const edm::Event &e, const edm::EventSetup &c)
Analyze.
Definition: RPCDcsInfo.cc:33
void endLuminosityBlock(const edm::LuminosityBlock &l, const edm::EventSetup &c)
Definition: RPCDcsInfo.cc:39
MonitorElement * DCSbyLS_
Definition: RPCDcsInfo.h:45
bool isValid() const
Definition: HandleBase.h:76
DQMStore * dbe_
Definition: RPCDcsInfo.h:38
edm::EDGetTokenT< DcsStatusCollection > scalersRawToDigiLabel_
Definition: RPCDcsInfo.h:46
bool dcs
Definition: RPCDcsInfo.h:43
return(e1-e2)*(e1-e2)+dp *dp
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 beginRun(const edm::Run &r, const edm::EventSetup &c)
Definition: RPCDcsInfo.cc:21
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:584
Definition: Run.h:41