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

#include <EwkTauDQM.h>

Inheritance diagram for EwkTauDQM:
edm::EDAnalyzer

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &)
 
void beginJob ()
 
void endJob ()
 
 EwkTauDQM (const edm::ParameterSet &)
 
 ~EwkTauDQM ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Private Attributes

std::string dqmDirectory_
 
int dqmError_
 
DQMStoredqmStore_
 
EwkElecTauHistManagerelecTauHistManager_
 
int maxNumWarnings_
 
EwkMuTauHistManagermuTauHistManager_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Detailed Description

Booking and filling of histograms for data-quality monitoring purposes in EWK tau analyses; individual channels are implemented in separate Ewk..HistManager classes, so far: o Z –> electron + tau-jet channel (EwkElecTauHistManager) o Z –> muon + tau-jet channel (EwkMuTauHistManager)

Authors
Letizia Lusito, Joshua Swanson, Christian Veelken
Version
Revision:
1.3
Id:
EwkTauDQM.h,v 1.3 2010/02/20 20:58:54 wmtan Exp

Definition at line 31 of file EwkTauDQM.h.

Constructor & Destructor Documentation

EwkTauDQM::EwkTauDQM ( const edm::ParameterSet cfg)

Definition at line 20 of file EwkTauDQM.cc.

References edm::ParameterSet::addParameter(), dqmDirectory_, dqmDirectoryName(), dqmError_, elecTauHistManager_, edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), maxNumWarnings_, and muTauHistManager_.

21  : dqmDirectory_(cfg.getParameter<std::string>("dqmDirectory")),
22  dqmError_(0)
23 {
24  if ( !edm::Service<DQMStore>().isAvailable() ) {
25  edm::LogError ("EwkTauDQM") << " Failed to access dqmStore --> histograms will NEITHER be booked NOR filled !!";
26  dqmError_ = 1;
27  return;
28  }
29 
30  DQMStore* dqmStore = &(*edm::Service<DQMStore>());
31 
32  maxNumWarnings_ = cfg.exists("maxNumWarnings") ? cfg.getParameter<int>("maxNumWarnings") : 1;
33 
34  edm::ParameterSet cfgChannels = cfg.getParameter<edm::ParameterSet>("channels");
35 
36  edm::ParameterSet cfgElecTauChannel = cfgChannels.getParameter<edm::ParameterSet>("elecTauChannel");
37  std::string dqmSubDirectoryElecTauChannel = cfgElecTauChannel.getParameter<std::string>("dqmSubDirectory");
38  cfgElecTauChannel.addParameter<std::string>("dqmDirectory", dqmDirectoryName(dqmDirectory_, dqmSubDirectoryElecTauChannel));
39  cfgElecTauChannel.addParameter<int>("maxNumWarnings", maxNumWarnings_);
40  elecTauHistManager_ = new EwkElecTauHistManager(cfgElecTauChannel, dqmStore);
41 
42  edm::ParameterSet cfgMuTauChannel = cfgChannels.getParameter<edm::ParameterSet>("muTauChannel");
43  std::string dqmSubDirectoryMuTauChannel = cfgMuTauChannel.getParameter<std::string>("dqmSubDirectory");
44  cfgMuTauChannel.addParameter<std::string>("dqmDirectory", dqmDirectoryName(dqmDirectory_, dqmSubDirectoryMuTauChannel));
45  cfgMuTauChannel.addParameter<int>("maxNumWarnings", maxNumWarnings_);
46  muTauHistManager_ = new EwkMuTauHistManager(cfgMuTauChannel, dqmStore);
47 }
T getParameter(std::string const &) const
std::string dqmDirectory_
Definition: EwkTauDQM.h:43
bool exists(std::string const &parameterName) const
checks if a parameter exists
std::string dqmDirectoryName(const std::string &dqmRootDirectory, const std::string &dqmSubDirectory)
Definition: EwkTauDQM.cc:10
int dqmError_
Definition: EwkTauDQM.h:44
EwkElecTauHistManager * elecTauHistManager_
Definition: EwkTauDQM.h:47
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:139
int maxNumWarnings_
Definition: EwkTauDQM.h:45
EwkMuTauHistManager * muTauHistManager_
Definition: EwkTauDQM.h:48
EwkTauDQM::~EwkTauDQM ( )

Definition at line 49 of file EwkTauDQM.cc.

References elecTauHistManager_, and muTauHistManager_.

50 {
51  delete elecTauHistManager_;
52  delete muTauHistManager_;
53 }
EwkElecTauHistManager * elecTauHistManager_
Definition: EwkTauDQM.h:47
EwkMuTauHistManager * muTauHistManager_
Definition: EwkTauDQM.h:48

Member Function Documentation

void EwkTauDQM::analyze ( const edm::Event evt,
const edm::EventSetup es 
)
virtual

Implements edm::EDAnalyzer.

Definition at line 63 of file EwkTauDQM.cc.

References dqmError_, elecTauHistManager_, EwkElecTauHistManager::fillHistograms(), EwkMuTauHistManager::fillHistograms(), and muTauHistManager_.

64 {
65  if ( dqmError_ ) return;
66 
69 }
void fillHistograms(const edm::Event &, const edm::EventSetup &)
Definition: EwkTauDQM.cc:638
void fillHistograms(const edm::Event &, const edm::EventSetup &)
Definition: EwkTauDQM.cc:223
int dqmError_
Definition: EwkTauDQM.h:44
EwkElecTauHistManager * elecTauHistManager_
Definition: EwkTauDQM.h:47
EwkMuTauHistManager * muTauHistManager_
Definition: EwkTauDQM.h:48
void EwkTauDQM::beginJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 55 of file EwkTauDQM.cc.

References EwkElecTauHistManager::bookHistograms(), EwkMuTauHistManager::bookHistograms(), dqmError_, elecTauHistManager_, and muTauHistManager_.

56 {
57  if ( dqmError_ ) return;
58 
61 }
int dqmError_
Definition: EwkTauDQM.h:44
EwkElecTauHistManager * elecTauHistManager_
Definition: EwkTauDQM.h:47
EwkMuTauHistManager * muTauHistManager_
Definition: EwkTauDQM.h:48
void EwkTauDQM::endJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 71 of file EwkTauDQM.cc.

References dqmError_, elecTauHistManager_, EwkElecTauHistManager::finalizeHistograms(), EwkMuTauHistManager::finalizeHistograms(), and muTauHistManager_.

72 {
73  if ( dqmError_ ) return;
74 
77 }
int dqmError_
Definition: EwkTauDQM.h:44
EwkElecTauHistManager * elecTauHistManager_
Definition: EwkTauDQM.h:47
void finalizeHistograms()
Definition: EwkTauDQM.cc:931
EwkMuTauHistManager * muTauHistManager_
Definition: EwkTauDQM.h:48

Member Data Documentation

std::string EwkTauDQM::dqmDirectory_
private

Definition at line 43 of file EwkTauDQM.h.

Referenced by EwkTauDQM().

int EwkTauDQM::dqmError_
private

Definition at line 44 of file EwkTauDQM.h.

Referenced by analyze(), beginJob(), endJob(), and EwkTauDQM().

DQMStore* EwkTauDQM::dqmStore_
private

Definition at line 42 of file EwkTauDQM.h.

EwkElecTauHistManager* EwkTauDQM::elecTauHistManager_
private

Definition at line 47 of file EwkTauDQM.h.

Referenced by analyze(), beginJob(), endJob(), EwkTauDQM(), and ~EwkTauDQM().

int EwkTauDQM::maxNumWarnings_
private

Definition at line 45 of file EwkTauDQM.h.

Referenced by EwkTauDQM().

EwkMuTauHistManager* EwkTauDQM::muTauHistManager_
private

Definition at line 48 of file EwkTauDQM.h.

Referenced by analyze(), beginJob(), endJob(), EwkTauDQM(), and ~EwkTauDQM().