CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | 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)
 Constructor. More...
 
 ~RPCDataCertification () 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 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
 
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
 
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::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 = 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 [10]
 
MonitorElementCertMap_
 
MonitorElementcertWheelFractions [5]
 
double defaultValue_
 
std::pair< int, int > FEDRange_
 
bool init_
 
int numberOfDisks_
 
int NumberOfFeds_
 
bool offlineDQM_
 
MonitorElementtotalCertFraction
 

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

Constructor & Destructor Documentation

◆ RPCDataCertification()

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

Constructor.

Definition at line 13 of file RPCDataCertification.cc.

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

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

◆ ~RPCDataCertification()

RPCDataCertification::~RPCDataCertification ( )
override

Destructor.

Definition at line 24 of file RPCDataCertification.cc.

24 {}

Member Function Documentation

◆ beginJob()

void RPCDataCertification::beginJob ( void  )
overrideprotectedvirtual

Reimplemented from edm::one::EDProducerBase.

Definition at line 26 of file RPCDataCertification.cc.

26 {}

◆ checkFED()

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

Definition at line 47 of file RPCDataCertification.cc.

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

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

Referenced by dqmEndLuminosityBlock().

◆ dqmEndJob()

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

Implements DQMEDHarvester.

Definition at line 41 of file RPCDataCertification.cc.

41  {
42  if (offlineDQM_) {
43  this->myBooker(ibooker);
44  }
45 }

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 28 of file RPCDataCertification.cc.

31  {
32  if (!init_) {
33  this->checkFED(setup);
34 
35  if (!offlineDQM_) {
36  this->myBooker(ibooker);
37  }
38  }
39 }

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

◆ myBooker()

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

Definition at line 74 of file RPCDataCertification.cc.

74  {
75  ibooker.setCurrentFolder("RPC/EventInfo");
76  // global fraction
77  totalCertFraction = ibooker.bookFloat("CertificationSummary");
79 
80  CertMap_ = ibooker.book2D("CertificationSummaryMap", "RPC Certification Summary Map", 15, -7.5, 7.5, 12, 0.5, 12.5);
81 
82  //customize the 2d histo
83  std::stringstream BinLabel;
84  for (int i = 1; i < 13; i++) {
85  BinLabel.str("");
86  BinLabel << "Sec" << i;
87  CertMap_->setBinLabel(i, BinLabel.str(), 2);
88  }
89 
90  for (int i = -2; i <= 2; i++) {
91  BinLabel.str("");
92  BinLabel << "Wheel" << i;
93  CertMap_->setBinLabel(i + 8, BinLabel.str(), 1);
94  }
95 
96  for (int i = 1; i <= numberOfDisks_; i++) {
97  BinLabel.str("");
98  BinLabel << "Disk" << i;
99  CertMap_->setBinLabel((i + 11), BinLabel.str(), 1);
100  BinLabel.str("");
101  BinLabel << "Disk" << -i;
102  CertMap_->setBinLabel((-i + 5), BinLabel.str(), 1);
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  CertMap_->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  CertMap_->setBinContent(1, j, -1); //bins that not correspond to subdetector parts
117  CertMap_->setBinContent(15, j, -1);
118  }
119  }
120  // book the ME
121  ibooker.setCurrentFolder("RPC/EventInfo/CertificationContents");
122 
123  int limit = numberOfDisks_;
124  if (numberOfDisks_ < 2)
125  limit = 2;
126 
127  for (int i = -1 * limit; i <= limit; i++) { //loop on wheels and disks
128  if (i > -3 && i < 3) { //wheels
129  std::stringstream streams;
130  streams << "RPC_Wheel" << i;
131  certWheelFractions[i + 2] = ibooker.bookFloat(streams.str());
133  }
134 
135  if (i == 0 || i > numberOfDisks_ || i < (-1 * numberOfDisks_))
136  continue;
137 
138  int offset = numberOfDisks_;
139  if (i > 0)
140  offset--; //used to skip case equale to zero
141  std::stringstream streams;
142  streams << "RPC_Disk" << i;
143  certDiskFractions[i + 2] = ibooker.bookFloat(streams.str());
145  }
146 }

References CentralityFilter_cfi::BinLabel, dqm::implementation::IBooker::book2D(), dqm::implementation::IBooker::bookFloat(), certDiskFractions, CertMap_, certWheelFractions, 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_Fake1_cff::streams, and totalCertFraction.

Referenced by dqmEndJob(), and dqmEndLuminosityBlock().

Member Data Documentation

◆ certDiskFractions

MonitorElement* RPCDataCertification::certDiskFractions[10]
private

Definition at line 31 of file RPCDataCertification.h.

Referenced by myBooker().

◆ CertMap_

MonitorElement* RPCDataCertification::CertMap_
private

Definition at line 28 of file RPCDataCertification.h.

Referenced by myBooker().

◆ certWheelFractions

MonitorElement* RPCDataCertification::certWheelFractions[5]
private

Definition at line 30 of file RPCDataCertification.h.

Referenced by myBooker().

◆ defaultValue_

double RPCDataCertification::defaultValue_
private

Definition at line 36 of file RPCDataCertification.h.

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

◆ FEDRange_

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

Definition at line 32 of file RPCDataCertification.h.

Referenced by checkFED(), and RPCDataCertification().

◆ init_

bool RPCDataCertification::init_
private

Definition at line 35 of file RPCDataCertification.h.

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

◆ numberOfDisks_

int RPCDataCertification::numberOfDisks_
private

Definition at line 33 of file RPCDataCertification.h.

Referenced by myBooker(), and RPCDataCertification().

◆ NumberOfFeds_

int RPCDataCertification::NumberOfFeds_
private

Definition at line 34 of file RPCDataCertification.h.

Referenced by RPCDataCertification().

◆ offlineDQM_

bool RPCDataCertification::offlineDQM_
private

Definition at line 35 of file RPCDataCertification.h.

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

◆ totalCertFraction

MonitorElement* RPCDataCertification::totalCertFraction
private

Definition at line 29 of file RPCDataCertification.h.

Referenced by myBooker().

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:28
RPCDataCertification::offlineDQM_
bool offlineDQM_
Definition: RPCDataCertification.h:35
RPCDataCertification::totalCertFraction
MonitorElement * totalCertFraction
Definition: RPCDataCertification.h:29
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
RPCDataCertification::certWheelFractions
MonitorElement * certWheelFractions[5]
Definition: RPCDataCertification.h:30
RPCDataCertification::myBooker
void myBooker(DQMStore::IBooker &)
Definition: RPCDataCertification.cc:74
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:32
RunInfo::m_fed_in
std::vector< int > m_fed_in
Definition: RunInfo.h:25
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
RPCDataCertification::certDiskFractions
MonitorElement * certDiskFractions[10]
Definition: RPCDataCertification.h:31
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
edm::ESHandle
Definition: DTSurvey.h:22
RPCDataCertification::checkFED
void checkFED(edm::EventSetup const &)
Definition: RPCDataCertification.cc:47
RPCDataCertification::NumberOfFeds_
int NumberOfFeds_
Definition: RPCDataCertification.h:34
CentralityFilter_cfi.BinLabel
BinLabel
Definition: CentralityFilter_cfi.py:5
HLT_Fake1_cff.streams
streams
Definition: HLT_Fake1_cff.py:13
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
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
dqm::implementation::IBooker::book2D
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
RPCDataCertification::init_
bool init_
Definition: RPCDataCertification.h:35
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82
RPCDataCertification::defaultValue_
double defaultValue_
Definition: RPCDataCertification.h:36
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116
RPCDataCertification::numberOfDisks_
int numberOfDisks_
Definition: RPCDataCertification.h:33