CMS 3D CMS Logo

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

#include <RPCDCSSummary.h>

Inheritance diagram for RPCDCSSummary:
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

 RPCDCSSummary (const edm::ParameterSet &)
 
 ~RPCDCSSummary () 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 (edm::ParameterSet const &iConfig)
 
 DQMEDHarvester ()
 
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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
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<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
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)
 
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 ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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)
 
void resetItemsToGetFrom (BranchType iType)
 

Private Member Functions

void checkDCSbit (edm::EventSetup const &)
 
void myBooker (DQMStore::IBooker &)
 

Private Attributes

MonitorElementdcsDiskFractions [nDisks_]
 
MonitorElementDCSMap_
 
MonitorElementdcsWheelFractions [nWheels_]
 
double defaultValue_
 
std::pair< int, int > FEDRange_
 
bool init_
 
int numberOfDisks_
 
int NumberOfFeds_
 
bool offlineDQM_
 
edm::ESGetToken< RunInfo, RunInfoRcdrunInfoToken_
 
MonitorElementtotalDCSFraction
 

Static Private Attributes

static constexpr int nDisks_ = 10
 
static constexpr 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 RPCDCSSummary.h.

Constructor & Destructor Documentation

◆ RPCDCSSummary()

RPCDCSSummary::RPCDCSSummary ( const edm::ParameterSet ps)

Definition at line 10 of file RPCDCSSummary.cc.

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

10  {
11  numberOfDisks_ = ps.getUntrackedParameter<int>("NumberOfEndcapDisks", 4);
12 
13  FEDRange_.first = ps.getUntrackedParameter<unsigned int>("MinimumRPCFEDId", 790);
14  FEDRange_.second = ps.getUntrackedParameter<unsigned int>("MaximumRPCFEDId", 792);
15 
16  offlineDQM_ = ps.getUntrackedParameter<bool>("OfflineDQM", true);
17 
18  NumberOfFeds_ = FEDRange_.second - FEDRange_.first + 1;
19  init_ = false;
20  defaultValue_ = 1.;
21 
22  runInfoToken_ = esConsumes<edm::Transition::EndLuminosityBlock>();
23 }
double defaultValue_
Definition: RPCDCSSummary.h:31
T getUntrackedParameter(std::string const &, T const &) const
edm::ESGetToken< RunInfo, RunInfoRcd > runInfoToken_
Definition: RPCDCSSummary.h:28
std::pair< int, int > FEDRange_
Definition: RPCDCSSummary.h:41

◆ ~RPCDCSSummary()

RPCDCSSummary::~RPCDCSSummary ( )
overridedefault

Member Function Documentation

◆ beginJob()

void RPCDCSSummary::beginJob ( void  )
overrideprotectedvirtual

Reimplemented from edm::one::EDProducerBase.

Definition at line 25 of file RPCDCSSummary.cc.

25 {}

◆ checkDCSbit()

void RPCDCSSummary::checkDCSbit ( edm::EventSetup const &  setup)
private

Definition at line 45 of file RPCDCSSummary.cc.

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

Referenced by dqmEndLuminosityBlock().

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

◆ dqmEndJob()

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

Implements DQMEDHarvester.

Definition at line 39 of file RPCDCSSummary.cc.

References myBooker(), and offlineDQM_.

39  {
40  if (offlineDQM_) {
41  this->myBooker(ibooker);
42  }
43 }
void myBooker(DQMStore::IBooker &)

◆ dqmEndLuminosityBlock()

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

Reimplemented from DQMEDHarvester.

Definition at line 27 of file RPCDCSSummary.cc.

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

30  {
31  if (!init_) {
32  this->checkDCSbit(setup);
33  if (!offlineDQM_) {
34  this->myBooker(ibooker);
35  }
36  }
37 }
void myBooker(DQMStore::IBooker &)
void checkDCSbit(edm::EventSetup const &)

◆ myBooker()

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

Definition at line 68 of file RPCDCSSummary.cc.

References RPCSummaryMapHisto::book(), dqm::implementation::IBooker::bookFloat(), dcsDiskFractions, DCSMap_, dcsWheelFractions, defaultValue_, dqm::impl::MonitorElement::Fill(), dqm-mbProfile::format, mps_fire::i, remoteMonitoring_LASER_era2018_cfg::limit, SiStripPI::max, nDisks_, numberOfDisks_, nWheels_, alignCSCRings::s, RPCSummaryMapHisto::setBinsBarrel(), RPCSummaryMapHisto::setBinsEndcap(), dqm::implementation::NavigatorBase::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, and totalDCSFraction.

Referenced by dqmEndJob(), and dqmEndLuminosityBlock().

68  {
69  ibooker.setCurrentFolder("RPC/EventInfo");
70  // global fraction
71  totalDCSFraction = ibooker.bookFloat("DCSSummary");
73 
74  DCSMap_ = RPCSummaryMapHisto::book(ibooker, "DCSSummaryMap", "RPC DCS Summary Map");
75 
76  //fill the histo with "1" --- just for the moment
79 
80  // book the ME
81  ibooker.setCurrentFolder("RPC/EventInfo/DCSContents");
82 
83  const int limit = std::max(2, numberOfDisks_);
84 
85  for (int i = -1 * limit; i <= limit; i++) { //loop on wheels and disks
86  if (i > -3 && i < nWheels_ - 2) { //wheels
87  const std::string s = fmt::format("RPC_Wheel{}", i);
88  dcsWheelFractions[i + 2] = ibooker.bookFloat(s);
90  }
91 
92  if (i == 0 || i > numberOfDisks_ || i < -numberOfDisks_)
93  continue;
94 
95  if (i > -3 && i < nDisks_ - 2) {
96  const std::string s = fmt::format("RPC_Disk{}", i);
97  dcsDiskFractions[i + 2] = ibooker.bookFloat(s);
99  }
100  }
101 }
static constexpr int nDisks_
Definition: RPCDCSSummary.h:39
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:80
MonitorElement * DCSMap_
Definition: RPCDCSSummary.h:35
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
static void setBinsEndcap(MonitorElement *me, const double value)
double defaultValue_
Definition: RPCDCSSummary.h:31
MonitorElement * totalDCSFraction
Definition: RPCDCSSummary.h:36
MonitorElement * dcsDiskFractions[nDisks_]
Definition: RPCDCSSummary.h:40
void Fill(long long x)
MonitorElement * dcsWheelFractions[nWheels_]
Definition: RPCDCSSummary.h:38
static MonitorElement * book(IBooker &booker, const std::string &name, const std::string &title)
static constexpr int nWheels_
Definition: RPCDCSSummary.h:37
static void setBinsBarrel(MonitorElement *me, const double value)

Member Data Documentation

◆ dcsDiskFractions

MonitorElement* RPCDCSSummary::dcsDiskFractions[nDisks_]
private

Definition at line 40 of file RPCDCSSummary.h.

Referenced by myBooker().

◆ DCSMap_

MonitorElement* RPCDCSSummary::DCSMap_
private

Definition at line 35 of file RPCDCSSummary.h.

Referenced by myBooker().

◆ dcsWheelFractions

MonitorElement* RPCDCSSummary::dcsWheelFractions[nWheels_]
private

Definition at line 38 of file RPCDCSSummary.h.

Referenced by myBooker().

◆ defaultValue_

double RPCDCSSummary::defaultValue_
private

Definition at line 31 of file RPCDCSSummary.h.

Referenced by checkDCSbit(), myBooker(), and RPCDCSSummary().

◆ FEDRange_

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

Definition at line 41 of file RPCDCSSummary.h.

Referenced by checkDCSbit(), and RPCDCSSummary().

◆ init_

bool RPCDCSSummary::init_
private

Definition at line 30 of file RPCDCSSummary.h.

Referenced by checkDCSbit(), dqmEndLuminosityBlock(), and RPCDCSSummary().

◆ nDisks_

constexpr int RPCDCSSummary::nDisks_ = 10
staticprivate

Definition at line 39 of file RPCDCSSummary.h.

Referenced by myBooker().

◆ numberOfDisks_

int RPCDCSSummary::numberOfDisks_
private

Definition at line 42 of file RPCDCSSummary.h.

Referenced by myBooker(), and RPCDCSSummary().

◆ NumberOfFeds_

int RPCDCSSummary::NumberOfFeds_
private

Definition at line 43 of file RPCDCSSummary.h.

Referenced by RPCDCSSummary().

◆ nWheels_

constexpr int RPCDCSSummary::nWheels_ = 5
staticprivate

Definition at line 37 of file RPCDCSSummary.h.

Referenced by myBooker().

◆ offlineDQM_

bool RPCDCSSummary::offlineDQM_
private

Definition at line 33 of file RPCDCSSummary.h.

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

◆ runInfoToken_

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

Definition at line 28 of file RPCDCSSummary.h.

Referenced by checkDCSbit(), and RPCDCSSummary().

◆ totalDCSFraction

MonitorElement* RPCDCSSummary::totalDCSFraction
private

Definition at line 36 of file RPCDCSSummary.h.

Referenced by myBooker().