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:
DQMEDAnalyzer edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 RPCDcsInfo (const edm::ParameterSet &ps)
 Constructor. More...
 
 ~RPCDcsInfo () override
 Destructor. More...
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
virtual void analyze (edm::Event const &, edm::EventSetup const &)
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) override
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
 DQMEDAnalyzer (DQMEDAnalyzer const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer &&)=delete
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) override
 
 ~DQMEDAnalyzer () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

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
 
- 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

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

Additional Inherited Members

- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

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 &   
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

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
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:118
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:279
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(), reco::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:519
bool isValid() const
Definition: HandleBase.h:74
edm::EDGetTokenT< DcsStatusCollection > scalersRawToDigiLabel_
Definition: RPCDcsInfo.h:49
bool dcs
Definition: RPCDcsInfo.h:46
return(e1-e2)*(e1-e2)+dp *dp

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().