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< 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 93 of file RunHistogramManager.h.

95  :
97  _pointer(pointer),
99  _nbiny(nbiny), _ymin(ymin), _ymax(ymax), _runpointers() { }
type
Definition: HCALResponse.h:21
std::map< unsigned int, TH2F * > _runpointers
HistoParams< TH2F >::~HistoParams ( )
inlineoverride

Definition at line 102 of file RunHistogramManager.h.

References LogDebug.

102  {
103 
104  delete _pointer;
105  LogDebug("TH2FDestructor") << "Destroy " << _name;
106 
107  }
#define LogDebug(id)

Member Function Documentation

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

Implements BaseHistoParams.

Definition at line 109 of file RunHistogramManager.h.

References LogDebug, TFileDirectory::make(), and runGCPTkAlMap::title.

109  {
110 
111  if(_runpointers.find(irun)!=_runpointers.end()) {
112  *_pointer = _runpointers[irun];
113  LogDebug("TH2Fbooked") << "Histogram " << _name.c_str() << " already exists " << _runpointers[irun];
114 
115  }
116  else {
117 
118  char title[400];
119  sprintf(title,"%s %s %d",_title.c_str(),fillrun,irun);
120 
121  _runpointers[irun] = subrun.make<TH2F>(_name.c_str(),
122  title,
123  _nbinx,
124  _xmin,
125  _xmax,
126  _nbiny,
127  _ymin,
128  _ymax);
129 
130  *_pointer = _runpointers[irun];
131  LogDebug("TH2Fbooked") << "Histogram " << _name.c_str() << " booked " << _runpointers[irun];
132  }
133 
134 
135  }
#define LogDebug(id)
T * make(const Args &...args) const
make new ROOT object
std::map< unsigned int, TH2F * > _runpointers

Member Data Documentation

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

Definition at line 140 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(), Vispa.Views.PropertyView.Property::name(), validation.SimpleSample::name(), trackingPlots.Iteration::name(), plotting.PlotterItem::readDirs(), plotting.PlotGroup::remove(), SequenceTypes.SequencePlaceholder::resolve(), and SequenceTypes.TaskPlaceholder::resolve().

unsigned int HistoParams< TH2F >::_nbinx
private

Definition at line 142 of file RunHistogramManager.h.

unsigned int HistoParams< TH2F >::_nbiny
private

Definition at line 145 of file RunHistogramManager.h.

TH2F** HistoParams< TH2F >::_pointer
private

Definition at line 138 of file RunHistogramManager.h.

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

Definition at line 148 of file RunHistogramManager.h.

std::string HistoParams< TH2F >::_title
private
std::string HistoParams< TH2F >::_type
private
double HistoParams< TH2F >::_xmax
private
double HistoParams< TH2F >::_xmin
private
double HistoParams< TH2F >::_ymax
private

Definition at line 147 of file RunHistogramManager.h.

Referenced by plotting.PlotTextBox::move().

double HistoParams< TH2F >::_ymin
private

Definition at line 146 of file RunHistogramManager.h.

Referenced by plotting.PlotTextBox::move().