CMS 3D CMS Logo

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

#include <RPCDataCertification.h>

Inheritance diagram for RPCDataCertification:
DQMEDHarvester edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::EndProcessBlockProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 RPCDataCertification (const edm::ParameterSet &pset)
 
 ~RPCDataCertification () override=default
 
- Public Member Functions inherited from DQMEDHarvester
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
void beginJob () override
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &) override
 
virtual void dqmAnalyze (DQMStore::IBooker &, DQMStore::IGetter &, edm::Event const &, edm::EventSetup const &)
 
 DQMEDHarvester ()
 
 DQMEDHarvester (edm::ParameterSet const &iConfig)
 
virtual void dqmEndRun (DQMStore::IBooker &, DQMStore::IGetter &, edm::Run const &, edm::EventSetup const &)
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &es) final
 
void endProcessBlockProduce (edm::ProcessBlock &) final
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &es) final
 
 ~DQMEDHarvester () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::EndProcessBlockProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () 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
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (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::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
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 beginJob () override
 
void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
 
- 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 = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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 checkFED (edm::EventSetup const &)
 
void myBooker (DQMStore::IBooker &)
 

Private Attributes

MonitorElementcertDiskFractions [nDisks_]
 
MonitorElementCertMap_
 
MonitorElementcertWheelFractions [nWheels_]
 
double defaultValue_
 
std::pair< int, int > FEDRange_
 
bool init_
 
int numberOfDisks_
 
int NumberOfFeds_
 
bool offlineDQM_
 
edm::ESGetToken< RunInfo, RunInfoRcdrunInfoToken_
 
MonitorElementtotalCertFraction
 

Static Private Attributes

constexpr static int nDisks_ = 10
 
constexpr static int nWheels_ = 5
 

Additional Inherited Members

- Public Types inherited from DQMEDHarvester
typedef dqm::harvesting::DQMStore DQMStore
 
typedef dqm::harvesting::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 DQMEDHarvester
DQMStoredqmstore_
 
edm::GetterOfProducts< DQMTokenjobmegetter_
 
edm::EDPutTokenT< DQMTokenjobToken_
 
edm::GetterOfProducts< DQMTokenlumimegetter_
 
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::GetterOfProducts< DQMTokenrunmegetter_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 11 of file RPCDataCertification.h.

Constructor & Destructor Documentation

◆ RPCDataCertification()

RPCDataCertification::RPCDataCertification ( const edm::ParameterSet pset)

Definition at line 10 of file RPCDataCertification.cc.

10  {
11  numberOfDisks_ = ps.getUntrackedParameter<int>("NumberOfEndcapDisks", 4);
12  FEDRange_.first = ps.getUntrackedParameter<unsigned int>("MinimumRPCFEDId", 790);
13  FEDRange_.second = ps.getUntrackedParameter<unsigned int>("MaximumRPCFEDId", 792);
14  NumberOfFeds_ = FEDRange_.second - FEDRange_.first + 1;
15  offlineDQM_ = ps.getUntrackedParameter<bool>("OfflineDQM", true);
16 
17  runInfoToken_ = esConsumes<edm::Transition::EndLuminosityBlock>();
18 
19  init_ = false;
20  defaultValue_ = 1.;
21 }

References defaultValue_, FEDRange_, edm::ParameterSet::getUntrackedParameter(), init_, numberOfDisks_, NumberOfFeds_, offlineDQM_, and runInfoToken_.

◆ ~RPCDataCertification()

RPCDataCertification::~RPCDataCertification ( )
overridedefault

Member Function Documentation

◆ beginJob()

void RPCDataCertification::beginJob ( void  )
overrideprotectedvirtual

Reimplemented from edm::one::EDProducerBase.

Definition at line 23 of file RPCDataCertification.cc.

23 {}

◆ checkFED()

void RPCDataCertification::checkFED ( edm::EventSetup const &  setup)
private

Definition at line 44 of file RPCDataCertification.cc.

44  {
45  double defaultValue = 1.;
46 
47  if (auto runInfoRec = setup.tryToGet<RunInfoRcd>()) {
48  defaultValue = -1;
49  //get fed summary information
50  auto sumFED = runInfoRec->get(runInfoToken_);
51  const std::vector<int> FedsInIds = sumFED.m_fed_in;
52  unsigned int f = 0;
53  bool flag = false;
54  while (!flag && f < FedsInIds.size()) {
55  int fedID = FedsInIds[f];
56  //make sure fed id is in allowed range
57  if (fedID >= FEDRange_.first && fedID <= FEDRange_.second) {
58  defaultValue = 1;
59  flag = true;
60  }
61  f++;
62  }
63  }
64 
65  defaultValue_ = defaultValue;
66 
67  init_ = true;
68 }

References defaultValue_, f, FEDRange_, RemoveAddSevLevel::flag, init_, runInfoToken_, and singleTopDQM_cfi::setup.

Referenced by dqmEndLuminosityBlock().

◆ dqmEndJob()

void RPCDataCertification::dqmEndJob ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
overrideprotectedvirtual

Implements DQMEDHarvester.

Definition at line 38 of file RPCDataCertification.cc.

38  {
39  if (offlineDQM_) {
40  this->myBooker(ibooker);
41  }
42 }

References myBooker(), and offlineDQM_.

◆ dqmEndLuminosityBlock()

void RPCDataCertification::dqmEndLuminosityBlock ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter,
edm::LuminosityBlock const &  LB,
edm::EventSetup const &  setup 
)
overrideprotectedvirtual

Reimplemented from DQMEDHarvester.

Definition at line 25 of file RPCDataCertification.cc.

28  {
29  if (!init_) {
30  this->checkFED(setup);
31 
32  if (!offlineDQM_) {
33  this->myBooker(ibooker);
34  }
35  }
36 }

References checkFED(), init_, myBooker(), and offlineDQM_.

◆ myBooker()

void RPCDataCertification::myBooker ( DQMStore::IBooker ibooker)
private

Definition at line 70 of file RPCDataCertification.cc.

70  {
71  ibooker.setCurrentFolder("RPC/EventInfo");
72  // global fraction
73  totalCertFraction = ibooker.bookFloat("CertificationSummary");
75 
76  CertMap_ = RPCSummaryMapHisto::book(ibooker, "CertificationSummaryMap", "RPC Certification Summary Map");
77 
78  //fill the histo with "1" --- just for the moment
81 
82  // book the ME
83  ibooker.setCurrentFolder("RPC/EventInfo/CertificationContents");
84 
85  const int limit = std::max(2, numberOfDisks_);
86 
87  for (int i = -limit; i <= limit; ++i) { //loop on wheels and disks
88  if (i > -3 && i < nWheels_ - 2) { //wheels
89  const std::string binLabel = fmt::format("RPC_Wheel{}", i);
90  certWheelFractions[i + 2] = ibooker.bookFloat(binLabel);
92  }
93 
94  if (i == 0 || i > numberOfDisks_ || i < (-numberOfDisks_))
95  continue;
96 
97  if (i > -3 && i < nDisks_ - 2) {
98  const std::string binLabel = fmt::format("RPC_Disk{}", i);
99  certDiskFractions[i + 2] = ibooker.bookFloat(binLabel);
101  }
102  }
103 }

References RPCSummaryMapHisto::book(), dqm::implementation::IBooker::bookFloat(), certDiskFractions, CertMap_, certWheelFractions, defaultValue_, dqm::impl::MonitorElement::Fill(), dqm-mbProfile::format, mps_fire::i, remoteMonitoring_LED_IterMethod_cfg::limit, SiStripPI::max, nDisks_, numberOfDisks_, nWheels_, RPCSummaryMapHisto::setBinsBarrel(), RPCSummaryMapHisto::setBinsEndcap(), dqm::implementation::NavigatorBase::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, and totalCertFraction.

Referenced by dqmEndJob(), and dqmEndLuminosityBlock().

Member Data Documentation

◆ certDiskFractions

MonitorElement* RPCDataCertification::certDiskFractions[nDisks_]
private

Definition at line 35 of file RPCDataCertification.h.

Referenced by myBooker().

◆ CertMap_

MonitorElement* RPCDataCertification::CertMap_
private

Definition at line 30 of file RPCDataCertification.h.

Referenced by myBooker().

◆ certWheelFractions

MonitorElement* RPCDataCertification::certWheelFractions[nWheels_]
private

Definition at line 33 of file RPCDataCertification.h.

Referenced by myBooker().

◆ defaultValue_

double RPCDataCertification::defaultValue_
private

Definition at line 40 of file RPCDataCertification.h.

Referenced by checkFED(), myBooker(), and RPCDataCertification().

◆ FEDRange_

std::pair<int, int> RPCDataCertification::FEDRange_
private

Definition at line 36 of file RPCDataCertification.h.

Referenced by checkFED(), and RPCDataCertification().

◆ init_

bool RPCDataCertification::init_
private

Definition at line 39 of file RPCDataCertification.h.

Referenced by checkFED(), dqmEndLuminosityBlock(), and RPCDataCertification().

◆ nDisks_

constexpr static int RPCDataCertification::nDisks_ = 10
staticconstexprprivate

Definition at line 34 of file RPCDataCertification.h.

Referenced by myBooker().

◆ numberOfDisks_

int RPCDataCertification::numberOfDisks_
private

Definition at line 37 of file RPCDataCertification.h.

Referenced by myBooker(), and RPCDataCertification().

◆ NumberOfFeds_

int RPCDataCertification::NumberOfFeds_
private

Definition at line 38 of file RPCDataCertification.h.

Referenced by RPCDataCertification().

◆ nWheels_

constexpr static int RPCDataCertification::nWheels_ = 5
staticconstexprprivate

Definition at line 32 of file RPCDataCertification.h.

Referenced by myBooker().

◆ offlineDQM_

bool RPCDataCertification::offlineDQM_
private

Definition at line 39 of file RPCDataCertification.h.

Referenced by dqmEndJob(), dqmEndLuminosityBlock(), and RPCDataCertification().

◆ runInfoToken_

edm::ESGetToken<RunInfo, RunInfoRcd> RPCDataCertification::runInfoToken_
private

Definition at line 28 of file RPCDataCertification.h.

Referenced by checkFED(), and RPCDataCertification().

◆ totalCertFraction

MonitorElement* RPCDataCertification::totalCertFraction
private

Definition at line 31 of file RPCDataCertification.h.

Referenced by myBooker().

RPCDataCertification::runInfoToken_
edm::ESGetToken< RunInfo, RunInfoRcd > runInfoToken_
Definition: RPCDataCertification.h:28
mps_fire.i
i
Definition: mps_fire.py:428
dqm::implementation::IBooker::bookFloat
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:80
RPCDataCertification::CertMap_
MonitorElement * CertMap_
Definition: RPCDataCertification.h:30
RPCDataCertification::offlineDQM_
bool offlineDQM_
Definition: RPCDataCertification.h:39
RPCDataCertification::totalCertFraction
MonitorElement * totalCertFraction
Definition: RPCDataCertification.h:31
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
RPCDataCertification::myBooker
void myBooker(DQMStore::IBooker &)
Definition: RPCDataCertification.cc:70
RPCDataCertification::certDiskFractions
MonitorElement * certDiskFractions[nDisks_]
Definition: RPCDataCertification.h:35
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
RPCDataCertification::FEDRange_
std::pair< int, int > FEDRange_
Definition: RPCDataCertification.h:36
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
RPCDataCertification::certWheelFractions
MonitorElement * certWheelFractions[nWheels_]
Definition: RPCDataCertification.h:33
dqm-mbProfile.format
format
Definition: dqm-mbProfile.py:16
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
RPCDataCertification::checkFED
void checkFED(edm::EventSetup const &)
Definition: RPCDataCertification.cc:44
RPCDataCertification::NumberOfFeds_
int NumberOfFeds_
Definition: RPCDataCertification.h:38
RPCSummaryMapHisto::setBinsEndcap
static void setBinsEndcap(MonitorElement *me, const double value)
Definition: RPCSummaryMapHisto.cc:43
RunInfoRcd
Definition: RunSummaryRcd.h:26
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
remoteMonitoring_LED_IterMethod_cfg.limit
limit
Definition: remoteMonitoring_LED_IterMethod_cfg.py:427
RPCDataCertification::init_
bool init_
Definition: RPCDataCertification.h:39
RPCDataCertification::nDisks_
constexpr static int nDisks_
Definition: RPCDataCertification.h:34
RPCSummaryMapHisto::book
static MonitorElement * book(IBooker &booker, const std::string &name, const std::string &title)
Definition: RPCSummaryMapHisto.cc:7
RPCDataCertification::nWheels_
constexpr static int nWheels_
Definition: RPCDataCertification.h:32
RPCDataCertification::defaultValue_
double defaultValue_
Definition: RPCDataCertification.h:40
RPCSummaryMapHisto::setBinsBarrel
static void setBinsBarrel(MonitorElement *me, const double value)
Definition: RPCSummaryMapHisto.cc:35
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:117
RPCDataCertification::numberOfDisks_
int numberOfDisks_
Definition: RPCDataCertification.h:37