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

#include <JetMETHLTOfflineClient.h>

Inheritance diagram for JetMETHLTOfflineClient:
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 &) override
 
 JetMETHLTOfflineClient (const edm::ParameterSet &)
 
virtual ~JetMETHLTOfflineClient ()
 
- 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
 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 hltTag_
 
std::string processname_
 
bool verbose_
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- 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::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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 53 of file JetMETHLTOfflineClient.h.

Constructor & Destructor Documentation

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

Definition at line 13 of file JetMETHLTOfflineClient.cc.

References gather_cfg::cout, debug_, dirName_, edm::ParameterSet::getParameter(), hltTag_, processname_, AlCaHLTBitMon_QueryRunRegistry::string, and verbose_.

13  :conf_(iConfig)
14 {
15  debug_ = false;
16  verbose_ = false;
17 
18  processname_ = iConfig.getParameter<std::string>("processname");
19 
20  hltTag_ = iConfig.getParameter<std::string>("hltTag");
21  if (debug_) std::cout << hltTag_ << std::endl;
22 
23  dirName_=iConfig.getParameter<std::string>("DQMDirName");
24 
25 }
T getParameter(std::string const &) const
tuple cout
Definition: gather_cfg.py:121
JetMETHLTOfflineClient::~JetMETHLTOfflineClient ( )
virtual

Definition at line 27 of file JetMETHLTOfflineClient.cc.

28 {
29 
30 }

Member Function Documentation

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

Implements DQMEDHarvester.

Definition at line 32 of file JetMETHLTOfflineClient.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), gather_cfg::cout, debug_, dirName_, spr::find(), DQMStore::IGetter::getContents(), DQMStore::IGetter::getSubdirs(), MonitorElement::getTH1F(), i, j, relval_steps::k, prof2calltree::l, LogDebug, mergeVDriftHistosByStation::name, DQMStore::IBooker::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, and indexGen::title.

33 {
34  ibooker.setCurrentFolder(dirName_);
35 
36  LogDebug("JetMETHLTOfflineClient") << "dqmEndJob" << std::endl;
37  if (debug_) std::cout << "dqmEndJob" << std::endl;
38 
39  std::vector<MonitorElement*> hltMEs;
40 
41  // Look at all folders, go to the subfolder which includes the string "Eff"
42  std::vector<std::string> fullPathHLTFolders = igetter.getSubdirs();
43  for(unsigned int i=0;i<fullPathHLTFolders.size();i++) {
44 
45  // Move on only if the folder name contains "Eff" Or "Trigger Summary"
46  if (debug_) std::cout << fullPathHLTFolders[i] << std::endl;
47  if ((fullPathHLTFolders[i].find("Eff")!=std::string::npos)) {
48  ibooker.setCurrentFolder(fullPathHLTFolders[i]);
49  }
50  else {
51  continue;
52  }
53 
54  // Look at all subfolders, go to the subfolder which includes the string "Eff"
55  std::vector<std::string> fullSubPathHLTFolders = igetter.getSubdirs();
56  for(unsigned int j=0;j<fullSubPathHLTFolders.size();j++) {
57 
58  if (debug_) std::cout << fullSubPathHLTFolders[j] << std::endl;
59  ibooker.setCurrentFolder(fullSubPathHLTFolders[j]);
60 
61  // Look at all MonitorElements in this folder
62  hltMEs = igetter.getContents(fullSubPathHLTFolders[j]);
63  LogDebug("JetMETHLTOfflineClient")<< "Number of MEs for this HLT path = " << hltMEs.size() << std::endl;
64 
65  for(unsigned int k=0;k<hltMEs.size();k++) {
66  if (debug_) std::cout << hltMEs[k]->getName() << std::endl;
67 
68  //-----
69  if ((hltMEs[k]->getName().find("ME_Numerator")!=std::string::npos) && hltMEs[k]->getName().find("ME_Numerator")==0){
70 
71  std::string name = hltMEs[k]->getName();
72  name.erase(0,12); // Removed "ME_Numerator"
73  if (debug_) std::cout <<"==name=="<< name << std::endl;
74  // if( name.find("EtaPhi") !=std::string::npos ) continue; // do not consider EtaPhi 2D plots
75 
76  for(unsigned int l=0;l<hltMEs.size();l++) {
77  if (hltMEs[l]->getName() == "ME_Denominator"+name){
78  // found denominator too
79  if(name.find("EtaPhi") !=std::string::npos) {
80  TH2F* tNumerator = hltMEs[k]->getTH2F();
81  TH2F* tDenominator = hltMEs[l]->getTH2F();
82 
83  std::string title = "Eff_"+hltMEs[k]->getTitle();
84 
85  TH2F *teff = (TH2F*) tNumerator->Clone(title.c_str());
86  teff->Divide(tNumerator,tDenominator,1,1);
87  ibooker.book2D("ME_Eff_"+name,teff);
88  delete teff;
89  }
90  else{
91  TH1F* tNumerator = hltMEs[k]->getTH1F();
92  TH1F* tDenominator = hltMEs[l]->getTH1F();
93 
94  std::string title = "Eff_"+hltMEs[k]->getTitle();
95 
96  TH1F *teff = (TH1F*) tNumerator->Clone(title.c_str());
97  teff->Divide(tNumerator,tDenominator,1,1);
98  ibooker.book1D("ME_Eff_"+name,teff);
99  delete teff;
100  }
101  } // Denominator
102  } // Loop-l
103  } // Numerator
104 
105 
106  } // Loop-k
107  } // fullSubPath
108  } // fullPath
109 }
#define LogDebug(id)
std::vector< MonitorElement * > getContents(Args &&...args)
Definition: DQMStore.h:197
int i
Definition: DBlmapReader.cc:9
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
int j
Definition: DBlmapReader.cc:9
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
TH1F * getTH1F(void) const
std::vector< std::string > getSubdirs(void)
Definition: DQMStore.cc:306
tuple cout
Definition: gather_cfg.py:121

Member Data Documentation

edm::ParameterSet JetMETHLTOfflineClient::conf_
private

Definition at line 56 of file JetMETHLTOfflineClient.h.

bool JetMETHLTOfflineClient::debug_
private

Definition at line 58 of file JetMETHLTOfflineClient.h.

Referenced by dqmEndJob(), and JetMETHLTOfflineClient().

std::string JetMETHLTOfflineClient::dirName_
private

Definition at line 61 of file JetMETHLTOfflineClient.h.

Referenced by dqmEndJob(), and JetMETHLTOfflineClient().

std::string JetMETHLTOfflineClient::hltTag_
private

Definition at line 62 of file JetMETHLTOfflineClient.h.

Referenced by JetMETHLTOfflineClient().

std::string JetMETHLTOfflineClient::processname_
private

Definition at line 63 of file JetMETHLTOfflineClient.h.

Referenced by JetMETHLTOfflineClient().

bool JetMETHLTOfflineClient::verbose_
private

Definition at line 59 of file JetMETHLTOfflineClient.h.

Referenced by JetMETHLTOfflineClient().