CMS 3D CMS Logo

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

#include <TriggerDQMBase.h>

Inheritance diagram for TriggerDQMBase:
HTDQM JetDQM METDQM METplusTrackMonitor TopMonitor

Classes

struct  MEbinning
 
struct  ObjME
 

Public Member Functions

 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)
 

Protected 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)
 

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 
)
protected

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(), 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:115
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 
)
protected

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:115
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 
)
protected

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:157
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 
)
protected

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:133
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 
)
protected

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:133
void TriggerDQMBase::fillHistoLSPSetDescription ( edm::ParameterSetDescription pset)
static

Definition at line 55 of file TriggerDQMBase.cc.

References edm::ParameterSetDescription::add().

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

56 {
57  pset.add<unsigned> ( "nbins", 2500);
58 }
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 METplusTrackMonitor::fillDescriptions(), TopMonitor::fillDescriptions(), 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 69 of file TriggerDQMBase.cc.

References edm::ParameterSet::getParameter().

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

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

Definition at line 60 of file TriggerDQMBase.cc.

References edm::ParameterSet::getParameter().

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

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

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(), 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 }