#include <emcChannelEvolution.h>
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 | |
emcTracedFEM * | read (int ifem) |
Private Attributes | |
emcCalibrationDataHelper * | fCDH |
std::vector< emcTracedFEM * > | fGains |
emcManageable::EStorage | fDataSource |
std::string | fSourceDir |
|
Definition at line 56 of file emcChannelEvolution.C. |
|
Definition at line 65 of file emcChannelEvolution.C. References fGains. |
|
Get a text output of gain evolution for one channel.
Definition at line 76 of file emcChannelEvolution.C. References fGains. |
|
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(). |
|
Get a graphical representation of gain evolution.
Definition at line 99 of file emcChannelEvolution.C. References fGains, emcCalFEM::GetXmin(), and read(). Referenced by graph(). |
|
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(). |
|
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(). |
|
Read gains from a directory.
Definition at line 296 of file emcChannelEvolution.C. References fGains, and fSourceDir. Referenced by graph(). |
|
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(). |
|
Definition at line 76 of file emcChannelEvolution.h. Referenced by produce(). |
|
Definition at line 78 of file emcChannelEvolution.h. Referenced by produce(). |
|
Definition at line 77 of file emcChannelEvolution.h. Referenced by dump(), emcChannelEvolution(), graph(), produce(), read(), save(), and ~emcChannelEvolution(). |
|
Definition at line 79 of file emcChannelEvolution.h. Referenced by read(). |