CMS 3D CMS Logo

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

#include <RunHistogramManager.h>

Inheritance diagram for HistoParams< T >:
BaseHistoParams

Public Member Functions

void beginRun (const unsigned int irun, TFileDirectory &subrun, const char *fillrun) override
 
 HistoParams (T **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
 
T ** _pointer
 
std::map< unsigned int, T * > _runpointers
 
std::string _title
 
std::string _type
 
double _xmax
 
double _xmin
 
double _ymax
 
double _ymin
 

Detailed Description

template<class T>
class HistoParams< T >

Definition at line 28 of file RunHistogramManager.h.

Constructor & Destructor Documentation

◆ HistoParams()

template<class T >
HistoParams< T >::HistoParams ( T **  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 30 of file RunHistogramManager.h.

40  : BaseHistoParams(),
41  _pointer(pointer),
42  _type(type),
43  _name(name),
44  _title(title),
45  _nbinx(nbinx),
46  _xmin(xmin),
47  _xmax(xmax),
48  _nbiny(nbiny),
49  _ymin(ymin),
50  _ymax(ymax),
51  _runpointers() {}

◆ ~HistoParams()

template<class T >
HistoParams< T >::~HistoParams ( )
inlineoverride

Definition at line 53 of file RunHistogramManager.h.

53  {
54  delete _pointer;
55  LogDebug("Destructor") << "Destroy " << _name;
56  }

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

Member Function Documentation

◆ beginRun()

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

Implements BaseHistoParams.

Definition at line 58 of file RunHistogramManager.h.

58  {
59  if (_runpointers.find(irun) != _runpointers.end()) {
60  *_pointer = _runpointers[irun];
61  LogDebug("TH1Fbooked") << "Histogram " << _name.c_str() << " already exists " << _runpointers[irun];
62 
63  } else {
64  char title[400];
65  sprintf(title, "%s %s %d", _title.c_str(), fillrun, irun);
66 
67  _runpointers[irun] = subrun.make<T>(_name.c_str(), title, _nbinx, _xmin, _xmax);
68 
69  *_pointer = _runpointers[irun];
70  LogDebug("TH1Fbooked") << "Histogram " << _name.c_str() << " booked " << _runpointers[irun];
71  }
72  }

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

Member Data Documentation

◆ _name

template<class T >
std::string HistoParams< T >::_name
private

Definition at line 77 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(), HistoParams< T >::beginRun(), HistoParams< TH2F >::beginRun(), HistoParams< TProfile2D >::beginRun(), 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(), SequenceTypes.TaskPlaceholder::resolve(), plotting.Plot::setName(), HistoParams< T >::~HistoParams(), HistoParams< TH2F >::~HistoParams(), and HistoParams< TProfile2D >::~HistoParams().

◆ _nbinx

template<class T >
unsigned int HistoParams< T >::_nbinx
private

◆ _nbiny

template<class T >
unsigned int HistoParams< T >::_nbiny
private

◆ _pointer

template<class T >
T** HistoParams< T >::_pointer
private

◆ _runpointers

template<class T >
std::map<unsigned int, T*> HistoParams< T >::_runpointers
private

◆ _title

template<class T >
std::string HistoParams< T >::_title
private

◆ _type

template<class T >
std::string HistoParams< T >::_type
private

Definition at line 76 of file RunHistogramManager.h.

Referenced by SequenceTypes.ExpandVisitor::result().

◆ _xmax

template<class T >
double HistoParams< T >::_xmax
private

◆ _xmin

template<class T >
double HistoParams< T >::_xmin
private

◆ _ymax

template<class T >
double HistoParams< T >::_ymax
private

◆ _ymin

template<class T >
double HistoParams< T >::_ymin
private
BaseHistoParams::BaseHistoParams
BaseHistoParams()
Definition: RunHistogramManager.cc:11
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
HistoParams::_title
std::string _title
Definition: RunHistogramManager.h:78
HistoParams::_nbinx
unsigned int _nbinx
Definition: RunHistogramManager.h:79
HistoParams::_ymax
double _ymax
Definition: RunHistogramManager.h:84
TFileDirectory::make
T * make(const Args &... args) const
make new ROOT object
Definition: TFileDirectory.h:53
HistoParams::_runpointers
std::map< unsigned int, T * > _runpointers
Definition: RunHistogramManager.h:85
L1TOccupancyClient_cfi.ymax
ymax
Definition: L1TOccupancyClient_cfi.py:43
HistoParams::_xmin
double _xmin
Definition: RunHistogramManager.h:80
HistoParams::_pointer
T ** _pointer
Definition: RunHistogramManager.h:75
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
HistoParams::_ymin
double _ymin
Definition: RunHistogramManager.h:83
HistoParams::_nbiny
unsigned int _nbiny
Definition: RunHistogramManager.h:82
L1TOccupancyClient_cfi.ymin
ymin
Definition: L1TOccupancyClient_cfi.py:43
T
long double T
Definition: Basic3DVectorLD.h:48
TrackerOfflineValidation_Dqm_cff.xmax
xmax
Definition: TrackerOfflineValidation_Dqm_cff.py:11
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
HistoParams::_name
std::string _name
Definition: RunHistogramManager.h:77
HistoParams::_type
std::string _type
Definition: RunHistogramManager.h:76
TrackerOfflineValidation_Dqm_cff.xmin
xmin
Definition: TrackerOfflineValidation_Dqm_cff.py:10
HistoParams::_xmax
double _xmax
Definition: RunHistogramManager.h:81