CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
NoiseRatesClient Class Reference

#include <NoiseRatesClient.h>

Inheritance diagram for NoiseRatesClient:
DQMEDHarvester edm::one::EDProducer< T > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
 NoiseRatesClient (const edm::ParameterSet &)
 
int NoiseRatesEndjob (const std::vector< MonitorElement * > &hcalMEs)
 
virtual void runClient_ (DQMStore::IBooker &, DQMStore::IGetter &)
 
 ~NoiseRatesClient () 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< T >
 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
 
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)
 
 ~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
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
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< B > consumes (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 () noexcept
 
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...
 
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 32 of file NoiseRatesClient.h.

Constructor & Destructor Documentation

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

Definition at line 11 of file NoiseRatesClient.cc.

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

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

Definition at line 20 of file NoiseRatesClient.cc.

20 {}

Member Function Documentation

void NoiseRatesClient::dqmEndJob ( DQMStore::IBooker ib,
DQMStore::IGetter ig 
)
overridevirtual

Implements DQMEDHarvester.

Definition at line 22 of file NoiseRatesClient.cc.

References runClient_().

22 { runClient_(ib, ig); }
virtual void runClient_(DQMStore::IBooker &, DQMStore::IGetter &)
int NoiseRatesClient::NoiseRatesEndjob ( const std::vector< MonitorElement * > &  hcalMEs)

Definition at line 59 of file NoiseRatesClient.cc.

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

Referenced by runClient_().

59  {
60  int useAllHistos = 0;
61  MonitorElement *hLumiBlockCount = nullptr;
62  for (unsigned int ih = 0; ih < hcalMEs.size(); ih++) {
63  if (strcmp(hcalMEs[ih]->getName().c_str(), "hLumiBlockCount") == 0) {
64  hLumiBlockCount = hcalMEs[ih];
65  useAllHistos = 1;
66  }
67  }
68  if (useAllHistos != 0 && useAllHistos != 1)
69  return 0;
70 
71  // FIXME: dummy lumiCountMap.size since hLumiBlockCount is disabled
72  // in a general case.
73  int lumiCountMapsize = -1; // dummy
74  if (useAllHistos)
75  hLumiBlockCount->Fill(0.0, lumiCountMapsize);
76 
77  return 1;
78 }
void Fill(long long x)
TString getName(TString structure, int layer, TString geometry)
Definition: DMRtrends.cc:236
void NoiseRatesClient::runClient_ ( DQMStore::IBooker ib,
DQMStore::IGetter ig 
)
virtual

Definition at line 24 of file NoiseRatesClient.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_.

Referenced by dqmEndJob().

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

Member Data Documentation

edm::ParameterSet NoiseRatesClient::conf_
private

Definition at line 36 of file NoiseRatesClient.h.

bool NoiseRatesClient::debug_
private

Definition at line 39 of file NoiseRatesClient.h.

Referenced by NoiseRatesClient().

std::string NoiseRatesClient::dirName_
private

Definition at line 41 of file NoiseRatesClient.h.

Referenced by NoiseRatesClient(), and runClient_().

std::string NoiseRatesClient::dirNameJet_
private

Definition at line 42 of file NoiseRatesClient.h.

std::string NoiseRatesClient::dirNameMET_
private

Definition at line 43 of file NoiseRatesClient.h.

std::string NoiseRatesClient::outputFile_
private

Definition at line 34 of file NoiseRatesClient.h.

Referenced by NoiseRatesClient().

bool NoiseRatesClient::verbose_
private

Definition at line 38 of file NoiseRatesClient.h.

Referenced by NoiseRatesClient(), and runClient_().