CMS 3D CMS Logo

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

#include <RPCDcsInfoClient.h>

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

 RPCDcsInfoClient (const edm::ParameterSet &ps)
 
 ~RPCDcsInfoClient () 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 dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)
 
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::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
 
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 dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) 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 Attributes

const std::string dcsinfofolder_
 
const std::string dqmprovinfofolder_
 
const std::string eventinfofolder_
 

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 RPCDcsInfoClient.h.

Constructor & Destructor Documentation

◆ RPCDcsInfoClient()

RPCDcsInfoClient::RPCDcsInfoClient ( const edm::ParameterSet ps)

Definition at line 4 of file RPCDcsInfoClient.cc.

5  : dcsinfofolder_(ps.getUntrackedParameter<std::string>("dcsInfoFolder", "RPC/DCSInfo")),
6  eventinfofolder_(ps.getUntrackedParameter<std::string>("eventInfoFolder", "RPC/EventInfo")),
7  dqmprovinfofolder_(ps.getUntrackedParameter<std::string>("dqmProvInfoFolder", "Info/EventInfo")) {}

◆ ~RPCDcsInfoClient()

RPCDcsInfoClient::~RPCDcsInfoClient ( )
overridedefault

Member Function Documentation

◆ dqmEndJob()

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

Implements DQMEDHarvester.

Definition at line 9 of file RPCDcsInfoClient.cc.

9  {
10  // book
11  ibooker.cd();
13 
14  MonitorElement* reportSummaryMap = igetter.get(dqmprovinfofolder_ + "/reportSummaryMap");
15  MonitorElement* eventInfoLumi = igetter.get(eventinfofolder_ + "/iLumiSection");
16 
17  if (!reportSummaryMap)
18  return;
19 
20  TH2F* h2 = reportSummaryMap->getTH2F();
21  if (!h2)
22  return;
23  const int maxLS = reportSummaryMap->getNbinsX();
24 
25  int nLS = eventInfoLumi->getIntValue();
26  if (nLS <= 0 or nLS > maxLS) {
27  // If the nLS from the event info is not valid, we take the value from the
28  // reportSummaryMap. The histogram is initialized with -1 value then filled
29  // with non-negative value for valid LSs.
30  // Note that we start from the first bin, since many runs have small nLS.
31  for (nLS = 1; nLS <= maxLS; ++nLS) {
32  const double dcsBit = h2->GetBinContent(nLS, 1);
33  if (dcsBit == -1)
34  break;
35  }
36  }
37 
38  MonitorElement* rpcHVStatus = ibooker.book2D("rpcHVStatus", "RPC HV Status", nLS, 1., nLS + 1, 1, 0.5, 1.5);
39  rpcHVStatus->setAxisTitle("Luminosity Section", 1);
40  rpcHVStatus->setBinLabel(1, "", 2);
41 
42  // Find bin number of RPC from the EventInfo's reportSummaryMap
43  int binRPC = 0;
44  for (int i = 1, nbinsY = reportSummaryMap->getNbinsY(); i <= nbinsY; ++i) {
45  const std::string binLabel = h2->GetYaxis()->GetBinLabel(i);
46  if (binLabel == "RPC") {
47  binRPC = i;
48  break;
49  }
50  }
51  if (binRPC == 0)
52  return;
53 
54  // Take bin contents from the reportSummaryMap and fill into the RPC DCSInfo
55  int nLSRPC = 0;
56  for (int i = 1; i <= nLS; ++i) {
57  const double dcsBit = h2->GetBinContent(i, binRPC);
58  const int hvStatus = (dcsBit != -1) ? 1 : 0;
59  if (hvStatus != 0) {
60  ++nLSRPC;
61  rpcHVStatus->setBinContent(i, 1, hvStatus);
62  }
63  }
64 
65  MonitorElement* rpcHV = ibooker.bookInt("rpcHV");
66  rpcHV->Fill(nLSRPC);
67 }

References dqm::implementation::IBooker::book2D(), dqm::implementation::IBooker::bookInt(), dqm::implementation::NavigatorBase::cd(), dcsinfofolder_, dqmprovinfofolder_, eventinfofolder_, dqm::impl::MonitorElement::Fill(), dqm::implementation::IGetter::get(), dqm::impl::MonitorElement::getIntValue(), dqm::impl::MonitorElement::getNbinsX(), dqm::impl::MonitorElement::getNbinsY(), dqm::legacy::MonitorElement::getTH2F(), mps_fire::i, hlt_dqm_clientPB-live_cfg::nbinsY, dqm::impl::MonitorElement::setAxisTitle(), dqm::impl::MonitorElement::setBinContent(), dqm::impl::MonitorElement::setBinLabel(), dqm::implementation::NavigatorBase::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

Member Data Documentation

◆ dcsinfofolder_

const std::string RPCDcsInfoClient::dcsinfofolder_
private

Definition at line 17 of file RPCDcsInfoClient.h.

Referenced by dqmEndJob().

◆ dqmprovinfofolder_

const std::string RPCDcsInfoClient::dqmprovinfofolder_
private

Definition at line 19 of file RPCDcsInfoClient.h.

Referenced by dqmEndJob().

◆ eventinfofolder_

const std::string RPCDcsInfoClient::eventinfofolder_
private

Definition at line 18 of file RPCDcsInfoClient.h.

Referenced by dqmEndJob().

mps_fire.i
i
Definition: mps_fire.py:428
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
RPCDcsInfoClient::dqmprovinfofolder_
const std::string dqmprovinfofolder_
Definition: RPCDcsInfoClient.h:19
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
dqm::implementation::NavigatorBase::cd
virtual void cd()
Definition: DQMStore.cc:29
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
hlt_dqm_clientPB-live_cfg.nbinsY
nbinsY
Definition: hlt_dqm_clientPB-live_cfg.py:69
dqm::impl::MonitorElement::getNbinsY
virtual int getNbinsY() const
get # of bins in Y-axis
Definition: MonitorElement.cc:580
dqm::implementation::IBooker::bookInt
MonitorElement * bookInt(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:73
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
RPCDcsInfoClient::eventinfofolder_
const std::string eventinfofolder_
Definition: RPCDcsInfoClient.h:18
dqm::impl::MonitorElement::setBinContent
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
Definition: MonitorElement.cc:691
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
dqm::impl::MonitorElement::getNbinsX
virtual int getNbinsX() const
get # of bins in X-axis
Definition: MonitorElement.cc:574
dqm::implementation::IGetter::get
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:651
RPCDcsInfoClient::dcsinfofolder_
const std::string dcsinfofolder_
Definition: RPCDcsInfoClient.h:17
dqm::impl::MonitorElement::setAxisTitle
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:800
dqm::impl::MonitorElement::getIntValue
virtual int64_t getIntValue() const
Definition: MonitorElement.cc:924
dqm::legacy::MonitorElement::getTH2F
virtual TH2F * getTH2F() const
Definition: MonitorElement.h:491