CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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

virtual void beginRun (const unsigned int irun, TFileDirectory &subrun, const char *fillrun)
 
 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 ()
 
- 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 30 of file RunHistogramManager.h.

Constructor & Destructor Documentation

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

36  :
38  _pointer(pointer),
40  _nbiny(nbiny), _ymin(ymin), _ymax(ymax), _runpointers() { }
type
Definition: HCALResponse.h:21
std::string _title
std::map< unsigned int, T * > _runpointers
std::string _type
unsigned int _nbiny
std::string _name
unsigned int _nbinx
template<class T>
HistoParams< T >::~HistoParams ( )
inline

Definition at line 42 of file RunHistogramManager.h.

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

42  {
43 
44  delete _pointer;
45  LogDebug("Destructor") << "Destroy " << _name;
46 
47  }
#define LogDebug(id)
std::string _name

Member Function Documentation

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

Implements BaseHistoParams.

Definition at line 49 of file RunHistogramManager.h.

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 SiPixelPhase1TrackClusters_cfi::title.

49  {
50 
51  if(_runpointers.find(irun)!=_runpointers.end()) {
52  *_pointer = _runpointers[irun];
53  LogDebug("TH1Fbooked") << "Histogram " << _name.c_str() << " already exists " << _runpointers[irun];
54 
55  }
56  else {
57 
58  char title[400];
59  sprintf(title,"%s %s %d",_title.c_str(),fillrun,irun);
60 
61  _runpointers[irun] = subrun.make<T>(_name.c_str(),
62  title,
63  _nbinx,
64  _xmin,
65  _xmax);
66 
67  *_pointer = _runpointers[irun];
68  LogDebug("TH1Fbooked") << "Histogram " << _name.c_str() << " booked " << _runpointers[irun];
69  }
70 
71  }
#define LogDebug(id)
std::string _title
std::map< unsigned int, T * > _runpointers
T * make(const Args &...args) const
make new ROOT object
std::string _name
long double T
unsigned int _nbinx

Member Data Documentation

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

Definition at line 76 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.TimePerTrackPlot::__str__(), SequenceTypes.SequencePlaceholder::_clonesequence(), plotting.PlotGroup::_drawSeparate(), plotting.PlotGroup::_save(), HistoParams< T >::beginRun(), HistoParams< TH2F >::beginRun(), HistoParams< TProfile2D >::beginRun(), SequenceTypes.SequencePlaceholder::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.SequencePlaceholder::dumpSequenceConfig(), SequenceTypes.SequencePlaceholder::dumpSequencePython(), plotting.Plot::getName(), plotting.PlotGroup::getName(), plotting.PlotterFolder::getName(), plotting.PlotterItem::getName(), plotting.PlotterFolder::getSelectionNameIterator(), SequenceTypes.SequencePlaceholder::insertInto(), Vispa.Views.PropertyView.Property::name(), validation.SimpleSample::name(), trackingPlots.Iteration::name(), plotting.PlotterItem::readDirs(), plotting.PlotGroup::remove(), SequenceTypes.SequencePlaceholder::resolve(), HistoParams< T >::~HistoParams(), HistoParams< TH2F >::~HistoParams(), and HistoParams< TProfile2D >::~HistoParams().

template<class T>
unsigned int HistoParams< T >::_nbinx
private
template<class T>
unsigned int HistoParams< T >::_nbiny
private
template<class T>
T** HistoParams< T >::_pointer
private
template<class T>
std::map<unsigned int, T*> HistoParams< T >::_runpointers
private
template<class T>
std::string HistoParams< T >::_title
private
template<class T>
std::string HistoParams< T >::_type
private
template<class T>
double HistoParams< T >::_xmax
private
template<class T>
double HistoParams< T >::_xmin
private
template<class T>
double HistoParams< T >::_ymax
private
template<class T>
double HistoParams< T >::_ymin
private