CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
RPCDcsInfo Class Reference

#include <RPCDcsInfo.h>

Inheritance diagram for RPCDcsInfo:
edm::EDAnalyzer

Public Member Functions

 RPCDcsInfo (const edm::ParameterSet &ps)
 Constructor. More...
 
virtual ~RPCDcsInfo ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 Analyze. More...
 
void beginRun (const edm::Run &r, const edm::EventSetup &c)
 
void endLuminosityBlock (const edm::LuminosityBlock &l, const edm::EventSetup &c)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Private Member Functions

void makeDcsInfo (const edm::Event &e)
 

Private Attributes

DQMStoredbe_
 
bool dcs
 
MonitorElementDCSbyLS_
 
std::string dcsinfofolder_
 
edm::ParameterSet parameters_
 
std::string scalersRawToDigiLabel_
 
std::string subsystemname_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 

Detailed Description

Definition at line 14 of file RPCDcsInfo.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 8 of file RPCDcsInfo.cc.

References dbe_, dcs, dcsinfofolder_, edm::ParameterSet::getUntrackedParameter(), cppFunctionSkipper::operator, scalersRawToDigiLabel_, and subsystemname_.

8  {
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 }
T getUntrackedParameter(std::string const &, T const &) const
std::string dcsinfofolder_
Definition: RPCDcsInfo.h:39
std::string subsystemname_
Definition: RPCDcsInfo.h:38
DQMStore * dbe_
Definition: RPCDcsInfo.h:35
bool dcs
Definition: RPCDcsInfo.h:41
std::string scalersRawToDigiLabel_
Definition: RPCDcsInfo.h:36
RPCDcsInfo::~RPCDcsInfo ( )
virtual

Destructor.

Definition at line 20 of file RPCDcsInfo.cc.

20 {}

Member Function Documentation

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

Analyze.

Implements edm::EDAnalyzer.

Definition at line 34 of file RPCDcsInfo.cc.

References makeDcsInfo().

34  {
35 
36  makeDcsInfo(e);
37  return;
38 }
void makeDcsInfo(const edm::Event &e)
Definition: RPCDcsInfo.cc:56
void RPCDcsInfo::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 22 of file RPCDcsInfo.cc.

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

22  {
23 
24  dbe_->cd();
26 
27  DCSbyLS_=dbe_->book1D("DCSbyLS","DCS",1,0.5,1.5);
29 
30  // initialize
31  dcs=true;
32 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:717
std::string dcsinfofolder_
Definition: RPCDcsInfo.h:39
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:406
std::string subsystemname_
Definition: RPCDcsInfo.h:38
MonitorElement * DCSbyLS_
Definition: RPCDcsInfo.h:43
DQMStore * dbe_
Definition: RPCDcsInfo.h:35
bool dcs
Definition: RPCDcsInfo.h:41
void setLumiFlag(void)
this ME is meant to be stored for each luminosity section
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:429
void RPCDcsInfo::endLuminosityBlock ( const edm::LuminosityBlock l,
const edm::EventSetup c 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 40 of file RPCDcsInfo.cc.

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

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

Definition at line 56 of file RPCDcsInfo.cc.

References dcs, edm::Event::getByLabel(), edm::HandleBase::isValid(), hitfit::return, and DcsStatus::RPC.

Referenced by analyze().

56  {
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 }
bool isValid() const
Definition: HandleBase.h:76
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
bool dcs
Definition: RPCDcsInfo.h:41

Member Data Documentation

DQMStore* RPCDcsInfo::dbe_
private

Definition at line 35 of file RPCDcsInfo.h.

Referenced by beginRun(), and RPCDcsInfo().

bool RPCDcsInfo::dcs
private

Definition at line 41 of file RPCDcsInfo.h.

Referenced by beginRun(), endLuminosityBlock(), makeDcsInfo(), and RPCDcsInfo().

MonitorElement* RPCDcsInfo::DCSbyLS_
private

Definition at line 43 of file RPCDcsInfo.h.

Referenced by beginRun(), and endLuminosityBlock().

std::string RPCDcsInfo::dcsinfofolder_
private

Definition at line 39 of file RPCDcsInfo.h.

Referenced by beginRun(), and RPCDcsInfo().

edm::ParameterSet RPCDcsInfo::parameters_
private
std::string RPCDcsInfo::scalersRawToDigiLabel_
private

Definition at line 36 of file RPCDcsInfo.h.

Referenced by RPCDcsInfo().

std::string RPCDcsInfo::subsystemname_
private

Definition at line 38 of file RPCDcsInfo.h.

Referenced by beginRun(), and RPCDcsInfo().