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 edm::EDConsumerBase

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
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 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
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

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

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- 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

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

Definition at line 29 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_, muTauHistManager_, and AlCaHLTBitMon_QueryRunRegistry::string.

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:41
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:42
EwkElecTauHistManager * elecTauHistManager_
Definition: EwkTauDQM.h:45
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:142
int maxNumWarnings_
Definition: EwkTauDQM.h:43
EwkMuTauHistManager * muTauHistManager_
Definition: EwkTauDQM.h:46
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:45
EwkMuTauHistManager * muTauHistManager_
Definition: EwkTauDQM.h:46

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:42
EwkElecTauHistManager * elecTauHistManager_
Definition: EwkTauDQM.h:45
EwkMuTauHistManager * muTauHistManager_
Definition: EwkTauDQM.h:46
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:42
EwkElecTauHistManager * elecTauHistManager_
Definition: EwkTauDQM.h:45
EwkMuTauHistManager * muTauHistManager_
Definition: EwkTauDQM.h:46
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:42
EwkElecTauHistManager * elecTauHistManager_
Definition: EwkTauDQM.h:45
void finalizeHistograms()
Definition: EwkTauDQM.cc:931
EwkMuTauHistManager * muTauHistManager_
Definition: EwkTauDQM.h:46

Member Data Documentation

std::string EwkTauDQM::dqmDirectory_
private

Definition at line 41 of file EwkTauDQM.h.

Referenced by EwkTauDQM().

int EwkTauDQM::dqmError_
private

Definition at line 42 of file EwkTauDQM.h.

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

DQMStore* EwkTauDQM::dqmStore_
private

Definition at line 40 of file EwkTauDQM.h.

EwkElecTauHistManager* EwkTauDQM::elecTauHistManager_
private

Definition at line 45 of file EwkTauDQM.h.

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

int EwkTauDQM::maxNumWarnings_
private

Definition at line 43 of file EwkTauDQM.h.

Referenced by EwkTauDQM().

EwkMuTauHistManager* EwkTauDQM::muTauHistManager_
private

Definition at line 46 of file EwkTauDQM.h.

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