CMS 3D CMS Logo

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

#include <DQMScaleToClient.h>

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

 DQMScaleToClient (const edm::ParameterSet &ps)
 
 ~DQMScaleToClient () 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)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
static void fillMePSetDescription (edm::ParameterSetDescription &pset)
 
static void fillOutputMePSetDescription (edm::ParameterSetDescription &pset)
 
- 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 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)
 

Static Private Member Functions

static MEPSet getHistoPSet (edm::ParameterSet pset)
 
static OutputMEPSet getOutputHistoPSet (edm::ParameterSet pset)
 

Private Attributes

MEPSet inputmepset_
 
OutputMEPSet outputmepset_
 
MonitorElementscaled_
 

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
template<typename T >
using BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T >
 
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
 
- 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 28 of file DQMScaleToClient.h.

Constructor & Destructor Documentation

◆ DQMScaleToClient()

DQMScaleToClient::DQMScaleToClient ( const edm::ParameterSet ps)

Definition at line 8 of file DQMScaleToClient.cc.

References scaled_.

9  : inputmepset_(getHistoPSet(iConfig.getParameter<edm::ParameterSet>("inputme"))),
10  outputmepset_(getOutputHistoPSet(iConfig.getParameter<edm::ParameterSet>("outputme"))) {
11  edm::LogInfo("DQMScaleToClient") << "Constructor DQMScaleToClient::DQMScaleToClient " << std::endl;
12 
13  scaled_ = nullptr;
14 }
OutputMEPSet outputmepset_
MonitorElement * scaled_
Log< level::Info, false > LogInfo
static OutputMEPSet getOutputHistoPSet(edm::ParameterSet pset)
static MEPSet getHistoPSet(edm::ParameterSet pset)

◆ ~DQMScaleToClient()

DQMScaleToClient::~DQMScaleToClient ( )
overridedefault

Member Function Documentation

◆ beginJob()

void DQMScaleToClient::beginJob ( void  )
overrideprotectedvirtual

Reimplemented from edm::one::EDProducerBase.

Definition at line 34 of file DQMScaleToClient.cc.

34 { edm::LogInfo("DQMScaleToClient") << "DQMScaleToClient::beginJob " << std::endl; }
Log< level::Info, false > LogInfo

◆ dqmEndJob()

void DQMScaleToClient::dqmEndJob ( DQMStore::IBooker ibooker_,
DQMStore::IGetter igetter_ 
)
overrideprotectedvirtual

Implements DQMEDHarvester.

Definition at line 39 of file DQMScaleToClient.cc.

References dqm::implementation::IBooker::book1D(), OutputMEPSet::factor, MEPSet::folder, OutputMEPSet::folder, dqm::implementation::IGetter::get(), dqm::legacy::MonitorElement::getTH1(), DQMScaleToClient_cfi::inputme, inputmepset_, funct::integral(), MEPSet::name, OutputMEPSet::name, outputmepset_, scaled_, dqm::implementation::NavigatorBase::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

39  {
40  std::string hname = "";
41 
42  // create and cd into new folder
43  std::string currentFolder = outputmepset_.folder;
44  ibooker_.setCurrentFolder(currentFolder);
45 
46  //get available histograms
47  hname = inputmepset_.folder + "/" + inputmepset_.name;
48  MonitorElement* inputme = igetter_.get(hname);
49 
50  if (!inputme) {
51  edm::LogError("DQMScaleToClient") << "MEs not found! "
52  << inputmepset_.folder + "/" + inputmepset_.name + " not found " << std::endl;
53  return;
54  }
55 
56  //book new histogram
57  ibooker_.setCurrentFolder(currentFolder);
58  hname = outputmepset_.name;
59  scaled_ = ibooker_.book1D(hname, (TH1F*)inputme->getTH1()->Clone(hname.c_str()));
60 
61  // handle mes
62  double integral = (scaled_->getTH1()->Integral() > 0. ? scaled_->getTH1()->Integral() : 1.);
64 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
OutputMEPSet outputmepset_
std::string folder
Log< level::Error, false > LogError
std::string folder
MonitorElement * scaled_
Integral< F, X >::type integral(const F &f)
Definition: Integral.h:70
std::string name
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:690
virtual TH1 * getTH1() const
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98

◆ dqmEndLuminosityBlock()

void DQMScaleToClient::dqmEndLuminosityBlock ( DQMStore::IBooker ibooker_,
DQMStore::IGetter igetter_,
edm::LuminosityBlock const &  iLumi,
edm::EventSetup const &  iSetup 
)
overrideprotectedvirtual

Reimplemented from DQMEDHarvester.

Definition at line 69 of file DQMScaleToClient.cc.

72  {
73  edm::LogInfo("DQMScaleToClient") << "DQMScaleToClient::endLumi " << std::endl;
74 }
Log< level::Info, false > LogInfo

◆ fillDescriptions()

void DQMScaleToClient::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 87 of file DQMScaleToClient.cc.

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, fillMePSetDescription(), and fillOutputMePSetDescription().

87  {
89  edm::ParameterSetDescription outputmePSet;
90  fillOutputMePSetDescription(outputmePSet);
91  desc.add<edm::ParameterSetDescription>("outputme", outputmePSet);
92 
93  edm::ParameterSetDescription inputmePSet;
94  fillMePSetDescription(inputmePSet);
95  desc.add<edm::ParameterSetDescription>("inputme", inputmePSet);
96 
97  descriptions.add("dqmScaleToClient", desc);
98 }
static void fillMePSetDescription(edm::ParameterSetDescription &pset)
static void fillOutputMePSetDescription(edm::ParameterSetDescription &pset)
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ fillMePSetDescription()

void DQMScaleToClient::fillMePSetDescription ( edm::ParameterSetDescription pset)
static

Definition at line 76 of file DQMScaleToClient.cc.

References muonDTDigis_cfi::pset, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by fillDescriptions().

76  {
77  pset.add<std::string>("folder", "");
78  pset.add<std::string>("name", "");
79 }

◆ fillOutputMePSetDescription()

void DQMScaleToClient::fillOutputMePSetDescription ( edm::ParameterSetDescription pset)
static

Definition at line 81 of file DQMScaleToClient.cc.

References muonDTDigis_cfi::pset, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by fillDescriptions().

81  {
82  pset.add<std::string>("folder", "");
83  pset.add<std::string>("name", "");
84  pset.add<double>("factor", 1.);
85 }

◆ getHistoPSet()

MEPSet DQMScaleToClient::getHistoPSet ( edm::ParameterSet  pset)
staticprivate

Definition at line 16 of file DQMScaleToClient.cc.

References muonDTDigis_cfi::pset, and AlCaHLTBitMon_QueryRunRegistry::string.

16  {
17  return MEPSet{
18  pset.getParameter<std::string>("name"),
19  pset.getParameter<std::string>("folder"),
20  };
21 }

◆ getOutputHistoPSet()

OutputMEPSet DQMScaleToClient::getOutputHistoPSet ( edm::ParameterSet  pset)
staticprivate

Definition at line 23 of file DQMScaleToClient.cc.

References muonDTDigis_cfi::pset, and AlCaHLTBitMon_QueryRunRegistry::string.

23  {
24  return OutputMEPSet{
25  pset.getParameter<std::string>("name"),
26  pset.getParameter<std::string>("folder"),
27  pset.getParameter<double>("factor"),
28  };
29 }

Member Data Documentation

◆ inputmepset_

MEPSet DQMScaleToClient::inputmepset_
private

Definition at line 54 of file DQMScaleToClient.h.

Referenced by dqmEndJob().

◆ outputmepset_

OutputMEPSet DQMScaleToClient::outputmepset_
private

Definition at line 55 of file DQMScaleToClient.h.

Referenced by dqmEndJob().

◆ scaled_

MonitorElement* DQMScaleToClient::scaled_
private

Definition at line 52 of file DQMScaleToClient.h.

Referenced by dqmEndJob(), and DQMScaleToClient().