emcChannelEvolution Class Reference
[Tower calibrationHelpers]

#include <emcChannelEvolution.h>

List of all members.


Detailed Description

Helper class to help visualizing channel gain evolution over time.

Usage is a 2 step process :

1) emcChannelEvolution ce; ce.produce(run1,run2,opt) will get the (baseline-corrected) gains from run1 to run2 opt is used to determine in which way the baseline is computed (see emcCalibrationDataHelper::getBaseLine())

ce.save("/somedir/") will save the resulting gains into ASCII files

2) emcChannelEvolution c; c.read("/somedir") will read back gains from files. TGraph* g = c.graph(ifem,ichannel) Get a graph of the gain evolution for (ifem,ichannel) tower.

Note that produce(), read(), save() require that the relevant emcDataManager plugin libraries have been loaded. Currently those are (subject to change, though) :

read from Objy : libemcOM.so read from Pg : libemcOMpg.so read/write from/to ASCII files : libemcOMascii.so

Definition at line 42 of file emcChannelEvolution.h.

Public Member Functions

 emcChannelEvolution (emcManageable::EStorage datasource=emcManageable::kDB_Pg)
 ~emcChannelEvolution ()
void dump (int ifem, int channel)
 Get a text output of gain evolution for one channel.
TGraph * graph (int ifem, int channel)
 Get a graphical representation of gain evolution.
TGraph * graph (int ifem, int channel, time_t tics0)
 Same as above, but specifiying origin of times = tics0.
void produce (int run1, int run2, const char *femdetails)
 Produce the gains for the period run1, run2, by reading them from the datasource and normalizing them by the baseline, computed using femdetails (see emcCalibrationDataHelper::getBaseLine()).
bool read (const char *inputdir)
 Read gains from a directory.
bool save (const char *outputdir)
 Save gains to a directory.

Private Member Functions

emcTracedFEMread (int ifem)

Private Attributes

emcCalibrationDataHelperfCDH
std::vector< emcTracedFEM * > fGains
emcManageable::EStorage fDataSource
std::string fSourceDir


Constructor & Destructor Documentation

emcChannelEvolution::emcChannelEvolution emcManageable::EStorage  datasource = emcManageable::kDB_Pg  ) 
 

Definition at line 56 of file emcChannelEvolution.C.

References fGains, and nfems.

emcChannelEvolution::~emcChannelEvolution  ) 
 

Definition at line 65 of file emcChannelEvolution.C.

References fGains.


Member Function Documentation

void emcChannelEvolution::dump int  ifem,
int  channel
 

Get a text output of gain evolution for one channel.

Definition at line 76 of file emcChannelEvolution.C.

References fGains.

TGraph * emcChannelEvolution::graph int  ifem,
int  channel,
time_t  tics0
 

Same as above, but specifiying origin of times = tics0.

Definition at line 118 of file emcChannelEvolution.C.

References emcTracedFEMPlotter::CopyGraph(), fGains, graph(), name, and read().

TGraph * emcChannelEvolution::graph int  ifem,
int  channel
 

Get a graphical representation of gain evolution.

Definition at line 99 of file emcChannelEvolution.C.

References fGains, emcCalFEM::GetXmin(), and read().

Referenced by graph().

void emcChannelEvolution::produce int  run1,
int  run2,
const char *  femdetails
 

Produce the gains for the period run1, run2, by reading them from the datasource and normalizing them by the baseline, computed using femdetails (see emcCalibrationDataHelper::getBaseLine()).

Definition at line 144 of file emcChannelEvolution.C.

References fCDH, fDataSource, fGains, emcCalibrationDataHelper::getCalibration(), emcCalibrationDataHelper::getGainBaseLine(), emcDataManager::GetInstance(), emcManageable::GetStorageName(), emcTimeStamp::getTimeStamp(), emcTracedFEMMerger::merge(), nfems, EmcIndexer::PXSM144_iSiSM144(), emcDataManager::Read(), scale(), and emcManageable::SetSource().

emcTracedFEM * emcChannelEvolution::read int  ifem  )  [private]
 

Definition at line 269 of file emcChannelEvolution.C.

References fGains, fSourceDir, emcDataManager::GetInstance(), emcDataManager::GetSourceDir(), emcManageable::kFile_ASCII, emcDataManager::Read(), emcManageable::SetSource(), and emcDataManager::SetSourceDir().

bool emcChannelEvolution::read const char *  inputdir  ) 
 

Read gains from a directory.

Definition at line 296 of file emcChannelEvolution.C.

References fGains, and fSourceDir.

Referenced by graph().

bool emcChannelEvolution::save const char *  outputdir  ) 
 

Save gains to a directory.

Definition at line 312 of file emcChannelEvolution.C.

References fGains, emcDataManager::GetDestinationDir(), emcDataManager::GetInstance(), emcManageable::kFile_ASCII, emcDataManager::SetDestinationDir(), and emcDataManager::Write().


Member Data Documentation

emcCalibrationDataHelper* emcChannelEvolution::fCDH [private]
 

Definition at line 76 of file emcChannelEvolution.h.

Referenced by produce().

emcManageable::EStorage emcChannelEvolution::fDataSource [private]
 

Definition at line 78 of file emcChannelEvolution.h.

Referenced by produce().

std::vector<emcTracedFEM*> emcChannelEvolution::fGains [private]
 

Definition at line 77 of file emcChannelEvolution.h.

Referenced by dump(), emcChannelEvolution(), graph(), produce(), read(), save(), and ~emcChannelEvolution().

std::string emcChannelEvolution::fSourceDir [private]
 

Definition at line 79 of file emcChannelEvolution.h.

Referenced by read().


The documentation for this class was generated from the following files: