CMS 3D CMS Logo

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

#include <RPCDCSSummary.h>

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

 RPCDCSSummary (const edm::ParameterSet &)
 Constructor. More...
 
 ~RPCDCSSummary () override
 Destructor. More...
 
- 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 checkDCSbit (edm::EventSetup const &)
 
void myBooker (DQMStore::IBooker &)
 

Private Attributes

MonitorElementdcsDiskFractions [10]
 
MonitorElementDCSMap_
 
MonitorElementdcsWheelFractions [5]
 
double defaultValue_
 
std::pair< int, int > FEDRange_
 
bool init_
 
int numberOfDisks_
 
int NumberOfFeds_
 
bool offlineDQM_
 
MonitorElementtotalDCSFraction
 

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 8 of file RPCDCSSummary.h.

Constructor & Destructor Documentation

◆ RPCDCSSummary()

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

Constructor.

Definition at line 14 of file RPCDCSSummary.cc.

14  {
15  numberOfDisks_ = ps.getUntrackedParameter<int>("NumberOfEndcapDisks", 4);
16 
17  FEDRange_.first = ps.getUntrackedParameter<unsigned int>("MinimumRPCFEDId", 790);
18  FEDRange_.second = ps.getUntrackedParameter<unsigned int>("MaximumRPCFEDId", 792);
19 
20  offlineDQM_ = ps.getUntrackedParameter<bool>("OfflineDQM", true);
21 
22  NumberOfFeds_ = FEDRange_.second - FEDRange_.first + 1;
23  init_ = false;
24  defaultValue_ = 1.;
25 }

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

◆ ~RPCDCSSummary()

RPCDCSSummary::~RPCDCSSummary ( )
override

Destructor.

Definition at line 27 of file RPCDCSSummary.cc.

27 {}

Member Function Documentation

◆ beginJob()

void RPCDCSSummary::beginJob ( void  )
overrideprotectedvirtual

Reimplemented from edm::one::EDProducerBase.

Definition at line 29 of file RPCDCSSummary.cc.

29 {}

◆ checkDCSbit()

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

Definition at line 49 of file RPCDCSSummary.cc.

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

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

Referenced by dqmEndLuminosityBlock().

◆ dqmEndJob()

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

Implements DQMEDHarvester.

Definition at line 43 of file RPCDCSSummary.cc.

43  {
44  if (offlineDQM_) {
45  this->myBooker(ibooker);
46  }
47 }

References myBooker(), and offlineDQM_.

◆ 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 31 of file RPCDCSSummary.cc.

34  {
35  if (!init_) {
36  this->checkDCSbit(setup);
37  if (!offlineDQM_) {
38  this->myBooker(ibooker);
39  }
40  }
41 }

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

◆ myBooker()

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

Definition at line 73 of file RPCDCSSummary.cc.

73  {
74  ibooker.setCurrentFolder("RPC/EventInfo");
75  // global fraction
76  totalDCSFraction = ibooker.bookFloat("DCSSummary");
78 
79  DCSMap_ = ibooker.book2D("DCSSummaryMap", "RPC DCS Summary Map", 15, -7.5, 7.5, 12, 0.5, 12.5);
80 
81  //customize the 2d histo
82  std::stringstream BinLabel;
83  for (int i = 1; i < 13; i++) {
84  BinLabel.str("");
85  BinLabel << "Sec" << i;
86  DCSMap_->setBinLabel(i, BinLabel.str(), 2);
87  }
88 
89  for (int i = -2; i <= 2; i++) {
90  BinLabel.str("");
91  BinLabel << "Wheel" << i;
92  DCSMap_->setBinLabel((i + 8), BinLabel.str(), 1);
93  }
94 
95  for (int i = 1; i <= numberOfDisks_; i++) {
96  BinLabel.str("");
97  BinLabel << "Disk" << i;
98  DCSMap_->setBinLabel((i + 11), BinLabel.str(), 1);
99  BinLabel.str("");
100  BinLabel << "Disk" << -i;
101  DCSMap_->setBinLabel((-i + 5), BinLabel.str(), 1);
102  }
103 
104  //fill the histo with "1" --- just for the moment
105  for (int i = 1; i <= 15; i++) {
106  for (int j = 1; j <= 12; j++) {
107  if (i == 5 || i == 11 || (j > 6 && (i < 6 || i > 10)))
108  DCSMap_->setBinContent(i, j, -1); //bins that not correspond to subdetector parts
109  else
111  }
112  }
113 
114  if (numberOfDisks_ < 4) {
115  for (int j = 1; j <= 12; j++) {
116  DCSMap_->setBinContent(1, j, -1); //bins that not correspond to subdetector parts
117  DCSMap_->setBinContent(15, j, -1);
118  }
119  }
120 
121  // book the ME
122  ibooker.setCurrentFolder("RPC/EventInfo/DCSContents");
123 
124  int limit = numberOfDisks_;
125  if (numberOfDisks_ < 2)
126  limit = 2;
127 
128  for (int i = -1 * limit; i <= limit; i++) { //loop on wheels and disks
129  if (i > -3 && i < 3) { //wheels
130  std::stringstream streams;
131  streams << "RPC_Wheel" << i;
132  dcsWheelFractions[i + 2] = ibooker.bookFloat(streams.str());
134  }
135 
136  if (i == 0 || i > numberOfDisks_ || i < (-1 * numberOfDisks_))
137  continue;
138 
139  int offset = numberOfDisks_;
140  if (i > 0)
141  offset--; //used to skip case equale to zero
142  std::stringstream streams;
143  streams << "RPC_Disk" << i;
144  dcsDiskFractions[i + 2] = ibooker.bookFloat(streams.str());
146  }
147 }

References CentralityFilter_cfi::BinLabel, dqm::implementation::IBooker::book2D(), dqm::implementation::IBooker::bookFloat(), dcsDiskFractions, DCSMap_, dcsWheelFractions, defaultValue_, dqm::impl::MonitorElement::Fill(), mps_fire::i, dqmiolumiharvest::j, remoteMonitoring_LED_IterMethod_cfg::limit, numberOfDisks_, hltrates_dqm_sourceclient-live_cfg::offset, dqm::impl::MonitorElement::setBinContent(), dqm::impl::MonitorElement::setBinLabel(), dqm::implementation::NavigatorBase::setCurrentFolder(), HLT_2018_cff::streams, and totalDCSFraction.

Referenced by dqmEndJob(), and dqmEndLuminosityBlock().

Member Data Documentation

◆ dcsDiskFractions

MonitorElement* RPCDCSSummary::dcsDiskFractions[10]
private

Definition at line 38 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[5]
private

Definition at line 37 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 39 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().

◆ numberOfDisks_

int RPCDCSSummary::numberOfDisks_
private

Definition at line 40 of file RPCDCSSummary.h.

Referenced by myBooker(), and RPCDCSSummary().

◆ NumberOfFeds_

int RPCDCSSummary::NumberOfFeds_
private

Definition at line 41 of file RPCDCSSummary.h.

Referenced by RPCDCSSummary().

◆ offlineDQM_

bool RPCDCSSummary::offlineDQM_
private

Definition at line 33 of file RPCDCSSummary.h.

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

◆ totalDCSFraction

MonitorElement* RPCDCSSummary::totalDCSFraction
private

Definition at line 36 of file RPCDCSSummary.h.

Referenced by myBooker().

mps_fire.i
i
Definition: mps_fire.py:355
RPCDCSSummary::FEDRange_
std::pair< int, int > FEDRange_
Definition: RPCDCSSummary.h:39
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
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
RPCDCSSummary::myBooker
void myBooker(DQMStore::IBooker &)
Definition: RPCDCSSummary.cc:73
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
RPCDCSSummary::init_
bool init_
Definition: RPCDCSSummary.h:30
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
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
RPCDCSSummary::numberOfDisks_
int numberOfDisks_
Definition: RPCDCSSummary.h:40
dqm::impl::MonitorElement::setBinContent
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
Definition: MonitorElement.cc:691
remoteMonitoring_LED_IterMethod_cfg.limit
limit
Definition: remoteMonitoring_LED_IterMethod_cfg.py:427
RPCDCSSummary::dcsWheelFractions
MonitorElement * dcsWheelFractions[5]
Definition: RPCDCSSummary.h:37
RPCDCSSummary::offlineDQM_
bool offlineDQM_
Definition: RPCDCSSummary.h:33
RPCDCSSummary::DCSMap_
MonitorElement * DCSMap_
Definition: RPCDCSSummary.h:35
HLT_2018_cff.streams
streams
Definition: HLT_2018_cff.py:3574
RPCDCSSummary::NumberOfFeds_
int NumberOfFeds_
Definition: RPCDCSSummary.h:41
RPCDCSSummary::dcsDiskFractions
MonitorElement * dcsDiskFractions[10]
Definition: RPCDCSSummary.h:38
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82
RPCDCSSummary::defaultValue_
double defaultValue_
Definition: RPCDCSSummary.h:31
RPCDCSSummary::checkDCSbit
void checkDCSbit(edm::EventSetup const &)
Definition: RPCDCSSummary.cc:49
RPCDCSSummary::totalDCSFraction
MonitorElement * totalDCSFraction
Definition: RPCDCSSummary.h:36
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116