emcManageable Class Reference
[DataManagerInterfaces]

#include <emcManageable.h>

Inherits emcNamed.

Inherited by emcCalFEM, emcCalibrationData, emcConfigurationFile, emcFEMtuple, emcGeometry, emcRejectList, and emcTimeStamp.

Inheritance diagram for emcManageable:

Inheritance graph
[legend]
List of all members.

Detailed Description

(ABC) Object that can be passed to the emcDataManager to be read/written from/to files/database(s).

It allows to define data source and data destination. The GetCategory pure virtual method must be overriden in child classes and give a name which can be used to find the correct database or file basename for a given object type.

Author:
Laurent Aphecetche

Definition at line 23 of file emcManageable.h.

Public Types

enum  EStorage {
  kNone = -1, kDB_Objy, kFile_ASCII, kDB_Construction,
  kDB_Pg
}
 Storage type. More...

Public Member Functions

 emcManageable ()
 Default ctor.
 emcManageable (const char *name, const char *title, const char *classname)
 Ctor with name, title and classname (required).
virtual ~emcManageable ()
 Dtor (does nothing).
 emcManageable (const emcManageable &obj)
 Copy ctor.
emcManageableoperator= (const emcManageable &obj)
 Assignment operator.
virtual const char * GetCategory (void) const =0
 Category of the object = GAIN,PED,HL,etc.
EStorage GetDestination (void) const
 Get the storage destination.
EStorage GetSource (void) const
 Get the storage origine.
virtual bool IsValid (const PHTimeStamp &) const
 Tells if this object is still valid at that time.
virtual void Reset (void)
 Reset the object.
virtual void SetDestination (emcManageable::EStorage destination)
 Set the storage destination.
virtual void SetSource (emcManageable::EStorage origine)
 Set the storage origine.

Static Public Member Functions

static const char * GetStorageName (emcManageable::EStorage storage)
 Get storage name from enum number.
static emcManageable::EStorage GetStorage (const char *storagename)
 Get storage enum value from storage name.

Protected Member Functions

void Copy (emcNamed &obj) const

Private Attributes

EStorage fDestination
EStorage fSource


Member Enumeration Documentation

enum emcManageable::EStorage
 

Storage type.

Enumerator:
kNone  nowhere
kDB_Objy  Objectivity.
kFile_ASCII  Plain ASCII files.
kDB_Construction  "DB" at time of PbSc construction (ascii files also, really)
kDB_Pg  PostgreSQL.

Definition at line 29 of file emcManageable.h.


Constructor & Destructor Documentation

emcManageable::emcManageable  )  [inline]
 

Default ctor.

Definition at line 43 of file emcManageable.h.

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

Ctor with name, title and classname (required).

Definition at line 47 of file emcManageable.h.

virtual emcManageable::~emcManageable  )  [inline, virtual]
 

Dtor (does nothing).

Definition at line 52 of file emcManageable.h.

emcManageable::emcManageable const emcManageable obj  )  [inline]
 

Copy ctor.

Definition at line 56 of file emcManageable.h.

References Copy().


Member Function Documentation

void emcManageable::Copy emcNamed obj  )  const [inline, protected]
 

Reimplemented from emcNamed.

Definition at line 155 of file emcManageable.h.

References emcNamed::Copy(), fDestination, and fSource.

Referenced by emcGeometry::Copy(), emcManageable(), and operator=().

virtual const char* emcManageable::GetCategory void   )  const [pure virtual]
 

Category of the object = GAIN,PED,HL,etc.

.. This category is used to determine the top-level container of this object in the database.

Implemented in emcConfigurationFile, emcCalibrationData, emcGeometry, emcCalFEM, emcGainFEM, emcGains, emcHLRatioFEM, emcHLRatios, emcLCTofFEM, emcLCTofs, emcPedestalFEM, emcPedestals, emcPedestals5, emcQAFEM, emcQAs, emcRejectList, emcTacPedFEM, emcTacPeds, emcTimeStamp, emcTofT0FEM, emcTofT0s, emcTracedFEM, emcWalkTofFEM, and emcWalkTofs.

Referenced by emcFEMtuple::AppendFEM().

EStorage emcManageable::GetDestination void   )  const [inline]
 

Get the storage destination.

Definition at line 118 of file emcManageable.h.

References fDestination.

Referenced by emcOMWalkTofFEMT< T >::CanWrite(), emcOMTracedFEMT< T, B >::CanWrite(), emcOMTracedFEMT< T, emcTofT0FEM >::CanWrite(), emcOMRejectListT< BM >::CanWrite(), emcOMRejectList::CanWrite(), emcOMQAFEMT< T >::CanWrite(), emcOMPedestalFEMT< T >::CanWrite(), emcOMPedestal5FEMT< T >::CanWrite(), emcOMLCTofFEMT< T >::CanWrite(), emcOMHLRatioFEMT< T >::CanWrite(), emcOMGeometryT< BM >::CanWrite(), emcOMFEMtupleT< BM, FT >::CanWrite(), emcOMCalibrationDataTofSectorOffset::CanWrite(), emcOMCalibrationDataT< BM >::CanWrite(), emcOMCalibrationDataIniCal::CanWrite(), emcOMAsciiT< T >::CanWrite(), and emcOMCalFEMT< BM >::Write().

EStorage emcManageable::GetSource void   )  const [inline]
 

Get the storage origine.

Definition at line 124 of file emcManageable.h.

References fSource.

Referenced by emcOMWalkTofFEMT< T >::CanRead(), emcOMTracedFEMT< T, B >::CanRead(), emcOMTracedFEMT< T, emcTofT0FEM >::CanRead(), emcOMTimeStamp::CanRead(), emcOMRejectListT< BM >::CanRead(), emcOMRejectList::CanRead(), emcOMQAFEMT< T >::CanRead(), emcOMPedestalFEMT< T >::CanRead(), emcOMPedestal5FEMT< T >::CanRead(), emcOMLCTofFEMT< T >::CanRead(), emcOMIniCalConstruction::CanRead(), emcOMHLRatioFEMT< T >::CanRead(), emcOMGeometryT< BM >::CanRead(), emcOMFEMtupleT< BM, FT >::CanRead(), emcOMCalibrationDataTofSectorOffset::CanRead(), emcOMCalibrationDataT< BM >::CanRead(), emcOMCalibrationDataIniCal::CanRead(), emcOMAsciiT< T >::CanRead(), emcOMFEMtupleT< BM, FT >::Collect(), convertSector(), and emcOMFEMtupleT< BM, FT >::Read().

static emcManageable::EStorage emcManageable::GetStorage const char *  storagename  )  [inline, static]
 

Get storage enum value from storage name.

Definition at line 95 of file emcManageable.h.

References kDB_Construction, kDB_Objy, kDB_Pg, kFile_ASCII, kNone, and name.

Referenced by emcDBMS::set(), and emcDataStorageMap::storage().

static const char* emcManageable::GetStorageName emcManageable::EStorage  storage  )  [inline, static]
 

Get storage name from enum number.

Definition at line 78 of file emcManageable.h.

References kDB_Construction, kDB_Objy, kDB_Pg, kFile_ASCII, and kNone.

Referenced by emcDBMS::asString(), emcOMRejectListT< BM >::changeName::changeName(), emcOMRejectList::changeName::changeName(), emcOMGeometryT< BM >::changeName::changeName(), emcOMFEMtupleT< BM, FT >::changeName::changeName(), emcOMCalibrationDataTofSectorOffset::changeName::changeName(), emcOMCalibrationDataT< BM >::changeName::changeName(), emcOMCalibrationDataIniCal::changeName::changeName(), emcOMCalFEMT< BM >::changeName::changeName(), emcOMAsciiT< T >::changeName::changeName(), emcDataStorageMap::print(), emcChannelEvolution::produce(), and emcOMCalibrationDataTofSectorOffset::Read().

virtual bool emcManageable::IsValid const PHTimeStamp &   )  const [inline, virtual]
 

Tells if this object is still valid at that time.

Returns:
false by default. Must be overriden.

Reimplemented in emcConfigurationFile, emcCalibrationData, emcGeometry, emcCalFEM, and emcFEMtuple.

Definition at line 132 of file emcManageable.h.

emcManageable& emcManageable::operator= const emcManageable obj  )  [inline]
 

Assignment operator.

Definition at line 62 of file emcManageable.h.

References Copy().

virtual void emcManageable::Reset void   )  [inline, virtual]
 

Reset the object.

Reimplemented in emcConfigurationFile, emcCalibrationData, emcGeometry, emcCalFEM, emcFEMtuple, emcHLRatioFEM, emcLCTofFEM, emcPedestalFEM, emcQAFEM, emcRejectList, emcTracedFEM, and emcWalkTofFEM.

Definition at line 138 of file emcManageable.h.

virtual void emcManageable::SetDestination emcManageable::EStorage  destination  )  [inline, virtual]
 

Set the storage destination.

Definition at line 142 of file emcManageable.h.

References fDestination.

Referenced by calfemCheckList(), and emcBadNormt::process().

virtual void emcManageable::SetSource emcManageable::EStorage  origine  )  [inline, virtual]
 

Set the storage origine.

Definition at line 148 of file emcManageable.h.

References fSource.

Referenced by mEmcTOFCorr2Module::apply_tdcped(), PbScSector::BuildFromDB(), PbGlSector::BuildFromDB(), calfemCheckList(), emcCalibrationDataHelper::collectCalibData(), emcRawDataCalibratorV2::CollectForCDO(), emcRawDataCalibratorV1::CollectForCDO(), emcRawDataCalibrator::CollectForCDO(), emcRawDataCalibratorV2::CollectForMDO(), emcRawDataCalibratorV1::CollectForMDO(), emcRawDataCalibrator::CollectForMDO(), emcCalibrationDataHelper::emcCalibrationDataHelper(), mEmcToolsModule::EmcCollectDeadMap(), emcRejectList_to_tex(), EmcSimuRawDataReCal::GetGainFactorFromDB(), emcRawDataAccessor::GetInstance(), LongTermGains(), emcBadNormt::process(), emcChannelEvolution::produce(), emcOMFEMtupleT< BM, FT >::Read(), emcChannelEvolution::read(), mEmcGeometryModule::readFromDB(), emcGainEvolution::run(), and test().


Member Data Documentation

EStorage emcManageable::fDestination [private]
 

Definition at line 164 of file emcManageable.h.

Referenced by Copy(), GetDestination(), and SetDestination().

EStorage emcManageable::fSource [private]
 

Definition at line 165 of file emcManageable.h.

Referenced by Copy(), GetSource(), and SetSource().


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