CMS 3D CMS Logo

RPCDcsInfoClient.cc
Go to the documentation of this file.
3 
5  dcsinfofolder_ = ps.getUntrackedParameter<std::string>("dcsInfoFolder", "RPC/DCSInfo");
6 
7  DCS.clear();
8  DCS.resize(10); // start with 10 LS, resize later
9 }
10 
12 
14 
16  DQMStore::IGetter& igetter,
17  edm::LuminosityBlock const& l,
18  edm::EventSetup const& c) {
19  unsigned int nlumi = l.id().luminosityBlock();
20 
21  if (nlumi + 1 > DCS.size())
22  DCS.resize(nlumi + 1);
23 
24  MonitorElement* DCSbyLS_ = igetter.get(dcsinfofolder_ + "/DCSbyLS");
25 
26  if (!DCSbyLS_)
27  return;
28 
29  if (TH1F* h1 = DCSbyLS_->getTH1F()) {
30  int hvStatus = 0;
31 
32  if (h1->GetBinContent(1) != 0) {
33  hvStatus = 0; // set to 0 because HV was off (!)
34  } else {
35  hvStatus = 1; // set to 1 because HV was on (!)
36  }
37 
38  DCS[nlumi] = hvStatus;
39  }
40 
41  return;
42 }
43 
45  // book
46  ibooker.cd();
48 
49  unsigned int nlsmax = DCS.size();
50 
51  std::string meName = dcsinfofolder_ + "/rpcHVStatus";
52  MonitorElement* rpcHVStatus = ibooker.book2D("rpcHVStatus", "RPC HV Status", nlsmax, 1., nlsmax + 1, 1, 0.5, 1.5);
53  rpcHVStatus->setAxisTitle("Luminosity Section", 1);
54  rpcHVStatus->setBinLabel(1, "", 2);
55 
56  int lsCounter = 0;
57  // fill
58  for (unsigned int i = 0; i < nlsmax; i++) {
59  rpcHVStatus->setBinContent(i + 1, 1, DCS[i]);
60  lsCounter += DCS[i];
61  }
62 
63  meName = dcsinfofolder_ + "/rpcHV";
64  MonitorElement* rpcHV = ibooker.bookInt("rpcHV");
65 
66  rpcHV->Fill(lsCounter);
67 
68  return;
69 }
mps_fire.i
i
Definition: mps_fire.py:355
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
LuminosityBlock.h
RPCDcsInfoClient::~RPCDcsInfoClient
~RPCDcsInfoClient() override
Definition: RPCDcsInfoClient.cc:11
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
RPCDcsInfoClient::dqmEndLuminosityBlock
void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
Definition: RPCDcsInfoClient.cc:15
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
RPCDcsInfoClient::DCS
std::vector< int > DCS
Definition: RPCDcsInfoClient.h:24
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
RPCDcsInfoClient.h
dqm::legacy::MonitorElement::getTH1F
virtual TH1F * getTH1F() const
Definition: MonitorElement.h:478
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
dqm::implementation::NavigatorBase::cd
virtual void cd()
Definition: DQMStore.cc:29
RPCDcsInfoClient::RPCDcsInfoClient
RPCDcsInfoClient(const edm::ParameterSet &ps)
Definition: RPCDcsInfoClient.cc:4
RPCDcsInfoClient::dqmEndJob
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
Definition: RPCDcsInfoClient.cc:44
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
RPCDcsInfoClient::dcsinfofolder_
std::string dcsinfofolder_
Definition: RPCDcsInfoClient.h:22
edm::ParameterSet
Definition: ParameterSet.h:36
dqm::implementation::IBooker::bookInt
MonitorElement * bookInt(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:73
dqm::impl::MonitorElement::setBinLabel
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:771
edm::EventSetup
Definition: EventSetup.h:57
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:193
RPCDcsInfoClient::beginJob
void beginJob() override
Definition: RPCDcsInfoClient.cc:13
dqm::impl::MonitorElement::setBinContent
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
Definition: MonitorElement.cc:691
dqm::implementation::IGetter
Definition: DQMStore.h:484
dqm::implementation::IBooker::book2D
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
dqm::implementation::IGetter::get
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:651
dqm::implementation::IBooker
Definition: DQMStore.h:43
dqm::impl::MonitorElement::setAxisTitle
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:800