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
HcalNoiseRatesClient Class Reference

#include <HcalNoiseRatesClient.h>

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

Public Member Functions

virtual void beginJob (void)
 
virtual void beginRun (const edm::Run &run, const edm::EventSetup &c)
 
virtual void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
 HcalNoiseRatesClient (const edm::ParameterSet &)
 
int NoiseRatesEndjob (const std::vector< MonitorElement * > &hcalMEs)
 
virtual ~HcalNoiseRatesClient ()
 
- 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
 
 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 (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &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 40 of file HcalNoiseRatesClient.h.

Constructor & Destructor Documentation

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

Definition at line 12 of file HcalNoiseRatesClient.cc.

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

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

Definition at line 23 of file HcalNoiseRatesClient.cc.

24 {
25 
26 }

Member Function Documentation

void HcalNoiseRatesClient::beginJob ( void  )
virtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 28 of file HcalNoiseRatesClient.cc.

29 {
30 
31 
32 }
void HcalNoiseRatesClient::beginRun ( const edm::Run run,
const edm::EventSetup c 
)
virtual

Reimplemented from DQMEDHarvester.

Definition at line 35 of file HcalNoiseRatesClient.cc.

36 {
37 
38 }
void HcalNoiseRatesClient::dqmEndJob ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
overridevirtual

Implements DQMEDHarvester.

Definition at line 41 of file HcalNoiseRatesClient.cc.

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

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

Definition at line 76 of file HcalNoiseRatesClient.cc.

References MonitorElement::Fill().

Referenced by dqmEndJob().

76  {
77 
78  int useAllHistos = 0;
79  MonitorElement* hLumiBlockCount =0;
80  for(unsigned int ih=0; ih<hcalMEs.size(); ih++){
81  if( strcmp(hcalMEs[ih]->getName().c_str(), "hLumiBlockCount") ==0 ){
82  hLumiBlockCount = hcalMEs[ih];
83  useAllHistos =1;
84  }
85  }
86  if( useAllHistos !=0 && useAllHistos !=1 ) return 0;
87 
88  // FIXME: dummy lumiCountMap.size since hLumiBlockCount is disabled
89  // in a general case.
90  int lumiCountMapsize = -1; // dummy
91  if (useAllHistos) hLumiBlockCount->Fill(0.0, lumiCountMapsize);
92 
93  return 1;
94 
95 }
void Fill(long long x)

Member Data Documentation

edm::ParameterSet HcalNoiseRatesClient::conf_
private

Definition at line 45 of file HcalNoiseRatesClient.h.

bool HcalNoiseRatesClient::debug_
private

Definition at line 48 of file HcalNoiseRatesClient.h.

Referenced by HcalNoiseRatesClient().

std::string HcalNoiseRatesClient::dirName_
private

Definition at line 50 of file HcalNoiseRatesClient.h.

Referenced by dqmEndJob(), and HcalNoiseRatesClient().

std::string HcalNoiseRatesClient::dirNameJet_
private

Definition at line 51 of file HcalNoiseRatesClient.h.

std::string HcalNoiseRatesClient::dirNameMET_
private

Definition at line 52 of file HcalNoiseRatesClient.h.

std::string HcalNoiseRatesClient::outputFile_
private

Definition at line 43 of file HcalNoiseRatesClient.h.

Referenced by HcalNoiseRatesClient().

bool HcalNoiseRatesClient::verbose_
private

Definition at line 47 of file HcalNoiseRatesClient.h.

Referenced by dqmEndJob(), and HcalNoiseRatesClient().