emcFEMtuple Class Reference
[Old calibration software]

#include <emcFEMtuple.h>

Inherits emcManageable.

Inherited by emcGains, emcHLRatios, emcLCTofs, emcPedestals, emcPedestals5, emcQAs, and emcWalkTofs.

Inheritance diagram for emcFEMtuple:

Inheritance graph
[legend]
List of all members.

Detailed Description

(OLD) Base class for calibration data storage for several FEMs.

Deprecated:
A FEMtuple is basically a vector of emcCalFEM, and as such is quite easy to implement directly in user code (currently it's only used in the calibrator, a class which will also soon be revisited anyway...). Thus the following documentation might not be really accurate.

Definition at line 27 of file emcFEMtuple.h.

Public Member Functions

 emcFEMtuple ()
 emcFEMtuple (const char *name, const char *title, const char *classname)
virtual ~emcFEMtuple ()
PHTimeStamp Get1 ()
PHTimeStamp Get2 ()
virtual bool Add (emcFEMtuple &fem)
 Add an emcFEMtuple to this one.
virtual emcCalFEMAppendFEM (int absPosition, const PHTimeStamp &t1, const PHTimeStamp &t2)
 Append one FEM, and return a pointer to the created emcCalFEM.
virtual bool CheckIndex (int ifem) const
 Check if a FEM index is valid for this object.
virtual emcCalFEMGetFEM (int ifem)
 Return a given Calibration FEM.
virtual int GetNumberOfChannels (void) const
 Return the number of channels handled by this object.
virtual int GetNumberOfFEMs (void) const
 Return the number of FEM handled by this object.
virtual int GetXmin (int ifem=0) const
virtual int GetXmax (int ifem=0) const
virtual int GetSize (void) const
 Return the number of FEM hold by this object.
virtual float getValue (int ichannel) const
 get value method for time-independant objects
virtual float getValue (int ichannel, int thetime) const
 get value method for time-dependant objects
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 ichannel, int amucell, const std::string &kind) const
 get value method with a kind (e.g. for pedestals)
virtual float getValue (int ichannel, const char *kind, float &out) const
 get value method with a kind, but no cell-dependence.
virtual bool IsDraft (void) const
 Return draft status.
virtual bool IsOwner (void) const
 Return the ownership.
virtual bool IsValid (const PHTimeStamp &when) const
 Tells if this object is still valid at that time.
virtual bool IsValid (const PHTimeStamp &when, int ifem) const
 Tells if values for one fem of this object are valid at that time.
virtual void Print (int level=0)
 Print (for debug purposes).
virtual std::ostream & Print (std::ostream &out, int level)
virtual bool ReplaceFEM (int ifem, emcFEMtuple &fem)
 Replace a given FEM by a FEMtuple containing only one FEM.
virtual void Reset (void)
 Reset the object.
virtual void SetDraft (bool draft)
 Set the draft status of this femtuple.
virtual bool SetXmin (int xmin, int ifem=0)
virtual bool SetXmax (int xmax, int ifem=0)
void SetOwnership (bool owner=true)
 Set ownership.
virtual void updateValue (int ichannel, int amucell, float newValue, const char *kind) const
 update value method with a kind (e.g. for pedestals)

Protected Attributes

std::vector< emcCalFEM * > fFEMs
bool fOwner
PHTimeStamp fLastStartTime
PHTimeStamp fFirstEndTime


Constructor & Destructor Documentation

emcFEMtuple::emcFEMtuple  ) 
 

Definition at line 12 of file emcFEMtuple.C.

References Reset().

emcFEMtuple::emcFEMtuple const char *  name,
const char *  title,
const char *  classname
[inline]
 

Definition at line 33 of file emcFEMtuple.h.

emcFEMtuple::~emcFEMtuple  )  [virtual]
 

Definition at line 18 of file emcFEMtuple.C.

References Reset().


Member Function Documentation

bool emcFEMtuple::Add emcFEMtuple fem  )  [virtual]
 

Add an emcFEMtuple to this one.

By now, it is checked that fem.GetSize()==1, and that fem.IsOwner()==true. After this call, fem.IsOwner() will be false.

Definition at line 24 of file emcFEMtuple.C.

References fFEMs, fLastStartTime, Get1(), GetFEM(), GetSize(), IsOwner(), and SetOwnership().

emcCalFEM * emcFEMtuple::AppendFEM int  absPosition,
const PHTimeStamp &  t1,
const PHTimeStamp &  t2
[virtual]
 

Append one FEM, and return a pointer to the created emcCalFEM.

Parameters:
absPosition : the fem absolute position
t1 : start-of-validity period
t2 : end-of-validity period.

Definition at line 47 of file emcFEMtuple.C.

References emcCalFEMFactory::Create(), fFEMs, fFirstEndTime, fLastStartTime, and emcManageable::GetCategory().

Referenced by emcOMFEMtupleT< BM, FT >::Read().

virtual bool emcFEMtuple::CheckIndex int  ifem  )  const [inline, virtual]
 

Check if a FEM index is valid for this object.

Definition at line 69 of file emcFEMtuple.h.

References fFEMs.

Referenced by GetFEM(), GetXmax(), GetXmin(), IsValid(), ReplaceFEM(), SetXmax(), and SetXmin().

PHTimeStamp emcFEMtuple::Get1  )  [inline]
 

Definition at line 42 of file emcFEMtuple.h.

References fLastStartTime.

Referenced by Add().

PHTimeStamp emcFEMtuple::Get2  )  [inline]
 

Definition at line 46 of file emcFEMtuple.h.

References fFirstEndTime.

emcCalFEM * emcFEMtuple::GetFEM int  ifem  )  [virtual]
 

Return a given Calibration FEM.

Definition at line 74 of file emcFEMtuple.C.

References CheckIndex(), and fFEMs.

Referenced by Add(), ReplaceFEM(), and emcGains::writeDataToFile().

int emcFEMtuple::GetNumberOfChannels void   )  const [virtual]
 

Return the number of channels handled by this object.

Definition at line 118 of file emcFEMtuple.C.

References fFEMs.

virtual int emcFEMtuple::GetNumberOfFEMs void   )  const [inline, virtual]
 

Return the number of FEM handled by this object.

Definition at line 81 of file emcFEMtuple.h.

References fFEMs.

Referenced by GetSize(), ReplaceFEM(), and emcGains::writeDataToFile().

virtual int emcFEMtuple::GetSize void   )  const [inline, virtual]
 

Return the number of FEM hold by this object.

Definition at line 90 of file emcFEMtuple.h.

References GetNumberOfFEMs().

Referenced by Add(), and test().

virtual float emcFEMtuple::getValue int  ichannel,
const char *  kind,
float &  out
const [inline, virtual]
 

get value method with a kind, but no cell-dependence.

Definition at line 124 of file emcFEMtuple.h.

References fFEMs, and getValue().

virtual float emcFEMtuple::getValue int  ichannel,
int  amucell,
const std::string &  kind
const [inline, virtual]
 

get value method with a kind (e.g. for pedestals)

Definition at line 117 of file emcFEMtuple.h.

References fFEMs, and getValue().

virtual float emcFEMtuple::getValue int  ichannel,
int  amucell,
const char *  kind
const [inline, virtual]
 

get value method with a kind (e.g. for pedestals)

Definition at line 110 of file emcFEMtuple.h.

References fFEMs, and getValue().

virtual float emcFEMtuple::getValue int  ichannel,
int  thetime
const [inline, virtual]
 

get value method for time-dependant objects

Definition at line 103 of file emcFEMtuple.h.

References fFEMs, and getValue().

virtual float emcFEMtuple::getValue int  ichannel  )  const [inline, virtual]
 

get value method for time-independant objects

Definition at line 96 of file emcFEMtuple.h.

References fFEMs.

Referenced by emcRawDataCalibratorV2::CalibrateEnergy(), emcRawDataCalibratorV1::CalibrateEnergy(), emcRawDataCalibrator::CalibrateEnergy(), emcRawDataCalibratorV1::CalibrateTime(), getValue(), and emcRawDataCalibratorV2::printData().

int emcFEMtuple::GetXmax int  ifem = 0  )  const [virtual]
 

Definition at line 102 of file emcFEMtuple.C.

References CheckIndex(), and fFEMs.

int emcFEMtuple::GetXmin int  ifem = 0  )  const [virtual]
 

Definition at line 87 of file emcFEMtuple.C.

References CheckIndex(), and fFEMs.

bool emcFEMtuple::IsDraft void   )  const [virtual]
 

Return draft status.

Definition at line 131 of file emcFEMtuple.C.

References fFEMs.

virtual bool emcFEMtuple::IsOwner void   )  const [inline, virtual]
 

Return the ownership.

Definition at line 134 of file emcFEMtuple.h.

References fOwner.

Referenced by Add(), and ReplaceFEM().

bool emcFEMtuple::IsValid const PHTimeStamp &  when,
int  ifem
const [virtual]
 

Tells if values for one fem of this object are valid at that time.

Definition at line 185 of file emcFEMtuple.C.

References CheckIndex(), and fFEMs.

bool emcFEMtuple::IsValid const PHTimeStamp &  when  )  const [virtual]
 

Tells if this object is still valid at that time.

Reimplemented from emcManageable.

Definition at line 154 of file emcFEMtuple.C.

References fFEMs.

virtual std::ostream& emcFEMtuple::Print std::ostream &  out,
int  level
[virtual]
 

void emcFEMtuple::Print int  level = 0  )  [virtual]
 

Print (for debug purposes).

Definition at line 196 of file emcFEMtuple.C.

bool emcFEMtuple::ReplaceFEM int  ifem,
emcFEMtuple fem
[virtual]
 

Replace a given FEM by a FEMtuple containing only one FEM.

Will fail in any of the following situations : a) fem.GetNumberOfFEMs()==1 b) (ifem)th fem does not exist in this object c) fem is not owner of its own FEMs array (because WE need to take ownership) d) we are not owner of our own FEMs array.

Definition at line 214 of file emcFEMtuple.C.

References CheckIndex(), fFEMs, fLastStartTime, fOwner, GetFEM(), GetNumberOfFEMs(), emcCalFEM::GetStartValTime(), IsOwner(), and SetOwnership().

void emcFEMtuple::Reset void   )  [virtual]
 

Reset the object.

Reimplemented from emcManageable.

Definition at line 242 of file emcFEMtuple.C.

References fFEMs, and fOwner.

Referenced by emcFEMtuple(), emcOMFEMtupleT< BM, FT >::Read(), and ~emcFEMtuple().

void emcFEMtuple::SetDraft bool  draft  )  [virtual]
 

Set the draft status of this femtuple.

Definition at line 263 of file emcFEMtuple.C.

References fFEMs.

void emcFEMtuple::SetOwnership bool  owner = true  )  [inline]
 

Set ownership.

Definition at line 171 of file emcFEMtuple.h.

References fOwner.

Referenced by Add(), and ReplaceFEM().

bool emcFEMtuple::SetXmax int  xmax,
int  ifem = 0
[virtual]
 

Definition at line 290 of file emcFEMtuple.C.

References CheckIndex(), and fFEMs.

bool emcFEMtuple::SetXmin int  xmin,
int  ifem = 0
[virtual]
 

Definition at line 274 of file emcFEMtuple.C.

References CheckIndex(), and fFEMs.

virtual void emcFEMtuple::updateValue int  ichannel,
int  amucell,
float  newValue,
const char *  kind
const [inline, virtual]
 

update value method with a kind (e.g. for pedestals)

Definition at line 177 of file emcFEMtuple.h.

References fFEMs.


Member Data Documentation

std::vector<emcCalFEM*> emcFEMtuple::fFEMs [protected]
 

Definition at line 189 of file emcFEMtuple.h.

Referenced by Add(), AppendFEM(), CheckIndex(), emcQAs::GetError(), GetFEM(), GetNumberOfChannels(), GetNumberOfFEMs(), getValue(), emcWalkTofs::GetValue1(), emcLCTofs::GetValue1(), emcWalkTofs::GetValue2(), emcLCTofs::GetValue2(), emcQAs::GetWarning(), GetXmax(), GetXmin(), IsDraft(), IsValid(), ReplaceFEM(), Reset(), SetDraft(), SetXmax(), SetXmin(), and updateValue().

PHTimeStamp emcFEMtuple::fFirstEndTime [protected]
 

Definition at line 196 of file emcFEMtuple.h.

Referenced by AppendFEM(), and Get2().

PHTimeStamp emcFEMtuple::fLastStartTime [protected]
 

Definition at line 195 of file emcFEMtuple.h.

Referenced by Add(), AppendFEM(), Get1(), and ReplaceFEM().

bool emcFEMtuple::fOwner [protected]
 

Definition at line 193 of file emcFEMtuple.h.

Referenced by IsOwner(), ReplaceFEM(), Reset(), and SetOwnership().


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