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:
DQMOneLumiEDAnalyzer<> DQMOneEDAnalyzer< edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, Args... > edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... > 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 DQMOneLumiEDAnalyzer<>
void accumulate (edm::Event const &event, edm::EventSetup const &setup) override
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
 DQMOneLumiEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
bool getCanSaveByLumi () override
 
- Public Member Functions inherited from DQMOneEDAnalyzer< edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, Args... >
void accumulate (edm::Event const &event, edm::EventSetup const &setup) override
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
 DQMOneEDAnalyzer ()
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) final
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () 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
 
std::vector< bool > const & recordProvenanceList () 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)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) 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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
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
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
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 dqmEndLuminosityBlock (const edm::LuminosityBlock &l, const edm::EventSetup &c) override
 
- Protected Member Functions inherited from DQMOneLumiEDAnalyzer<>
virtual void dqmBeginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
- Protected Member Functions inherited from DQMOneEDAnalyzer< edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, Args... >
virtual void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &)=0
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
virtual void dqmEndRun (edm::Run const &, edm::EventSetup const &)
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (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 DQMOneEDAnalyzer< edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, Args... >
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- 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 DQMOneLumiEDAnalyzer<>
edm::EDPutTokenT< DQMTokenlumiToken_
 
- Protected Attributes inherited from DQMOneEDAnalyzer< edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, Args... >
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Data Format.

Definition at line 17 of file RPCDcsInfo.h.

Constructor & Destructor Documentation

◆ RPCDcsInfo()

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

Constructor.

Definition at line 6 of file RPCDcsInfo.cc.

6  {
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 }

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

◆ ~RPCDcsInfo()

RPCDcsInfo::~RPCDcsInfo ( )
override

Destructor.

Definition at line 12 of file RPCDcsInfo.cc.

12 {}

Member Function Documentation

◆ analyze()

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

Analyze.

Reimplemented from DQMOneEDAnalyzer< edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, Args... >.

Definition at line 28 of file RPCDcsInfo.cc.

28  {
29  makeDcsInfo(e);
30  return;
31 }

References MillePedeFileConverter_cfg::e, and makeDcsInfo().

◆ bookHistograms()

void RPCDcsInfo::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotected

Definition at line 14 of file RPCDcsInfo.cc.

16  {
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 }

References dcs, DCSbyLS_, dcsinfofolder_, and subsystemname_.

◆ dqmEndLuminosityBlock()

void RPCDcsInfo::dqmEndLuminosityBlock ( const edm::LuminosityBlock l,
const edm::EventSetup c 
)
overrideprotectedvirtual

Reimplemented from DQMOneLumiEDAnalyzer<>.

Definition at line 33 of file RPCDcsInfo.cc.

33  {
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 }

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

◆ makeDcsInfo()

void RPCDcsInfo::makeDcsInfo ( const edm::Event e)
private

Definition at line 49 of file RPCDcsInfo.cc.

49  {
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 }

References dcs, MillePedeFileConverter_cfg::e, edm::HandleBase::isValid(), DcsStatus::RPC, and scalersRawToDigiLabel_.

Referenced by analyze().

Member Data Documentation

◆ dcs

bool RPCDcsInfo::dcs
private

Definition at line 39 of file RPCDcsInfo.h.

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

◆ DCSbyLS_

MonitorElement* RPCDcsInfo::DCSbyLS_
private

Definition at line 41 of file RPCDcsInfo.h.

Referenced by bookHistograms(), and dqmEndLuminosityBlock().

◆ dcsinfofolder_

std::string RPCDcsInfo::dcsinfofolder_
private

Definition at line 37 of file RPCDcsInfo.h.

Referenced by bookHistograms(), and RPCDcsInfo().

◆ parameters_

edm::ParameterSet RPCDcsInfo::parameters_
private

◆ scalersRawToDigiLabel_

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

Definition at line 42 of file RPCDcsInfo.h.

Referenced by makeDcsInfo(), and RPCDcsInfo().

◆ subsystemname_

std::string RPCDcsInfo::subsystemname_
private

Definition at line 36 of file RPCDcsInfo.h.

Referenced by bookHistograms(), and RPCDcsInfo().

RPCDcsInfo::DCSbyLS_
MonitorElement * DCSbyLS_
Definition: RPCDcsInfo.h:41
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::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::scalersRawToDigiLabel_
edm::EDGetTokenT< DcsStatusCollection > scalersRawToDigiLabel_
Definition: RPCDcsInfo.h:42
dqm::implementation::IBooker::UseLumiScope
UseScope< MonitorElementData::Scope::LUMI > UseLumiScope
Definition: DQMStore.h:463
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::InputTag
Definition: InputTag.h:15
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37