CMS 3D CMS Logo

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

#include <RPCDaqInfo.h>

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

Public Member Functions

 RPCDaqInfo (const edm::ParameterSet &)
 
 ~RPCDaqInfo () override
 
- 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 endJob () final
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &es) 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::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator >
 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 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>
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 myBooker (DQMStore::IBooker &)
 

Private Attributes

MonitorElementdaqDiskFractions [10]
 
MonitorElementDaqFraction_
 
MonitorElementDaqMap_
 
MonitorElementdaqWheelFractions [5]
 
std::pair< int, int > FEDRange_
 
bool init_
 
int numberOfDisks_
 
int NumberOfFeds_
 

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< DQMTokenlumimegetter_
 
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::GetterOfProducts< DQMTokenrunmegetter_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 12 of file RPCDaqInfo.h.

Constructor & Destructor Documentation

◆ RPCDaqInfo()

RPCDaqInfo::RPCDaqInfo ( const edm::ParameterSet ps)
explicit

Definition at line 9 of file RPCDaqInfo.cc.

9  {
10  FEDRange_.first = ps.getUntrackedParameter<unsigned int>("MinimumRPCFEDId", 790);
11  FEDRange_.second = ps.getUntrackedParameter<unsigned int>("MaximumRPCFEDId", 792);
12 
13  NumberOfFeds_ = FEDRange_.second - FEDRange_.first + 1;
14 
15  numberOfDisks_ = ps.getUntrackedParameter<int>("NumberOfEndcapDisks", 4);
16 
17  init_ = false;
18 }

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

◆ ~RPCDaqInfo()

RPCDaqInfo::~RPCDaqInfo ( )
override

Definition at line 20 of file RPCDaqInfo.cc.

20 {}

Member Function Documentation

◆ beginJob()

void RPCDaqInfo::beginJob ( void  )
overrideprotectedvirtual

Reimplemented from edm::one::EDProducerBase.

Definition at line 21 of file RPCDaqInfo.cc.

21 {}

◆ dqmEndJob()

void RPCDaqInfo::dqmEndJob ( DQMStore::IBooker ,
DQMStore::IGetter  
)
overrideprotectedvirtual

Implements DQMEDHarvester.

Definition at line 59 of file RPCDaqInfo.cc.

59 {}

◆ dqmEndLuminosityBlock()

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

Reimplemented from DQMEDHarvester.

Definition at line 22 of file RPCDaqInfo.cc.

25  {
26  if (!init_) {
27  this->myBooker(ibooker);
28  }
29 
30  if (auto runInfoRec = iSetup.tryToGet<RunInfoRcd>()) {
31  //get fed summary information
33  runInfoRec->get(sumFED);
34  std::vector<int> FedsInIds = sumFED->m_fed_in;
35 
36  int FedCount = 0;
37 
38  //loop on all active feds
39  for (unsigned int fedItr = 0; fedItr < FedsInIds.size(); ++fedItr) {
40  int fedID = FedsInIds[fedItr];
41  //make sure fed id is in allowed range
42 
43  if (fedID >= FEDRange_.first && fedID <= FEDRange_.second)
44  ++FedCount;
45  }
46 
47  //Fill active fed fraction ME
48  if (NumberOfFeds_ > 0)
49  DaqFraction_->Fill(FedCount / NumberOfFeds_);
50  else
51  DaqFraction_->Fill(-1);
52 
53  } else {
54  DaqFraction_->Fill(-1);
55  return;
56  }
57 }

References DaqFraction_, FEDRange_, dqm::impl::MonitorElement::Fill(), init_, RunInfo::m_fed_in, myBooker(), NumberOfFeds_, and edm::EventSetup::tryToGet().

◆ myBooker()

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

Definition at line 61 of file RPCDaqInfo.cc.

61  {
62  //fraction of alive FEDs
63  ibooker.setCurrentFolder("RPC/EventInfo/DAQContents");
64 
65  int limit = numberOfDisks_;
66  if (numberOfDisks_ < 2)
67  limit = 2;
68 
69  for (int i = -1 * limit; i <= limit; i++) { //loop on wheels and disks
70  if (i > -3 && i < 3) { //wheels
71  std::stringstream streams;
72  streams << "RPC_Wheel" << i;
73  daqWheelFractions[i + 2] = ibooker.bookFloat(streams.str());
74  daqWheelFractions[i + 2]->Fill(-1);
75  }
76 
77  if (i == 0 || i > numberOfDisks_ || i < (-1 * numberOfDisks_))
78  continue;
79 
80  int offset = numberOfDisks_;
81  if (i > 0)
82  offset--; //used to skip case equale to zero
83 
84  std::stringstream streams;
85  streams << "RPC_Disk" << i;
86  daqDiskFractions[i + 2] = ibooker.bookFloat(streams.str());
87  daqDiskFractions[i + 2]->Fill(-1);
88  }
89 
90  //daq summary for RPCs
91  ibooker.setCurrentFolder("RPC/EventInfo");
92 
93  DaqFraction_ = ibooker.bookFloat("DAQSummary");
94 
95  DaqMap_ = ibooker.book2D("DAQSummaryMap", "RPC DAQ Summary Map", 15, -7.5, 7.5, 12, 0.5, 12.5);
96 
97  //customize the 2d histo
98  std::stringstream BinLabel;
99  for (int i = 1; i <= 15; i++) {
100  BinLabel.str("");
101  if (i < 13) {
102  BinLabel << "Sec" << i;
103  DaqMap_->setBinLabel(i, BinLabel.str(), 2);
104  }
105 
106  BinLabel.str("");
107  if (i < 5)
108  BinLabel << "Disk" << i - 5;
109  else if (i > 11)
110  BinLabel << "Disk" << i - 11;
111  else if (i == 11 || i == 5)
112  BinLabel.str("");
113  else
114  BinLabel << "Wheel" << i - 8;
115 
116  DaqMap_->setBinLabel(i, BinLabel.str(), 1);
117  }
118 
119  init_ = true;
120 }

References CentralityFilter_cfi::BinLabel, dqm::implementation::IBooker::book2D(), dqm::implementation::IBooker::bookFloat(), daqDiskFractions, DaqFraction_, DaqMap_, daqWheelFractions, dqm::impl::MonitorElement::Fill(), mps_fire::i, init_, remoteMonitoring_LED_IterMethod_cfg::limit, numberOfDisks_, hltrates_dqm_sourceclient-live_cfg::offset, dqm::impl::MonitorElement::setBinLabel(), dqm::implementation::NavigatorBase::setCurrentFolder(), and HLT_2018_cff::streams.

Referenced by dqmEndLuminosityBlock().

Member Data Documentation

◆ daqDiskFractions

MonitorElement* RPCDaqInfo::daqDiskFractions[10]
private

Definition at line 33 of file RPCDaqInfo.h.

Referenced by myBooker().

◆ DaqFraction_

MonitorElement* RPCDaqInfo::DaqFraction_
private

Definition at line 30 of file RPCDaqInfo.h.

Referenced by dqmEndLuminosityBlock(), and myBooker().

◆ DaqMap_

MonitorElement* RPCDaqInfo::DaqMap_
private

Definition at line 31 of file RPCDaqInfo.h.

Referenced by myBooker().

◆ daqWheelFractions

MonitorElement* RPCDaqInfo::daqWheelFractions[5]
private

Definition at line 32 of file RPCDaqInfo.h.

Referenced by myBooker().

◆ FEDRange_

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

Definition at line 35 of file RPCDaqInfo.h.

Referenced by dqmEndLuminosityBlock(), and RPCDaqInfo().

◆ init_

bool RPCDaqInfo::init_
private

Definition at line 28 of file RPCDaqInfo.h.

Referenced by dqmEndLuminosityBlock(), myBooker(), and RPCDaqInfo().

◆ numberOfDisks_

int RPCDaqInfo::numberOfDisks_
private

Definition at line 37 of file RPCDaqInfo.h.

Referenced by myBooker(), and RPCDaqInfo().

◆ NumberOfFeds_

int RPCDaqInfo::NumberOfFeds_
private

Definition at line 37 of file RPCDaqInfo.h.

Referenced by dqmEndLuminosityBlock(), and RPCDaqInfo().

mps_fire.i
i
Definition: mps_fire.py:355
RPCDaqInfo::FEDRange_
std::pair< int, int > FEDRange_
Definition: RPCDaqInfo.h:35
RPCDaqInfo::myBooker
void myBooker(DQMStore::IBooker &)
Definition: RPCDaqInfo.cc:61
RPCDaqInfo::init_
bool init_
Definition: RPCDaqInfo.h:28
RPCDaqInfo::daqWheelFractions
MonitorElement * daqWheelFractions[5]
Definition: RPCDaqInfo.h:32
RPCDaqInfo::DaqMap_
MonitorElement * DaqMap_
Definition: RPCDaqInfo.h:31
RunInfo::m_fed_in
std::vector< int > m_fed_in
Definition: RunInfo.h:25
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
edm::ESHandle
Definition: DTSurvey.h:22
CentralityFilter_cfi.BinLabel
BinLabel
Definition: CentralityFilter_cfi.py:5
RunInfoRcd
Definition: RunSummaryRcd.h:26
RPCDaqInfo::NumberOfFeds_
int NumberOfFeds_
Definition: RPCDaqInfo.h:37
dqm::impl::MonitorElement::setBinLabel
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:771
remoteMonitoring_LED_IterMethod_cfg.limit
limit
Definition: remoteMonitoring_LED_IterMethod_cfg.py:427
RPCDaqInfo::daqDiskFractions
MonitorElement * daqDiskFractions[10]
Definition: RPCDaqInfo.h:33
HLT_2018_cff.streams
streams
Definition: HLT_2018_cff.py:3574
RPCDaqInfo::numberOfDisks_
int numberOfDisks_
Definition: RPCDaqInfo.h:37
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:78
RPCDaqInfo::DaqFraction_
MonitorElement * DaqFraction_
Definition: RPCDaqInfo.h:30