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< TProfile2D > Class Template Reference

#include <RunHistogramManager.h>

Inheritance diagram for HistoParams< TProfile2D >:
BaseHistoParams

Public Member Functions

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

Detailed Description

template<>
class HistoParams< TProfile2D >

Definition at line 153 of file RunHistogramManager.h.

Constructor & Destructor Documentation

HistoParams< TProfile2D >::HistoParams ( TProfile2D **  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 157 of file RunHistogramManager.h.

159  :
160  BaseHistoParams(),
161  _pointer(pointer),
163  _nbiny(nbiny), _ymin(ymin), _ymax(ymax), _runpointers() { }
type
Definition: HCALResponse.h:21
std::map< unsigned int, TProfile2D * > _runpointers
HistoParams< TProfile2D >::~HistoParams ( )
inline

Definition at line 166 of file RunHistogramManager.h.

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

166  {
167 
168  delete _pointer;
169  LogDebug("TProfile2DDestructor") << "Destroy " << _name;
170 
171  }
#define LogDebug(id)

Member Function Documentation

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

Implements BaseHistoParams.

Definition at line 173 of file RunHistogramManager.h.

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

173  {
174 
175  if(_runpointers.find(irun)!=_runpointers.end()) {
176  *_pointer = _runpointers[irun];
177  LogDebug("TProfile2Dbooked") << "Histogram " << _name.c_str() << " already exists " << _runpointers[irun];
178 
179  }
180  else {
181 
182  char title[400];
183  sprintf(title,"%s %s %d",_title.c_str(),fillrun,irun);
184 
185  _runpointers[irun] = subrun.make<TProfile2D>(_name.c_str(),
186  title,
187  _nbinx,
188  _xmin,
189  _xmax,
190  _nbiny,
191  _ymin,
192  _ymax);
193 
194  *_pointer = _runpointers[irun];
195  LogDebug("TProfile2Dbooked") << "Histogram " << _name.c_str() << " booked " << _runpointers[irun];
196  }
197 
198 
199  }
#define LogDebug(id)
T * make(const Args &...args) const
make new ROOT object
std::map< unsigned int, TProfile2D * > _runpointers

Member Data Documentation

std::string HistoParams< TProfile2D >::_name
private
unsigned int HistoParams< TProfile2D >::_nbinx
private

Definition at line 206 of file RunHistogramManager.h.

unsigned int HistoParams< TProfile2D >::_nbiny
private

Definition at line 209 of file RunHistogramManager.h.

TProfile2D** HistoParams< TProfile2D >::_pointer
private

Definition at line 202 of file RunHistogramManager.h.

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

Definition at line 212 of file RunHistogramManager.h.

std::string HistoParams< TProfile2D >::_title
private
std::string HistoParams< TProfile2D >::_type
private
double HistoParams< TProfile2D >::_xmax
private

Definition at line 208 of file RunHistogramManager.h.

Referenced by plotting.Plot::draw().

double HistoParams< TProfile2D >::_xmin
private

Definition at line 207 of file RunHistogramManager.h.

Referenced by plotting.Plot::draw().

double HistoParams< TProfile2D >::_ymax
private

Definition at line 211 of file RunHistogramManager.h.

Referenced by plotting.Plot::draw().

double HistoParams< TProfile2D >::_ymin
private

Definition at line 210 of file RunHistogramManager.h.

Referenced by plotting.Plot::draw().