CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
HistoParams< TH2F > Class Template Reference

#include <RunHistogramManager.h>

Inheritance diagram for HistoParams< TH2F >:
BaseHistoParams

Public Member Functions

void beginRun (const unsigned int irun, TFileDirectory &subrun, const char *fillrun) override
 
 HistoParams (TH2F **pointer, const std::string type, const std::string name, const std::string title, const unsigned int nbinx=-1, const double xmin=-1., const double xmax=-1., const unsigned int nbiny=-1, const double ymin=-1., const double ymax=-1.)
 
 ~HistoParams () override
 
- Public Member Functions inherited from BaseHistoParams
 BaseHistoParams ()
 
virtual ~BaseHistoParams ()
 

Private Attributes

std::string _name
 
unsigned int _nbinx
 
unsigned int _nbiny
 
TH2F ** _pointer
 
std::map< unsigned int, TH2F * > _runpointers
 
std::string _title
 
std::string _type
 
double _xmax
 
double _xmin
 
double _ymax
 
double _ymin
 

Detailed Description

template<>
class HistoParams< TH2F >

Definition at line 89 of file RunHistogramManager.h.

Constructor & Destructor Documentation

◆ HistoParams()

HistoParams< TH2F >::HistoParams ( TH2F **  pointer,
const std::string  type,
const std::string  name,
const std::string  title,
const unsigned int  nbinx = -1,
const double  xmin = -1.,
const double  xmax = -1.,
const unsigned int  nbiny = -1,
const double  ymin = -1.,
const double  ymax = -1. 
)
inline

Definition at line 91 of file RunHistogramManager.h.

101  : BaseHistoParams(),
102  _pointer(pointer),
103  _type(type),
104  _name(name),
105  _title(title),
106  _nbinx(nbinx),
107  _xmin(xmin),
108  _xmax(xmax),
109  _nbiny(nbiny),
110  _ymin(ymin),
111  _ymax(ymax),
112  _runpointers() {}

◆ ~HistoParams()

HistoParams< TH2F >::~HistoParams ( )
inlineoverride

Definition at line 114 of file RunHistogramManager.h.

114  {
115  delete _pointer;
116  LogDebug("TH2FDestructor") << "Destroy " << _name;
117  }

References HistoParams< T >::_name, HistoParams< T >::_pointer, and LogDebug.

Member Function Documentation

◆ beginRun()

void HistoParams< TH2F >::beginRun ( const unsigned int  irun,
TFileDirectory subrun,
const char *  fillrun 
)
inlineoverridevirtual

Implements BaseHistoParams.

Definition at line 119 of file RunHistogramManager.h.

119  {
120  if (_runpointers.find(irun) != _runpointers.end()) {
121  *_pointer = _runpointers[irun];
122  LogDebug("TH2Fbooked") << "Histogram " << _name.c_str() << " already exists " << _runpointers[irun];
123 
124  } else {
125  char title[400];
126  sprintf(title, "%s %s %d", _title.c_str(), fillrun, irun);
127 
128  _runpointers[irun] = subrun.make<TH2F>(_name.c_str(), title, _nbinx, _xmin, _xmax, _nbiny, _ymin, _ymax);
129 
130  *_pointer = _runpointers[irun];
131  LogDebug("TH2Fbooked") << "Histogram " << _name.c_str() << " booked " << _runpointers[irun];
132  }
133  }

References HistoParams< T >::_name, HistoParams< T >::_nbinx, HistoParams< T >::_nbiny, HistoParams< T >::_pointer, HistoParams< T >::_runpointers, HistoParams< T >::_title, HistoParams< T >::_xmax, HistoParams< T >::_xmin, HistoParams< T >::_ymax, HistoParams< T >::_ymin, LogDebug, TFileDirectory::make(), and overlapproblemtsosanalyzer_cfi::title.

Member Data Documentation

◆ _name

std::string HistoParams< TH2F >::_name
private

Definition at line 138 of file RunHistogramManager.h.

Referenced by plotting.Subtract::__str__(), plotting.Transform::__str__(), plotting.FakeDuplicate::__str__(), plotting.CutEfficiency::__str__(), plotting.AggregateBins::__str__(), plotting.AggregateHistos::__str__(), plotting.ROC::__str__(), trackingPlots.TimePerEventPlot::__str__(), trackingPlots.TimePerTrackPlot::__str__(), SequenceTypes.SequencePlaceholder::_clonesequence(), trackingPlots.TimePerEventPlot::_create(), plotting.PlotGroup::_drawSeparate(), plotting.PlotGroup::_save(), SequenceTypes.SequencePlaceholder::copy(), SequenceTypes.TaskPlaceholder::copy(), plotting.Subtract::create(), plotting.Transform::create(), plotting.FakeDuplicate::create(), plotting.CutEfficiency::create(), plotting.AggregateBins::create(), plotting.AggregateHistos::create(), trackingPlots.TimePerTrackPlot::create(), plotting.Plot::create(), plotting.PlotGroup::draw(), SequenceTypes.SequencePlaceholder::dumpPython(), SequenceTypes.TaskPlaceholder::dumpPython(), SequenceTypes.SequencePlaceholder::dumpSequenceConfig(), SequenceTypes.SequencePlaceholder::dumpSequencePython(), SequenceTypes.TaskPlaceholder::dumpSequencePython(), plotting.Plot::getName(), plotting.PlotGroup::getName(), plotting.PlotterFolder::getName(), plotting.PlotterItem::getName(), plotting.PlotterFolder::getSelectionNameIterator(), SequenceTypes.SequencePlaceholder::insertInto(), SequenceTypes.TaskPlaceholder::insertInto(), validation.SimpleSample::name(), trackingPlots.Iteration::name(), plotting.PlotterItem::readDirs(), plotting.PlotGroup::remove(), SequenceTypes.SequencePlaceholder::resolve(), and SequenceTypes.TaskPlaceholder::resolve().

◆ _nbinx

unsigned int HistoParams< TH2F >::_nbinx
private

Definition at line 140 of file RunHistogramManager.h.

◆ _nbiny

unsigned int HistoParams< TH2F >::_nbiny
private

Definition at line 143 of file RunHistogramManager.h.

◆ _pointer

TH2F** HistoParams< TH2F >::_pointer
private

Definition at line 136 of file RunHistogramManager.h.

◆ _runpointers

std::map<unsigned int, TH2F*> HistoParams< TH2F >::_runpointers
private

Definition at line 146 of file RunHistogramManager.h.

◆ _title

std::string HistoParams< TH2F >::_title
private

◆ _type

std::string HistoParams< TH2F >::_type
private

Definition at line 137 of file RunHistogramManager.h.

Referenced by SequenceTypes.ExpandVisitor::result().

◆ _xmax

double HistoParams< TH2F >::_xmax
private

◆ _xmin

double HistoParams< TH2F >::_xmin
private

◆ _ymax

double HistoParams< TH2F >::_ymax
private

Definition at line 145 of file RunHistogramManager.h.

Referenced by plotting.PlotTextBox::move().

◆ _ymin

double HistoParams< TH2F >::_ymin
private

Definition at line 144 of file RunHistogramManager.h.

Referenced by plotting.PlotTextBox::move().

BaseHistoParams::BaseHistoParams
BaseHistoParams()
Definition: RunHistogramManager.cc:11
TFileDirectory::make
T * make(const Args &... args) const
make new ROOT object
Definition: TFileDirectory.h:53
HistoParams< TH2F >::_nbinx
unsigned int _nbinx
Definition: RunHistogramManager.h:140
HistoParams< TH2F >::_runpointers
std::map< unsigned int, TH2F * > _runpointers
Definition: RunHistogramManager.h:146
L1TOccupancyClient_cfi.ymax
ymax
Definition: L1TOccupancyClient_cfi.py:43
HistoParams< TH2F >::_title
std::string _title
Definition: RunHistogramManager.h:139
HistoParams< TH2F >::_xmax
double _xmax
Definition: RunHistogramManager.h:142
HistoParams< TH2F >::_ymin
double _ymin
Definition: RunHistogramManager.h:144
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
HistoParams< TH2F >::_xmin
double _xmin
Definition: RunHistogramManager.h:141
overlapproblemtsosanalyzer_cfi.title
title
Definition: overlapproblemtsosanalyzer_cfi.py:7
type
type
Definition: HCALResponse.h:21
L1TOccupancyClient_cfi.ymin
ymin
Definition: L1TOccupancyClient_cfi.py:43
HistoParams< TH2F >::_name
std::string _name
Definition: RunHistogramManager.h:138
TrackerOfflineValidation_Dqm_cff.xmax
xmax
Definition: TrackerOfflineValidation_Dqm_cff.py:11
HistoParams< TH2F >::_pointer
TH2F ** _pointer
Definition: RunHistogramManager.h:136
HistoParams< TH2F >::_ymax
double _ymax
Definition: RunHistogramManager.h:145
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
HistoParams< TH2F >::_type
std::string _type
Definition: RunHistogramManager.h:137
HistoParams< TH2F >::_nbiny
unsigned int _nbiny
Definition: RunHistogramManager.h:143
TrackerOfflineValidation_Dqm_cff.xmin
xmin
Definition: TrackerOfflineValidation_Dqm_cff.py:10