CMS 3D CMS Logo

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

#include <NoiseRatesClient.h>

Inheritance diagram for NoiseRatesClient:
DQMEDHarvester edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

virtual void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &)
 
 NoiseRatesClient (const edm::ParameterSet &)
 
int NoiseRatesEndjob (const std::vector< MonitorElement * > &hcalMEs)
 
virtual void runClient_ (DQMStore::IBooker &, DQMStore::IGetter &)
 
virtual ~NoiseRatesClient ()
 
- Public Member Functions inherited from DQMEDHarvester
virtual void analyze (edm::Event const &, edm::EventSetup const &) final
 
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
virtual void beginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDHarvester (void)
 
virtual void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void endJob () final
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
virtual void endRun (edm::Run const &, edm::EventSetup const &)
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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 edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
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 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)
 

Detailed Description

Definition at line 34 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 {
13 
14  outputFile_ = iConfig.getUntrackedParameter<std::string>("outputFile", "myfile.root");
15 
16  debug_ = false;
17  verbose_ = false;
18 
19  dirName_=iConfig.getParameter<std::string>("DQMDirName");
20 
21 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::string dirName_
edm::ParameterSet conf_
std::string outputFile_
NoiseRatesClient::~NoiseRatesClient ( )
virtual

Definition at line 24 of file NoiseRatesClient.cc.

25 {
26 
27 }

Member Function Documentation

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

Implements DQMEDHarvester.

Definition at line 31 of file NoiseRatesClient.cc.

References runClient_().

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

Definition at line 71 of file NoiseRatesClient.cc.

References MonitorElement::Fill().

Referenced by runClient_().

71  {
72 
73  int useAllHistos = 0;
74  MonitorElement* hLumiBlockCount =0;
75  for(unsigned int ih=0; ih<hcalMEs.size(); ih++){
76  if( strcmp(hcalMEs[ih]->getName().c_str(), "hLumiBlockCount") ==0 ){
77  hLumiBlockCount = hcalMEs[ih];
78  useAllHistos =1;
79  }
80  }
81  if( useAllHistos !=0 && useAllHistos !=1 ) return 0;
82 
83 // FIXME: dummy lumiCountMap.size since hLumiBlockCount is disabled
84 // in a general case.
85  int lumiCountMapsize = -1; // dummy
86  if (useAllHistos) hLumiBlockCount->Fill(0.0, lumiCountMapsize);
87 
88  return 1;
89 
90 }
void Fill(long long x)
void NoiseRatesClient::runClient_ ( DQMStore::IBooker ib,
DQMStore::IGetter ig 
)
virtual

Definition at line 36 of file NoiseRatesClient.cc.

References gather_cfg::cout, dirName_, DQMStore::IGetter::getContents(), DQMStore::IGetter::getSubdirs(), i, j, NoiseRatesEndjob(), DQMStore::IGetter::setCurrentFolder(), and verbose_.

Referenced by dqmEndJob().

37 {
39 
40  if (verbose_) std::cout << "\nrunClient" << std::endl;
41 
42  std::vector<MonitorElement*> hcalMEs;
43 
44  // Since out folders are fixed to three, we can just go over these three folders
45  // i.e., CaloTowersV/CaloTowersTask, HcalRecHitsV/HcalRecHitTask, NoiseRatesV/NoiseRatesTask.
46  std::vector<std::string> fullPathHLTFolders = ig.getSubdirs();
47  for(unsigned int i=0;i<fullPathHLTFolders.size();i++) {
48 
49  if (verbose_) std::cout <<"\nfullPath: "<< fullPathHLTFolders[i] << std::endl;
50  ig.setCurrentFolder(fullPathHLTFolders[i]);
51 
52  std::vector<std::string> fullSubPathHLTFolders = ig.getSubdirs();
53  for(unsigned int j=0;j<fullSubPathHLTFolders.size();j++) {
54 
55  if (verbose_) std::cout <<"fullSub: "<<fullSubPathHLTFolders[j] << std::endl;
56 
57  if( strcmp(fullSubPathHLTFolders[j].c_str(), "NoiseRatesV/NoiseRatesTask") ==0 ){
58  hcalMEs = ig.getContents(fullSubPathHLTFolders[j]);
59  if (verbose_) std::cout <<"hltMES size : "<<hcalMEs.size()<<std::endl;
60  if( !NoiseRatesEndjob(hcalMEs) ) std::cout<<"\nError in NoiseRatesEndjob!"<<std::endl<<std::endl;
61  }
62 
63  }
64 
65  }
66 
67 }
std::vector< MonitorElement * > getContents(Args &&...args)
Definition: DQMStore.h:197
int i
Definition: DBlmapReader.cc:9
std::string dirName_
int j
Definition: DBlmapReader.cc:9
std::vector< std::string > getSubdirs(void)
Definition: DQMStore.cc:306
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:330
int NoiseRatesEndjob(const std::vector< MonitorElement * > &hcalMEs)
tuple cout
Definition: gather_cfg.py:121

Member Data Documentation

edm::ParameterSet NoiseRatesClient::conf_
private

Definition at line 39 of file NoiseRatesClient.h.

bool NoiseRatesClient::debug_
private

Definition at line 42 of file NoiseRatesClient.h.

Referenced by NoiseRatesClient().

std::string NoiseRatesClient::dirName_
private

Definition at line 44 of file NoiseRatesClient.h.

Referenced by NoiseRatesClient(), and runClient_().

std::string NoiseRatesClient::dirNameJet_
private

Definition at line 45 of file NoiseRatesClient.h.

std::string NoiseRatesClient::dirNameMET_
private

Definition at line 46 of file NoiseRatesClient.h.

std::string NoiseRatesClient::outputFile_
private

Definition at line 37 of file NoiseRatesClient.h.

Referenced by NoiseRatesClient().

bool NoiseRatesClient::verbose_
private

Definition at line 41 of file NoiseRatesClient.h.

Referenced by NoiseRatesClient(), and runClient_().