CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Public Member Functions
TriggerDQMBase Class Reference

#include <TriggerDQMBase.h>

Inheritance diagram for TriggerDQMBase:
BTVHLTOfflineSource::PathInfo DiJetMonitor HMesonGammaDQM HTDQM JetDQM METDQM METplusTrackMonitor TopMonitor

Classes

struct  MEbinning
 
struct  ObjME
 

Public Member Functions

void bookME (DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, unsigned nbins, double xmin, double xmax)
 
void bookME (DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, const std::vector< double > &binningX)
 
void bookME (DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, unsigned nbinsX, double xmin, double xmax, double ymin, double ymax)
 
void bookME (DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, unsigned nbinsX, double xmin, double xmax, unsigned nbinsY, double ymin, double ymax)
 
void bookME (DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, const std::vector< double > &binningX, const std::vector< double > &binningY)
 
void setMETitle (ObjME &me, const std::string &titleX, const std::string &titleY)
 
 TriggerDQMBase ()=default
 
virtual ~TriggerDQMBase ()=default
 

Static Public Member Functions

static void fillHistoLSPSetDescription (edm::ParameterSetDescription &pset)
 
static void fillHistoPSetDescription (edm::ParameterSetDescription &pset)
 
static MEbinning getHistoLSPSet (const edm::ParameterSet &pset)
 
static MEbinning getHistoPSet (const edm::ParameterSet &pset)
 

Detailed Description

Definition at line 8 of file TriggerDQMBase.h.

Constructor & Destructor Documentation

TriggerDQMBase::TriggerDQMBase ( )
default
virtual TriggerDQMBase::~TriggerDQMBase ( )
virtualdefault

Member Function Documentation

void TriggerDQMBase::bookME ( DQMStore::IBooker ibooker,
ObjME me,
const std::string &  histname,
const std::string &  histtitle,
unsigned  nbins,
double  xmin,
double  xmax 
)

Definition at line 12 of file TriggerDQMBase.cc.

References DQMStore::IBooker::book1D(), TriggerDQMBase::ObjME::denominator, and TriggerDQMBase::ObjME::numerator.

Referenced by METDQM::bookHistograms(), HTDQM::bookHistograms(), JetDQM::bookHistograms(), HMesonGammaDQM::bookHistograms(), DiJetMonitor::bookHistograms(), METplusTrackMonitor::bookHistograms(), and TopMonitor::bookHistograms().

13 {
14  me.numerator = ibooker.book1D(histname+"_numerator", histtitle+" (numerator)", nbins, min, max);
15  me.denominator = ibooker.book1D(histname+"_denominator", histtitle+" (denominator)", nbins, min, max);
16 }
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:118
T min(T a, T b)
Definition: MathUtil.h:58
void TriggerDQMBase::bookME ( DQMStore::IBooker ibooker,
ObjME me,
const std::string &  histname,
const std::string &  histtitle,
const std::vector< double > &  binningX 
)

Definition at line 17 of file TriggerDQMBase.cc.

References DQMStore::IBooker::book1D(), TriggerDQMBase::ObjME::denominator, pileupCalc::nbins, and TriggerDQMBase::ObjME::numerator.

18 {
19  unsigned nbins = binning.size()-1;
20  std::vector<float> fbinning(binning.begin(),binning.end());
21  float* arr = &fbinning[0];
22  me.numerator = ibooker.book1D(histname+"_numerator", histtitle+" (numerator)", nbins, arr);
23  me.denominator = ibooker.book1D(histname+"_denominator", histtitle+" (denominator)", nbins, arr);
24 }
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:118
void TriggerDQMBase::bookME ( DQMStore::IBooker ibooker,
ObjME me,
const std::string &  histname,
const std::string &  histtitle,
unsigned  nbinsX,
double  xmin,
double  xmax,
double  ymin,
double  ymax 
)

Definition at line 25 of file TriggerDQMBase.cc.

References DQMStore::IBooker::bookProfile(), TriggerDQMBase::ObjME::denominator, and TriggerDQMBase::ObjME::numerator.

26 {
27  me.numerator = ibooker.bookProfile(histname+"_numerator", histtitle+" (numerator)", nbinsX, xmin, xmax, ymin, ymax);
28  me.denominator = ibooker.bookProfile(histname+"_denominator", histtitle+" (denominator)", nbinsX, xmin, xmax, ymin, ymax);
29 }
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:160
void TriggerDQMBase::bookME ( DQMStore::IBooker ibooker,
ObjME me,
const std::string &  histname,
const std::string &  histtitle,
unsigned  nbinsX,
double  xmin,
double  xmax,
unsigned  nbinsY,
double  ymin,
double  ymax 
)

Definition at line 30 of file TriggerDQMBase.cc.

References DQMStore::IBooker::book2D(), TriggerDQMBase::ObjME::denominator, and TriggerDQMBase::ObjME::numerator.

31 {
32  me.numerator = ibooker.book2D(histname+"_numerator", histtitle+" (numerator)", nbinsX, xmin, xmax, nbinsY, ymin, ymax);
33  me.denominator = ibooker.book2D(histname+"_denominator", histtitle+" (denominator)", nbinsX, xmin, xmax, nbinsY, ymin, ymax);
34 }
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:136
void TriggerDQMBase::bookME ( DQMStore::IBooker ibooker,
ObjME me,
const std::string &  histname,
const std::string &  histtitle,
const std::vector< double > &  binningX,
const std::vector< double > &  binningY 
)

Definition at line 35 of file TriggerDQMBase.cc.

References DQMStore::IBooker::book2D(), TriggerDQMBase::ObjME::denominator, and TriggerDQMBase::ObjME::numerator.

36 {
37  unsigned nbinsX = binningX.size()-1;
38  std::vector<float> fbinningX(binningX.begin(),binningX.end());
39  float* arrX = &fbinningX[0];
40  unsigned nbinsY = binningY.size()-1;
41  std::vector<float> fbinningY(binningY.begin(),binningY.end());
42  float* arrY = &fbinningY[0];
43 
44  me.numerator = ibooker.book2D(histname+"_numerator", histtitle+" (numerator)", nbinsX, arrX, nbinsY, arrY);
45  me.denominator = ibooker.book2D(histname+"_denominator", histtitle+" (denominator)", nbinsX, arrX, nbinsY, arrY);
46 }
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:136
void TriggerDQMBase::fillHistoLSPSetDescription ( edm::ParameterSetDescription pset)
static

Definition at line 55 of file TriggerDQMBase.cc.

References edm::ParameterSetDescription::add().

Referenced by DiJetMonitor::fillDescriptions(), METplusTrackMonitor::fillDescriptions(), TopMonitor::fillDescriptions(), HMesonGammaDQM::fillHmgDescription(), HTDQM::fillHtDescription(), JetDQM::fillJetDescription(), and METDQM::fillMetDescription().

56 {
57  pset.add<unsigned int> ( "nbins", 2500 );
58  pset.add<double> ( "xmin", 0.);
59  pset.add<double> ( "xmax", 2500.);
60 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void TriggerDQMBase::fillHistoPSetDescription ( edm::ParameterSetDescription pset)
static

Definition at line 48 of file TriggerDQMBase.cc.

References edm::ParameterSetDescription::add().

Referenced by DiJetMonitor::fillDescriptions(), METplusTrackMonitor::fillDescriptions(), TopMonitor::fillDescriptions(), HMesonGammaDQM::fillHmgDescription(), HTDQM::fillHtDescription(), JetDQM::fillJetDescription(), and METDQM::fillMetDescription().

49 {
50  pset.add<unsigned> ( "nbins");
51  pset.add<double>( "xmin" );
52  pset.add<double>( "xmax" );
53 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
TriggerDQMBase::MEbinning TriggerDQMBase::getHistoLSPSet ( const edm::ParameterSet pset)
static

Definition at line 71 of file TriggerDQMBase.cc.

References edm::ParameterSet::getParameter().

72 {
74  pset.getParameter<uint32_t>("nbins"),
75  0.,
76  double(pset.getParameter<uint32_t>("nbins"))
77  };
78 }
T getParameter(std::string const &) const
TriggerDQMBase::MEbinning TriggerDQMBase::getHistoPSet ( const edm::ParameterSet pset)
static

Definition at line 62 of file TriggerDQMBase.cc.

References edm::ParameterSet::getParameter().

Referenced by DiJetMonitor::DiJetMonitor(), METDQM::initialise(), HTDQM::initialise(), JetDQM::initialise(), and HMesonGammaDQM::initialise().

63 {
65  pset.getParameter<uint32_t>("nbins"),
66  pset.getParameter<double>("xmin"),
67  pset.getParameter<double>("xmax"),
68  };
69 }
T getParameter(std::string const &) const
void TriggerDQMBase::setMETitle ( ObjME me,
const std::string &  titleX,
const std::string &  titleY 
)

Definition at line 3 of file TriggerDQMBase.cc.

References TriggerDQMBase::ObjME::denominator, TriggerDQMBase::ObjME::numerator, and MonitorElement::setAxisTitle().

Referenced by METDQM::bookHistograms(), HTDQM::bookHistograms(), JetDQM::bookHistograms(), HMesonGammaDQM::bookHistograms(), DiJetMonitor::bookHistograms(), METplusTrackMonitor::bookHistograms(), and TopMonitor::bookHistograms().

4 {
5  me.numerator->setAxisTitle(titleX,1);
6  me.numerator->setAxisTitle(titleY,2);
7  me.denominator->setAxisTitle(titleX,1);
8  me.denominator->setAxisTitle(titleY,2);
9 
10 }