CMS 3D CMS Logo

RPCDcsInfo.cc
Go to the documentation of this file.
5 
7  subsystemname_ = ps.getUntrackedParameter<std::string>("subSystemFolder", "RPC");
8  dcsinfofolder_ = ps.getUntrackedParameter<std::string>("dcsInfoFolder", "DCSInfo");
9  scalersRawToDigiLabel_ = consumes<DcsStatusCollection>(ps.getParameter<edm::InputTag>("ScalersRawToDigiLabel"));
10 }
11 
13 
14 void RPCDcsInfo::bookHistograms(DQMStore::IBooker& ibooker,
15  edm::Run const& /* iRun */,
16  edm::EventSetup const& /* iSetup */) {
17  // Fetch GlobalTag information and fill the string/ME.
18  ibooker.cd();
19  ibooker.setCurrentFolder(subsystemname_ + "/" + dcsinfofolder_);
20 
21  auto scope = DQMStore::IBooker::UseLumiScope(ibooker);
22  DCSbyLS_ = ibooker.book1D("DCSbyLS", "DCS", 1, 0.5, 1.5);
23 
24  // initialize
25  dcs = true;
26 }
27 
29  makeDcsInfo(e);
30  return;
31 }
32 
34  // int nlumi = l.id().luminosityBlock();
35 
36  // fill dcs vs lumi
37  /* set those bins 0 for which bits are ON
38  needed for merge off lumi histograms across files */
39  if (dcs)
40  DCSbyLS_->setBinContent(1, 0.);
41  else
42  DCSbyLS_->setBinContent(1, 1.);
43 
44  dcs = true;
45 
46  return;
47 }
48 
51 
52  if (!e.getByToken(scalersRawToDigiLabel_, dcsStatus)) {
53  dcs = false;
54  return;
55  }
56 
57  if (!dcsStatus.isValid()) {
58  edm::LogWarning("RPCDcsInfo") << "scalersRawToDigi not found";
59  dcs = false; // info not available: set to false
60  return;
61  }
62 
63  for (DcsStatusCollection::const_iterator dcsStatusItr = dcsStatus->begin(); dcsStatusItr != dcsStatus->end();
64  ++dcsStatusItr) {
65  if (!dcsStatusItr->ready(DcsStatus::RPC))
66  dcs = false;
67  }
68 
69  return;
70 }
Handle.h
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
RPCDcsInfo::DCSbyLS_
MonitorElement * DCSbyLS_
Definition: RPCDcsInfo.h:41
edm::Run
Definition: Run.h:45
RPCDcsInfo::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: RPCDcsInfo.cc:14
RPCDcsInfo::RPCDcsInfo
RPCDcsInfo(const edm::ParameterSet &ps)
Constructor.
Definition: RPCDcsInfo.cc:6
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
RPCDcsInfo::subsystemname_
std::string subsystemname_
Definition: RPCDcsInfo.h:36
edm::Handle
Definition: AssociativeIterator.h:50
RPCDcsInfo.h
RPCDcsInfo::~RPCDcsInfo
~RPCDcsInfo() override
Destructor.
Definition: RPCDcsInfo.cc:12
L1GtFdlWord.h
RPCDcsInfo::makeDcsInfo
void makeDcsInfo(const edm::Event &e)
Definition: RPCDcsInfo.cc:49
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::LogWarning
Definition: MessageLogger.h:141
RPCDcsInfo::dqmEndLuminosityBlock
void dqmEndLuminosityBlock(const edm::LuminosityBlock &l, const edm::EventSetup &c) override
Definition: RPCDcsInfo.cc:33
edm::ParameterSet
Definition: ParameterSet.h:36
RPCDcsInfo::scalersRawToDigiLabel_
edm::EDGetTokenT< DcsStatusCollection > scalersRawToDigiLabel_
Definition: RPCDcsInfo.h:42
dqm::implementation::IBooker::UseLumiScope
UseScope< MonitorElementData::Scope::LUMI > UseLumiScope
Definition: DQMStore.h:463
edm::EventSetup
Definition: EventSetup.h:57
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:193
RPCDcsInfo::dcs
bool dcs
Definition: RPCDcsInfo.h:39
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
dqm::impl::MonitorElement::setBinContent
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
Definition: MonitorElement.cc:691
DcsStatus::RPC
Definition: DcsStatus.h:43
RPCDcsInfo::dcsinfofolder_
std::string dcsinfofolder_
Definition: RPCDcsInfo.h:37
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
edm::Event
Definition: Event.h:73
edm::InputTag
Definition: InputTag.h:15
L1GlobalTriggerReadoutRecord.h
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
RPCDcsInfo::analyze
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Analyze.
Definition: RPCDcsInfo.cc:28