#include <RunHistogramManager.h>
Public Member Functions | |
void | beginRun (const edm::Run &iRun) |
void | beginRun (const edm::Run &iRun, TFileDirectory &subdir) |
void | beginRun (const unsigned int irun) |
void | beginRun (const unsigned int irun, TFileDirectory &subdir) |
TH1F ** | makeTH1F (const char *name, const char *title, const unsigned int nbinx, const double xmin, const double xmax) |
TH2F ** | makeTH2F (const char *name, const char *title, const unsigned int nbinx, const double xmin, const double xmax, const unsigned int nbiny, const double ymin, const double ymax) |
TProfile ** | makeTProfile (const char *name, const char *title, const unsigned int nbinx, const double xmin, const double xmax) |
TProfile2D ** | makeTProfile2D (const char *name, const char *title, const unsigned int nbinx, const double xmin, const double xmax, const unsigned int nbiny, const double ymin, const double ymax) |
RunHistogramManager (const bool fillHistograms=false) | |
~RunHistogramManager () | |
Private Attributes | |
bool | _fillHistograms |
std::vector< BaseHistoParams * > | _histograms |
Definition at line 215 of file RunHistogramManager.h.
RunHistogramManager::RunHistogramManager | ( | const bool | fillHistograms = false | ) |
Definition at line 26 of file RunHistogramManager.cc.
: _fillHistograms(fillHistograms), _histograms() { }
RunHistogramManager::~RunHistogramManager | ( | ) |
Definition at line 42 of file RunHistogramManager.cc.
References _histograms, and LogDebug.
{ for(std::vector<BaseHistoParams*>::const_iterator hp=_histograms.begin();hp!=_histograms.end();++hp) { delete *hp; } LogDebug("Destructor") << "All BaseHistoParams destroyed "; }
void RunHistogramManager::beginRun | ( | const edm::Run & | iRun | ) |
Definition at line 90 of file RunHistogramManager.cc.
Referenced by EventTimeDistribution::beginRun(), beginRun(), DigiInvestigatorHistogramMaker::beginRun(), and MultiplicityCorrelatorHistogramMaker::beginRun().
{ edm::Service<TFileService> tfserv; beginRun(iRun,*tfserv); }
void RunHistogramManager::beginRun | ( | const unsigned int | irun, |
TFileDirectory & | subdir | ||
) |
Definition at line 117 of file RunHistogramManager.cc.
References _fillHistograms, _histograms, combineCards::dirname, and TFileDirectory::mkdir().
{ // create/go to the run subdirectory char fillrun[30]; if(!_fillHistograms) { sprintf(fillrun,"%s","run"); } else { sprintf(fillrun,"%s","fill"); } char dirname[300]; sprintf(dirname,"%s_%d",fillrun,irun); TFileDirectory subrun = subdir.mkdir(dirname); // loop on the histograms and update the pointer references for(unsigned int ih=0;ih<_histograms.size();++ih) { _histograms[ih]->beginRun(irun,subrun,fillrun); } }
void RunHistogramManager::beginRun | ( | const unsigned int | irun | ) |
Definition at line 110 of file RunHistogramManager.cc.
References beginRun().
{ edm::Service<TFileService> tfserv; beginRun(irun,*tfserv); }
void RunHistogramManager::beginRun | ( | const edm::Run & | iRun, |
TFileDirectory & | subdir | ||
) |
Definition at line 97 of file RunHistogramManager.cc.
References _fillHistograms, beginRun(), edm::Run::getByLabel(), and edm::RunBase::run().
{ if(!_fillHistograms) { beginRun(iRun.run(),subdir); } else { edm::Handle<edm::ConditionsInRunBlock> cirb; iRun.getByLabel("conditionsInEdm",cirb); beginRun(cirb->lhcFillNumber,subdir); } }
TH1F ** RunHistogramManager::makeTH1F | ( | const char * | name, |
const char * | title, | ||
const unsigned int | nbinx, | ||
const double | xmin, | ||
const double | xmax | ||
) |
Definition at line 29 of file RunHistogramManager.cc.
References _histograms, LogDebug, mergeVDriftHistosByStation::name, and indexGen::title.
Referenced by EventTimeDistribution::EventTimeDistribution(), and MultiplicityCorrelatorHistogramMaker::MultiplicityCorrelatorHistogramMaker().
{ TH1F** pointer =new TH1F*(0); BaseHistoParams* hp = new HistoParams<TH1F>(pointer,"TH1F",name,title,nbinx,xmin,xmax); _histograms.push_back(hp); LogDebug("TH1Fmade") << "Histogram " << name << " " << title << " pre-booked:" << _histograms.size(); return pointer; }
TH2F ** RunHistogramManager::makeTH2F | ( | const char * | name, |
const char * | title, | ||
const unsigned int | nbinx, | ||
const double | xmin, | ||
const double | xmax, | ||
const unsigned int | nbiny, | ||
const double | ymin, | ||
const double | ymax | ||
) |
Definition at line 66 of file RunHistogramManager.cc.
References _histograms, LogDebug, mergeVDriftHistosByStation::name, and indexGen::title.
Referenced by EventTimeDistribution::EventTimeDistribution(), and MultiplicityCorrelatorHistogramMaker::MultiplicityCorrelatorHistogramMaker().
{ TH2F** pointer = new TH2F*(0); BaseHistoParams* hp = new HistoParams<TH2F>(pointer,"TH2F",name,title,nbinx,xmin,xmax,nbiny,ymin,ymax); _histograms.push_back(hp); LogDebug("TH2Fmade") << "Histogram " << name << " " << title << " pre-booked :" << _histograms.size(); return pointer; }
TProfile ** RunHistogramManager::makeTProfile | ( | const char * | name, |
const char * | title, | ||
const unsigned int | nbinx, | ||
const double | xmin, | ||
const double | xmax | ||
) |
Definition at line 53 of file RunHistogramManager.cc.
References _histograms, LogDebug, mergeVDriftHistosByStation::name, and indexGen::title.
Referenced by DigiInvestigatorHistogramMaker::book(), and MultiplicityCorrelatorHistogramMaker::MultiplicityCorrelatorHistogramMaker().
{ TProfile** pointer =new TProfile*(0); BaseHistoParams* hp = new HistoParams<TProfile>(pointer,"TProfile",name,title,nbinx,xmin,xmax); _histograms.push_back(hp); LogDebug("TProfilemade") << "Histogram " << name << " " << title << " pre-booked:" << _histograms.size(); return pointer; }
TProfile2D ** RunHistogramManager::makeTProfile2D | ( | const char * | name, |
const char * | title, | ||
const unsigned int | nbinx, | ||
const double | xmin, | ||
const double | xmax, | ||
const unsigned int | nbiny, | ||
const double | ymin, | ||
const double | ymax | ||
) |
Definition at line 78 of file RunHistogramManager.cc.
References _histograms, LogDebug, mergeVDriftHistosByStation::name, and indexGen::title.
Referenced by MultiplicityCorrelatorHistogramMaker::MultiplicityCorrelatorHistogramMaker().
{ TProfile2D** pointer = new TProfile2D*(0); BaseHistoParams* hp = new HistoParams<TProfile2D>(pointer,"TProfile2D",name,title,nbinx,xmin,xmax,nbiny,ymin,ymax); _histograms.push_back(hp); LogDebug("TProfile2Dmade") << "Histogram " << name << " " << title << " pre-booked :" << _histograms.size(); return pointer; }
bool RunHistogramManager::_fillHistograms [private] |
Definition at line 235 of file RunHistogramManager.h.
Referenced by beginRun().
std::vector<BaseHistoParams*> RunHistogramManager::_histograms [private] |
Definition at line 236 of file RunHistogramManager.h.
Referenced by beginRun(), makeTH1F(), makeTH2F(), makeTProfile(), makeTProfile2D(), and ~RunHistogramManager().