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
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) 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 30 of file EwkTauDQM.h.

Constructor & Destructor Documentation

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

Definition at line 22 of file EwkTauDQM.cc.

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

23  : dqmDirectory_(cfg.getParameter<std::string>("dqmDirectory")),
24  dqmError_(0) {
25  if (!edm::Service<DQMStore>().isAvailable()) {
26  edm::LogError("EwkTauDQM") << " Failed to access dqmStore --> histograms "
27  "will NEITHER be booked NOR filled !!";
28  dqmError_ = 1;
29  return;
30  }
31 
32  DQMStore* dqmStore = &(*edm::Service<DQMStore>());
33 
34  maxNumWarnings_ = cfg.exists("maxNumWarnings")
35  ? cfg.getParameter<int>("maxNumWarnings")
36  : 1;
37 
38  edm::ParameterSet cfgChannels =
39  cfg.getParameter<edm::ParameterSet>("channels");
40 
41  edm::ParameterSet cfgElecTauChannel =
42  cfgChannels.getParameter<edm::ParameterSet>("elecTauChannel");
43  std::string dqmSubDirectoryElecTauChannel =
44  cfgElecTauChannel.getParameter<std::string>("dqmSubDirectory");
45  cfgElecTauChannel.addParameter<std::string>(
46  "dqmDirectory",
47  dqmDirectoryName(dqmDirectory_, dqmSubDirectoryElecTauChannel));
48  cfgElecTauChannel.addParameter<int>("maxNumWarnings", maxNumWarnings_);
49  elecTauHistManager_ = new EwkElecTauHistManager(cfgElecTauChannel, dqmStore);
50 
51  edm::ParameterSet cfgMuTauChannel =
52  cfgChannels.getParameter<edm::ParameterSet>("muTauChannel");
53  std::string dqmSubDirectoryMuTauChannel =
54  cfgMuTauChannel.getParameter<std::string>("dqmSubDirectory");
55  cfgMuTauChannel.addParameter<std::string>(
56  "dqmDirectory",
57  dqmDirectoryName(dqmDirectory_, dqmSubDirectoryMuTauChannel));
58  cfgMuTauChannel.addParameter<int>("maxNumWarnings", maxNumWarnings_);
59  muTauHistManager_ = new EwkMuTauHistManager(cfgMuTauChannel, dqmStore);
60 }
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 62 of file EwkTauDQM.cc.

References elecTauHistManager_, and muTauHistManager_.

62  {
63  delete elecTauHistManager_;
64  delete muTauHistManager_;
65 }
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 74 of file EwkTauDQM.cc.

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

74  {
75  if (dqmError_) return;
76 
79 }
void fillHistograms(const edm::Event &, const edm::EventSetup &)
Definition: EwkTauDQM.cc:763
void fillHistograms(const edm::Event &, const edm::EventSetup &)
Definition: EwkTauDQM.cc:269
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 67 of file EwkTauDQM.cc.

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

67  {
68  if (dqmError_) return;
69 
72 }
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 81 of file EwkTauDQM.cc.

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

81  {
82  if (dqmError_) return;
83 
86 }
int dqmError_
Definition: EwkTauDQM.h:42
EwkElecTauHistManager * elecTauHistManager_
Definition: EwkTauDQM.h:45
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().