CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
RPCDcsInfo Class Reference

Data Format. More...

#include <RPCDcsInfo.h>

Inheritance diagram for RPCDcsInfo:
one::DQMEDAnalyzer< T > one::dqmimplementation::DQMBaseClass< T... >

Public Member Functions

 RPCDcsInfo (const edm::ParameterSet &ps)
 Constructor. More...
 
 ~RPCDcsInfo () override
 Destructor. More...
 
- Public Member Functions inherited from one::DQMEDAnalyzer< T >
 DQMEDAnalyzer ()=default
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > &&)=delete
 
 ~DQMEDAnalyzer () override=default
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 Analyze. More...
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void endLuminosityBlock (const edm::LuminosityBlock &l, const edm::EventSetup &c) override
 

Private Member Functions

void makeDcsInfo (const edm::Event &e)
 

Private Attributes

bool dcs
 
MonitorElementDCSbyLS_
 
std::string dcsinfofolder_
 
edm::ParameterSet parameters_
 
edm::EDGetTokenT< DcsStatusCollectionscalersRawToDigiLabel_
 
std::string subsystemname_
 

Detailed Description

Data Format.

Definition at line 18 of file RPCDcsInfo.h.

Constructor & Destructor Documentation

RPCDcsInfo::RPCDcsInfo ( const edm::ParameterSet ps)

Constructor.

Definition at line 7 of file RPCDcsInfo.cc.

References dcsinfofolder_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), scalersRawToDigiLabel_, AlCaHLTBitMon_QueryRunRegistry::string, and subsystemname_.

7  {
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 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::string dcsinfofolder_
Definition: RPCDcsInfo.h:44
std::string subsystemname_
Definition: RPCDcsInfo.h:43
edm::EDGetTokenT< DcsStatusCollection > scalersRawToDigiLabel_
Definition: RPCDcsInfo.h:49
RPCDcsInfo::~RPCDcsInfo ( )
override

Destructor.

Definition at line 16 of file RPCDcsInfo.cc.

16 {}

Member Function Documentation

void RPCDcsInfo::analyze ( const edm::Event e,
const edm::EventSetup c 
)
overrideprotected

Analyze.

Definition at line 35 of file RPCDcsInfo.cc.

References makeDcsInfo().

35  {
36 
37  makeDcsInfo(e);
38  return;
39 }
void makeDcsInfo(const edm::Event &e)
Definition: RPCDcsInfo.cc:57
void RPCDcsInfo::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotected

Definition at line 18 of file RPCDcsInfo.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::cd(), dcs, DCSbyLS_, dcsinfofolder_, DQMStore::IBooker::setCurrentFolder(), MonitorElement::setLumiFlag(), and subsystemname_.

20  {
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 }
std::string dcsinfofolder_
Definition: RPCDcsInfo.h:44
std::string subsystemname_
Definition: RPCDcsInfo.h:43
MonitorElement * DCSbyLS_
Definition: RPCDcsInfo.h:48
void setLumiFlag()
this ME is meant to be stored for each luminosity section
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
bool dcs
Definition: RPCDcsInfo.h:46
void RPCDcsInfo::endLuminosityBlock ( const edm::LuminosityBlock l,
const edm::EventSetup c 
)
overrideprotected

Definition at line 41 of file RPCDcsInfo.cc.

References dcs, DCSbyLS_, and MonitorElement::setBinContent().

41  {
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 }
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * DCSbyLS_
Definition: RPCDcsInfo.h:48
bool dcs
Definition: RPCDcsInfo.h:46
void RPCDcsInfo::makeDcsInfo ( const edm::Event e)
private

Definition at line 57 of file RPCDcsInfo.cc.

References dcs, edm::Event::getByToken(), edm::HandleBase::isValid(), mathSSE::return(), DcsStatus::RPC, and scalersRawToDigiLabel_.

Referenced by analyze().

57  {
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 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
return((rh^lh)&mask)
bool isValid() const
Definition: HandleBase.h:74
edm::EDGetTokenT< DcsStatusCollection > scalersRawToDigiLabel_
Definition: RPCDcsInfo.h:49
bool dcs
Definition: RPCDcsInfo.h:46

Member Data Documentation

bool RPCDcsInfo::dcs
private

Definition at line 46 of file RPCDcsInfo.h.

Referenced by bookHistograms(), endLuminosityBlock(), and makeDcsInfo().

MonitorElement* RPCDcsInfo::DCSbyLS_
private

Definition at line 48 of file RPCDcsInfo.h.

Referenced by bookHistograms(), and endLuminosityBlock().

std::string RPCDcsInfo::dcsinfofolder_
private

Definition at line 44 of file RPCDcsInfo.h.

Referenced by bookHistograms(), and RPCDcsInfo().

edm::ParameterSet RPCDcsInfo::parameters_
private
edm::EDGetTokenT<DcsStatusCollection> RPCDcsInfo::scalersRawToDigiLabel_
private

Definition at line 49 of file RPCDcsInfo.h.

Referenced by makeDcsInfo(), and RPCDcsInfo().

std::string RPCDcsInfo::subsystemname_
private

Definition at line 43 of file RPCDcsInfo.h.

Referenced by bookHistograms(), and RPCDcsInfo().