CMS 3D CMS Logo

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

#include <HcalNoiseRatesClient.h>

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

void beginJob (void) override
 
void beginRun (const edm::Run &run, const edm::EventSetup &c) override
 
void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
 HcalNoiseRatesClient (const edm::ParameterSet &)
 
int NoiseRatesEndjob (const std::vector< MonitorElement *> &hcalMEs)
 
 ~HcalNoiseRatesClient () 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 (edm::ParameterSet const &iConfig)
 
 DQMEDHarvester ()
 
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
 
 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)
 

Private Attributes

edm::ParameterSet conf_
 
bool debug_
 
std::string dirName_
 
std::string dirNameJet_
 
std::string dirNameMET_
 
std::string outputFile_
 
bool verbose_
 

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
 
- 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 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)
 
- 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 31 of file HcalNoiseRatesClient.h.

Constructor & Destructor Documentation

◆ HcalNoiseRatesClient()

HcalNoiseRatesClient::HcalNoiseRatesClient ( const edm::ParameterSet iConfig)
explicit

Definition at line 10 of file HcalNoiseRatesClient.cc.

References debug_, dirName_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), outputFile_, AlCaHLTBitMon_QueryRunRegistry::string, and verbose_.

10  : conf_(iConfig) {
11  outputFile_ = iConfig.getUntrackedParameter<std::string>("outputFile", "myfile.root");
12  debug_ = false;
13  verbose_ = false;
14  dirName_ = iConfig.getParameter<std::string>("DQMDirName");
15 }
edm::ParameterSet conf_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
T getUntrackedParameter(std::string const &, T const &) const

◆ ~HcalNoiseRatesClient()

HcalNoiseRatesClient::~HcalNoiseRatesClient ( )
override

Definition at line 17 of file HcalNoiseRatesClient.cc.

17 {}

Member Function Documentation

◆ beginJob()

void HcalNoiseRatesClient::beginJob ( void  )
overridevirtual

Reimplemented from edm::one::EDProducerBase.

Definition at line 19 of file HcalNoiseRatesClient.cc.

19 {}

◆ beginRun()

void HcalNoiseRatesClient::beginRun ( const edm::Run run,
const edm::EventSetup c 
)
override

Definition at line 21 of file HcalNoiseRatesClient.cc.

21 {}

◆ dqmEndJob()

void HcalNoiseRatesClient::dqmEndJob ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
overridevirtual

Implements DQMEDHarvester.

Definition at line 23 of file HcalNoiseRatesClient.cc.

References gather_cfg::cout, dirName_, dqm::implementation::IGetter::getContents(), dqm::implementation::IGetter::getSubdirs(), mps_fire::i, dqmiolumiharvest::j, NoiseRatesEndjob(), dqm::implementation::NavigatorBase::setCurrentFolder(), and verbose_.

23  {
24  igetter.setCurrentFolder(dirName_);
25 
26  if (verbose_)
27  std::cout << "\nrunClient" << std::endl;
28 
29  std::vector<MonitorElement *> hcalMEs;
30 
31  // Since out folders are fixed to three, we can just go over these three
32  // folders i.e., CaloTowersD/CaloTowersTask, HcalRecHitsD/HcalRecHitTask,
33  // HcalNoiseRatesD/NoiseRatesTask.
34  std::vector<std::string> fullPathHLTFolders = igetter.getSubdirs();
35  for (unsigned int i = 0; i < fullPathHLTFolders.size(); i++) {
36  if (verbose_)
37  std::cout << "\nfullPath: " << fullPathHLTFolders[i] << std::endl;
38  igetter.setCurrentFolder(fullPathHLTFolders[i]);
39 
40  std::vector<std::string> fullSubPathHLTFolders = igetter.getSubdirs();
41  for (unsigned int j = 0; j < fullSubPathHLTFolders.size(); j++) {
42  if (verbose_)
43  std::cout << "fullSub: " << fullSubPathHLTFolders[j] << std::endl;
44 
45  if (strcmp(fullSubPathHLTFolders[j].c_str(), "HcalNoiseRatesD/NoiseRatesTask") == 0) {
46  hcalMEs = igetter.getContents(fullSubPathHLTFolders[j]);
47  if (verbose_)
48  std::cout << "hltMES size : " << hcalMEs.size() << std::endl;
49  if (!NoiseRatesEndjob(hcalMEs))
50  std::cout << "\nError in NoiseRatesEndjob!" << std::endl << std::endl;
51  }
52  }
53  }
54 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
int NoiseRatesEndjob(const std::vector< MonitorElement *> &hcalMEs)
virtual std::vector< dqm::harvesting::MonitorElement * > getContents(std::string const &path) const
Definition: DQMStore.cc:625
virtual DQM_DEPRECATED std::vector< std::string > getSubdirs() const
Definition: DQMStore.cc:739

◆ NoiseRatesEndjob()

int HcalNoiseRatesClient::NoiseRatesEndjob ( const std::vector< MonitorElement *> &  hcalMEs)

Definition at line 58 of file HcalNoiseRatesClient.cc.

References dqm::impl::MonitorElement::Fill(), ForwardName::getName(), and CaloTowersParam_cfi::useAllHistos.

Referenced by dqmEndJob().

58  {
59  int useAllHistos = 0;
60  MonitorElement *hLumiBlockCount = nullptr;
61  for (unsigned int ih = 0; ih < hcalMEs.size(); ih++) {
62  if (strcmp(hcalMEs[ih]->getName().c_str(), "hLumiBlockCount") == 0) {
63  hLumiBlockCount = hcalMEs[ih];
64  useAllHistos = 1;
65  }
66  }
67  if (useAllHistos != 0 && useAllHistos != 1)
68  return 0;
69 
70  // FIXME: dummy lumiCountMap.size since hLumiBlockCount is disabled
71  // in a general case.
72  int lumiCountMapsize = -1; // dummy
73  if (useAllHistos)
74  hLumiBlockCount->Fill(0.0, lumiCountMapsize);
75 
76  return 1;
77 }
void Fill(long long x)
std::string getName(const G4String &)
Definition: ForwardName.cc:3

Member Data Documentation

◆ conf_

edm::ParameterSet HcalNoiseRatesClient::conf_
private

Definition at line 35 of file HcalNoiseRatesClient.h.

◆ debug_

bool HcalNoiseRatesClient::debug_
private

Definition at line 38 of file HcalNoiseRatesClient.h.

Referenced by HcalNoiseRatesClient().

◆ dirName_

std::string HcalNoiseRatesClient::dirName_
private

Definition at line 40 of file HcalNoiseRatesClient.h.

Referenced by dqmEndJob(), and HcalNoiseRatesClient().

◆ dirNameJet_

std::string HcalNoiseRatesClient::dirNameJet_
private

Definition at line 41 of file HcalNoiseRatesClient.h.

◆ dirNameMET_

std::string HcalNoiseRatesClient::dirNameMET_
private

Definition at line 42 of file HcalNoiseRatesClient.h.

◆ outputFile_

std::string HcalNoiseRatesClient::outputFile_
private

Definition at line 33 of file HcalNoiseRatesClient.h.

Referenced by HcalNoiseRatesClient().

◆ verbose_

bool HcalNoiseRatesClient::verbose_
private

Definition at line 37 of file HcalNoiseRatesClient.h.

Referenced by dqmEndJob(), and HcalNoiseRatesClient().