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

Data Format. More...

#include <RPCDcsInfo.h>

Inheritance diagram for RPCDcsInfo:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 RPCDcsInfo (const edm::ParameterSet &ps)
 Constructor. More...
 
virtual ~RPCDcsInfo ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Private Member Functions

void makeDcsInfo (const edm::Event &e)
 

Private Attributes

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

Additional Inherited Members

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

Detailed Description

Data Format.

Definition at line 17 of file RPCDcsInfo.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 7 of file RPCDcsInfo.cc.

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

7  {
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 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::string dcsinfofolder_
Definition: RPCDcsInfo.h:41
std::string subsystemname_
Definition: RPCDcsInfo.h:40
DQMStore * dbe_
Definition: RPCDcsInfo.h:38
edm::EDGetTokenT< DcsStatusCollection > scalersRawToDigiLabel_
Definition: RPCDcsInfo.h:46
bool dcs
Definition: RPCDcsInfo.h:43
RPCDcsInfo::~RPCDcsInfo ( )
virtual

Destructor.

Definition at line 19 of file RPCDcsInfo.cc.

19 {}

Member Function Documentation

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

Analyze.

Implements edm::EDAnalyzer.

Definition at line 33 of file RPCDcsInfo.cc.

References makeDcsInfo().

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

Reimplemented from edm::EDAnalyzer.

Definition at line 21 of file RPCDcsInfo.cc.

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

21  {
22 
23  dbe_->cd();
25 
26  DCSbyLS_=dbe_->book1D("DCSbyLS","DCS",1,0.5,1.5);
28 
29  // initialize
30  dcs=true;
31 }
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
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:561
std::string subsystemname_
Definition: RPCDcsInfo.h:40
MonitorElement * DCSbyLS_
Definition: RPCDcsInfo.h:45
DQMStore * dbe_
Definition: RPCDcsInfo.h:38
bool dcs
Definition: RPCDcsInfo.h:43
void setLumiFlag(void)
this ME is meant to be stored for each luminosity section
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:584
void RPCDcsInfo::endLuminosityBlock ( const edm::LuminosityBlock l,
const edm::EventSetup c 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 39 of file RPCDcsInfo.cc.

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

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

Definition at line 55 of file RPCDcsInfo.cc.

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

Referenced by analyze().

55  {
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 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
bool isValid() const
Definition: HandleBase.h:76
edm::EDGetTokenT< DcsStatusCollection > scalersRawToDigiLabel_
Definition: RPCDcsInfo.h:46
bool dcs
Definition: RPCDcsInfo.h:43
return(e1-e2)*(e1-e2)+dp *dp

Member Data Documentation

DQMStore* RPCDcsInfo::dbe_
private

Definition at line 38 of file RPCDcsInfo.h.

Referenced by beginRun(), and RPCDcsInfo().

bool RPCDcsInfo::dcs
private

Definition at line 43 of file RPCDcsInfo.h.

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

MonitorElement* RPCDcsInfo::DCSbyLS_
private

Definition at line 45 of file RPCDcsInfo.h.

Referenced by beginRun(), and endLuminosityBlock().

std::string RPCDcsInfo::dcsinfofolder_
private

Definition at line 41 of file RPCDcsInfo.h.

Referenced by beginRun(), and RPCDcsInfo().

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

Definition at line 46 of file RPCDcsInfo.h.

Referenced by makeDcsInfo(), and RPCDcsInfo().

std::string RPCDcsInfo::subsystemname_
private

Definition at line 40 of file RPCDcsInfo.h.

Referenced by beginRun(), and RPCDcsInfo().