#include <emcCalFEM.h>
Inherits emcManageable.
Inherited by emcHLRatioFEM, emcLCTofFEM, emcPedestalFEM, emcQAFEM, emcTracedFEM, and emcWalkTofFEM.
Inheritance diagram for emcCalFEM:
An emcCalFEM
is characterized by :
It's an emcManageable, so it can be read/write through the emcDataManager.
To access calibration data values, see getValue(Fast) methods.
As this class is virtual (and ctors are protected), you cannot create objects of this class. Only for subclasses you can do so. See the emcCalFEMFactory class for a generic way of creating such objects.
Definition at line 35 of file emcCalFEM.h.
Public Member Functions | |
virtual | ~emcCalFEM () |
Dtor (virtual as this is a base class.). | |
virtual emcCalFEM * | clone (void) const =0 |
virtual emcCalFEM * | create (void) const =0 |
bool | operator== (const emcCalFEM &obj) const |
Comparison. | |
bool | operator!= (const emcCalFEM &obj) const |
int | AbsolutePosition (void) const |
The absolute FEM position. | |
virtual float | DefaultReturnValue (void) const |
Default value to be returned by getValue methods. | |
std::string | Description (void) const |
Get the description of this calfem. | |
virtual const char * | GetCategory (void) const =0 |
emcCalFEM "isa" Manageable, so it must have this one. | |
const PHTimeStamp & | GetEndValTime (void) const |
Get the end-of-validity time. | |
virtual size_t | GetNumberOfChannels (void) const =0 |
Return the number of channels (should usually be 144). | |
const PHTimeStamp & | GetStartValTime (void) const |
Get the start-of-validity time. | |
bool | IsDefault (void) const |
Is this calfem a default one ? | |
bool | IsDraft (void) const |
Is this FEM draft only ? | |
virtual bool | IsEqual (const emcCalFEM &) const =0 |
Comparison. | |
virtual bool | IsValid (const PHTimeStamp &) const |
Is this FEM data valid at a given time ? | |
int | PinNumber (void) const |
Pin Number (might not be available - in which case 0 is returned). | |
virtual std::ostream & | Print (std::ostream &out=std::cout, int level=0) const |
Print (for debug purposes). | |
virtual void | Reset (void)=0 |
Reset (delete internal storage). | |
void | SetDescription (const char *description) |
Set description. | |
void | SetDefault (bool def=false) |
Set the default status. | |
void | SetDraft (bool draft=false) |
Set the draft status. | |
virtual void | SetNumberOfChannels (int=144) |
Set the number of channels. | |
void | SetPinNumber (int pinNumber) |
Set the pin number. | |
void | SetValidityPeriod (const PHTimeStamp &t1, const PHTimeStamp &t2) |
Set the validity period of this FEM. | |
void | SetVersion (int version=0) |
Set the version number. | |
size_t | size (void) const |
Get the number of channels of this FEM. | |
virtual void | updateValue (int, int, float, const char *) |
Update value method with a kind (e.g. | |
int | Version (void) const |
Version number of this object. | |
getValue = with bound checking. | |
virtual float | getValue (int ichannel) const |
with only one parameter = channel index | |
virtual float | getValue (int ichannel, time_t x) const |
two dim. get value | |
virtual float | getValue (int ichannel, int x) const |
two dim. get value | |
virtual float | getValue (int ichannel, int amucell, const char *kind) const |
get value method with a kind (e.g. for pedestals) | |
virtual float | getValue (int, int, const std::string &) const |
same as above with const char* -> string (avoid temporary object). | |
virtual float | getValue (int, const std::string &, float &output) const |
same as above without cell-dependence | |
virtual float | getValue (int i, const char *kind, float &output) const |
same as above with std::string -> char* | |
virtual float | getValueFast (int) const |
See getValue(int). | |
virtual float | getValueFast (int, time_t) const |
See getValue(int, time_t). | |
virtual float | getValueFast (int, int) const |
See getValue(int, int). | |
virtual float | getValueFast (int ichannel, int amucell, const char *kind) const |
See getValue(int,int,const char*). | |
virtual float | getValueFast (int, int, const std::string &) const |
See getValue(int,int,const std::string&). | |
virtual float | getValueFast (int, const std::string &, float &output) const |
See getValue(int, const std::string&, float&). | |
virtual float | getValueFast (int i, const char *kind, float &output) const |
See getValue(int,const char*,float&). | |
About X limits. | |
(where X=(t-t0)=incremental tics for PbSc and X=(r-r0)=incremental run number for PbGl. | |
time_t | GetXmin (void) const |
time_t | GetXmax (void) const |
void | SetXmin (time_t xmin) |
void | SetXmax (time_t xmax) |
Static Public Member Functions | |
Static methods. | |
static int | FEMCode (int absPosition, int pinNumber, int post_pre, int tac_pre) |
Make a single integer from four characteric values of one FEM. | |
static void | FEMDecode (int id, int &absPosition, int &pinNumber, int &post_pre, int &tac_pre) |
Decode FEM code. | |
static int | NumberOfInstances (void) |
Used to keep track of the number of emcCalFEM object (for debug). | |
Static Public Attributes | |
static int | fgNemcCalFEM = 0 |
Protected Member Functions | |
emcCalFEM (int absPosition) | |
Ctor with only position given. | |
emcCalFEM (int absPosition, const PHTimeStamp &tStart, const PHTimeStamp &tEnd) | |
Ctor with position and validity period given. | |
emcCalFEM (const emcCalFEM &) | |
Copy ctor. | |
emcCalFEM & | operator= (const emcCalFEM &) |
Assignment operator. | |
void | Copy (emcCalFEM &) const |
Used by copy ctor and assignement operator. | |
Private Attributes | |
PHTimeStamp | fStart |
PHTimeStamp | fEnd |
int | fAbsPosition |
time_t | fXmin |
time_t | fXmax |
bool | fDraft |
int | fVersion |
std::string | fDescription |
int | fPinNumber |
bool | fDefault |
|
Dtor (virtual as this is a base class.).
Definition at line 68 of file emcCalFEM.C. References fgNemcCalFEM. |
|
Ctor with only position given.
Definition at line 12 of file emcCalFEM.C. References fgNemcCalFEM. |
|
Ctor with position and validity period given.
Definition at line 24 of file emcCalFEM.C. References fgNemcCalFEM. |
|
Copy ctor.
Definition at line 37 of file emcCalFEM.C. References Copy(), and fgNemcCalFEM. |
|
The absolute FEM position. Ranges from 0 to EmcIndexer::MaxNumberOfFEMs(). Definition at line 61 of file emcCalFEM.h. References fAbsPosition. Referenced by emcGainFEM::AddNewItem(), emcGainFEM::Compact(), emcWalkTofFEM::create(), emcTofT0FEM::create(), emcTacPedFEM::create(), emcQAFEM::create(), emcPedestalFEM::create(), emcLCTofFEM::create(), emcHLRatioFEM::create(), emcGainFEM::create(), emcTracedFEMMerger::merge(), namer(), emcCalibrationDataHelper::patch(), emcOMCalFEMT< BM >::Read(), reader(), emcOMCalFEMT< BM >::ReadPreviousVersion(), and emcOMCalFEMT< BM >::Write(). |
|
Implemented in emcGainFEM, emcHLRatioFEM, emcLCTofFEM, emcPedestalFEM, emcQAFEM, emcTacPedFEM, emcTofT0FEM, emcTracedFEM, and emcWalkTofFEM. |
|
Used by copy ctor and assignement operator.
Definition at line 53 of file emcCalFEM.C. References fAbsPosition, fDefault, fDescription, fDraft, fEnd, fPinNumber, fStart, fVersion, fXmax, and fXmin. Referenced by emcWalkTofFEM::Copy(), emcTracedFEM::Copy(), emcQAFEM::Copy(), emcPedestalFEM::Copy(), emcLCTofFEM::Copy(), emcHLRatioFEM::Copy(), emcCalFEM(), and operator=(). |
|
Implemented in emcGainFEM, emcHLRatioFEM, emcLCTofFEM, emcPedestalFEM, emcQAFEM, emcTacPedFEM, emcTofT0FEM, and emcWalkTofFEM. |
|
Default value to be returned by getValue methods.
Reimplemented in emcTracedFEM. Definition at line 67 of file emcCalFEM.h. Referenced by emcWalkTofFEM::getValue(), emcQAFEM::getValue(), emcLCTofFEM::getValue(), emcHLRatioFEM::getValue(), getValue(), and getValueFast(). |
|
Get the description of this calfem.
Definition at line 73 of file emcCalFEM.h. References fDescription. Referenced by emcOMCalFEMT< BM >::Write(). |
|
Make a single integer from four characteric values of one FEM. post_pre and tac_pre are no longer used, but kept for backward compatibility. Definition at line 74 of file emcCalFEM.C. Referenced by EmcSimuRawDataReCal::GetGainFactorFromDB(). |
|
Decode FEM code. post_pre and tac_pre are no longer used, but kept for backward compatibility. Definition at line 90 of file emcCalFEM.C. Referenced by emcOMFEMtupleT< BM, FT >::Read(), emcOMCalFEMT< BM >::Read(), reader(), and emcOMCalFEMT< BM >::ReadPreviousVersion(). |
|
emcCalFEM "isa" Manageable, so it must have this one. But it's also a generic base class, so it's still pure virtual. Implements emcManageable. Implemented in emcGainFEM, emcHLRatioFEM, emcLCTofFEM, emcPedestalFEM, emcQAFEM, emcTacPedFEM, emcTofT0FEM, emcTracedFEM, and emcWalkTofFEM. Referenced by emcOMCalFEMT< BM >::Write(). |
|
Get the end-of-validity time.
Definition at line 191 of file emcCalFEM.h. References fEnd. Referenced by emcWalkTofFEM::create(), emcTofT0FEM::create(), emcTacPedFEM::create(), emcQAFEM::create(), emcPedestalFEM::create(), emcLCTofFEM::create(), emcHLRatioFEM::create(), emcGainFEM::create(), and emcOMCalFEMT< BM >::Write(). |
|
Return the number of channels (should usually be 144).
Implemented in emcHLRatioFEM, emcLCTofFEM, emcPedestalFEM, emcQAFEM, emcTracedFEM, and emcWalkTofFEM. Referenced by size(), emcOMWalkTofFEMT< T >::ToPdbCalBank(), emcOMPedestalFEMT< T >::ToPdbCalBank(), emcOMPedestal5FEMT< T >::ToPdbCalBank(), and emcOMLCTofFEMT< T >::ToPdbCalBank(). |
|
Get the start-of-validity time.
Definition at line 200 of file emcCalFEM.h. References fStart. Referenced by emcWalkTofFEM::create(), emcTofT0FEM::create(), emcTacPedFEM::create(), emcQAFEM::create(), emcPedestalFEM::create(), emcLCTofFEM::create(), emcHLRatioFEM::create(), emcGainFEM::create(), emcFEMtuple::ReplaceFEM(), emcOMCalFEMT< BM >::Write(), emcTracedFEM::writeDataToFile(), and emcTofT0FEM::writeDataToFile(). |
|
same as above with std::string -> char*
Definition at line 131 of file emcCalFEM.h. References getValue(). |
|
same as above without cell-dependence
Reimplemented in emcPedestalFEM. Definition at line 123 of file emcCalFEM.h. References DefaultReturnValue(). |
|
same as above with const char* -> string (avoid temporary object).
Reimplemented in emcPedestalFEM. Definition at line 116 of file emcCalFEM.h. References DefaultReturnValue(). |
|
get value method with a kind (e.g. for pedestals)
Definition at line 110 of file emcCalFEM.h. References getValueFast(). |
|
two dim. get value
Reimplemented in emcHLRatioFEM, emcLCTofFEM, emcQAFEM, and emcWalkTofFEM. Definition at line 104 of file emcCalFEM.h. References getValueFast(). |
|
two dim. get value
Definition at line 98 of file emcCalFEM.h. References getValueFast(). |
|
with only one parameter = channel index
Reimplemented in emcHLRatioFEM, emcLCTofFEM, emcQAFEM, and emcWalkTofFEM. Definition at line 92 of file emcCalFEM.h. References getValueFast(). Referenced by emcDCProcessorv3::calibrateEnergyPbGl(), emcDCProcessorv2::calibrateEnergyPbGl(), emcDCProcessorv3::calibrateEnergyPbSc(), emcDCProcessorv2::calibrateEnergyPbSc(), and getValue(). |
|
See getValue(int,const char*,float&).
Definition at line 182 of file emcCalFEM.h. References getValueFast(). |
|
See getValue(int, const std::string&, float&).
Reimplemented in emcPedestalFEM. Definition at line 174 of file emcCalFEM.h. References DefaultReturnValue(). |
|
See getValue(int,int,const std::string&).
Reimplemented in emcPedestalFEM. Definition at line 166 of file emcCalFEM.h. References DefaultReturnValue(). |
|
See getValue(int,int,const char*).
Definition at line 159 of file emcCalFEM.h. References getValueFast(). |
|
See getValue(int, int).
Reimplemented in emcHLRatioFEM, emcLCTofFEM, emcQAFEM, emcTracedFEM, and emcWalkTofFEM. Definition at line 153 of file emcCalFEM.h. References DefaultReturnValue(). |
|
See getValue(int, time_t).
Reimplemented in emcTracedFEM. Definition at line 147 of file emcCalFEM.h. References DefaultReturnValue(). |
|
See getValue(int).
Reimplemented in emcHLRatioFEM, emcLCTofFEM, emcQAFEM, emcTofT0FEM, and emcWalkTofFEM. Definition at line 141 of file emcCalFEM.h. References DefaultReturnValue(). Referenced by emcDCProcessorv3::calibrateTimePbGl(), emcDCProcessorv2::calibrateTimePbGl(), emcDCProcessorv3::calibrateTimePbSc(), emcDCProcessorv2::calibrateTimePbSc(), emcRawDataProcessorv3::chooseLowGainPbGl(), emcRawDataProcessorv2::chooseLowGainPbGl(), emcRawDataProcessorv3::chooseLowGainPbSc(), emcRawDataProcessorv2::chooseLowGainPbSc(), getValue(), and getValueFast(). |
|
Definition at line 287 of file emcCalFEM.h. References fXmax. Referenced by emcTracedFEM::getValueFast(), emcTracedFEMPlotter::MakeGraph(), emcTracedFEM::Print(), and testTracedFEMMerger(). |
|
Definition at line 282 of file emcCalFEM.h. References fXmin. Referenced by emcTracedFEM::getTV(), emcTracedFEM::getValueFast(), emcChannelEvolution::graph(), emcTracedFEMPlotter::MakeGraph(), emcTracedFEM::Print(), and testTracedFEMMerger(). |
|
Is this calfem a default one ?
Definition at line 206 of file emcCalFEM.h. References fDefault. |
|
Is this FEM draft only ?
Definition at line 212 of file emcCalFEM.h. References fDraft. Referenced by emcOMCalFEMT< BM >::Write(). |
|
Comparison.
Implemented in emcHLRatioFEM, emcLCTofFEM, emcPedestalFEM, emcQAFEM, emcTracedFEM, and emcWalkTofFEM. Referenced by operator!=(), and operator==(). |
|
Is this FEM data valid at a given time ?
Reimplemented from emcManageable. Definition at line 100 of file emcCalFEM.C. |
|
Used to keep track of the number of emcCalFEM object (for debug).
Definition at line 345 of file emcCalFEM.h. References fgNemcCalFEM. |
|
Definition at line 52 of file emcCalFEM.h. References IsEqual(). |
|
Assignment operator.
Definition at line 45 of file emcCalFEM.C. References Copy(). |
|
Comparison.
Definition at line 47 of file emcCalFEM.h. References IsEqual(). |
|
Pin Number (might not be available - in which case 0 is returned).
Definition at line 224 of file emcCalFEM.h. References fPinNumber. |
|
Print (for debug purposes).
Reimplemented in emcHLRatioFEM, emcLCTofFEM, emcPedestalFEM, emcQAFEM, emcTracedFEM, and emcWalkTofFEM. Referenced by calfemCheckList(), operator<<(), and emcTracedFEM::Print(). |
|
Reset (delete internal storage).
Reimplemented from emcManageable. Implemented in emcHLRatioFEM, emcLCTofFEM, emcPedestalFEM, emcQAFEM, emcTracedFEM, and emcWalkTofFEM. |
|
Set the default status.
Definition at line 242 of file emcCalFEM.h. References fDefault. |
|
Set description.
Definition at line 236 of file emcCalFEM.h. References fDescription. |
|
Set the draft status.
Definition at line 248 of file emcCalFEM.h. References fDraft. |
|
Set the number of channels.
Reimplemented in emcTracedFEM. Definition at line 254 of file emcCalFEM.h. |
|
Set the pin number.
Definition at line 258 of file emcCalFEM.h. References fPinNumber. |
|
Set the validity period of this FEM.
Definition at line 264 of file emcCalFEM.h. Referenced by calfemCheckList(). |
|
Set the version number.
Definition at line 271 of file emcCalFEM.h. References fVersion. Referenced by emcPedestalFEM::Copy(), emcPedestalFEM::emcPedestalFEM(), and emcTofT0FEM::emcTofT0FEM(). |
|
Definition at line 297 of file emcCalFEM.h. References fXmax. Referenced by emcTracedFEM::Reset(), and testTracedFEMMerger(). |
|
Definition at line 292 of file emcCalFEM.h. References fXmin. Referenced by emcTracedFEM::Reset(), and testTracedFEMMerger(). |
|
Get the number of channels of this FEM.
Definition at line 305 of file emcCalFEM.h. References GetNumberOfChannels(). Referenced by emcTofT0FEM::Default(), emcTracedFEMPlotter::emcTracedFEMPlotter(), emcWalkTofFEM::IsEqual(), emcTracedFEM::IsEqual(), emcQAFEM::IsEqual(), emcPedestalFEM::IsEqual(), emcLCTofFEM::IsEqual(), emcHLRatioFEM::IsEqual(), emcTracedFEM::NextItem(), and emcCalibrationDataHelper::patch(). |
|
Update value method with a kind (e.g. for pedestals). This method is used to allow for in-processing update of the stored pedestal values - can be important for timing. It is equivalent to running mean computation with assumption that the typical RMS of the cell-based pedestal is 3 counts (new entry contribution is 10% compared to accumulated average). Definition at line 316 of file emcCalFEM.h. |
|
Version number of this object.
Definition at line 323 of file emcCalFEM.h. References fVersion. Referenced by emcPedestalFEM::Copy(), emcTofT0FEM::create(), emcPedestalFEM::create(), emcPedestalFEM::Default(), emcOMPedestalFEMT< T >::FromPdbCalBank(), emcOMPedestal5FEMT< T >::FromPdbCalBank(), emcTofT0FEM::GetCategory(), emcPedestalFEM::GetCategory(), emcPedestalFEM::IsEqual(), emcTofT0FEM::setBBCT0(), emcOMPedestalFEMT< T >::ToPdbCalBank(), and emcOMPedestal5FEMT< T >::ToPdbCalBank(). |
|
Definition at line 374 of file emcCalFEM.h. Referenced by AbsolutePosition(), and Copy(). |
|
Definition at line 385 of file emcCalFEM.h. Referenced by Copy(), IsDefault(), and SetDefault(). |
|
Definition at line 383 of file emcCalFEM.h. Referenced by Copy(), Description(), and SetDescription(). |
|
Definition at line 381 of file emcCalFEM.h. Referenced by Copy(), IsDraft(), and SetDraft(). |
|
Definition at line 373 of file emcCalFEM.h. Referenced by Copy(), GetEndValTime(), IsValid(), and SetValidityPeriod(). |
|
Definition at line 388 of file emcCalFEM.h. Referenced by emcCalFEM(), NumberOfInstances(), and ~emcCalFEM(). |
|
Definition at line 384 of file emcCalFEM.h. Referenced by Copy(), PinNumber(), and SetPinNumber(). |
|
Definition at line 372 of file emcCalFEM.h. Referenced by Copy(), GetStartValTime(), IsValid(), and SetValidityPeriod(). |
|
Definition at line 382 of file emcCalFEM.h. Referenced by Copy(), SetVersion(), and Version(). |
|
Definition at line 378 of file emcCalFEM.h. |
|
Definition at line 377 of file emcCalFEM.h. |