Base class for all the plugins handling object deriving from emcFEMtuple.
Base class for all the plugins handling object deriving from emcFEMtuple. It implements the logic common to all plugins dealing with daughter classes of emcFEMtuple, for the Collect, Read and Write methods :
a) Collect. It's a loop over all the FEM of EMCAL (the one stated in the configuration file, which is retrieved thanks to the emcRawDataAccessor).
b) Read. Reading of ONE FEM, either from Objy DB, or from file (in which case actual work is delegated to the ReadFromFile method.
c) Write. Splits the emcFEMtuple into pieces of one FEM-long, make PdbCalBank from those, and put them into the Objy FD.
Plugins deriving from this one MUST implement the following methods:
1) FromPdbCalBank(), which fills an emcCalFEM object from a PdbCalBank. (Called by Read)
2) ToPdbCalBank() : reverse operation of 1). (Called by Write)
3) GetPersistentClassName() : give the name of the low-level objy class the plugin is dealing with, i.e. one of the PdbEmc??? classes.
4) MakeBankID() : computes a PdbBankID from CalFEM header info. A default implementation is furnished, which should be OK, but you should better check it ! (e.g. it's not valid for Gains).
Optionally, you may override the ReadFromFile method if the plugin is able to read from file.
virtual void FromPdbCalBank(emcCalFEM* calfem, PdbCalBank* bank)
virtual string GetPersistentClassName(void) const
virtual void MakeBankID(PdbBankID& bankID, int absPosition, int pinNumber, int post_pre, int tac_pre)
virtual bool Read(emcManageable& object, const PHTimeStamp& time_stamp, int femCode)
virtual bool ReadFromFile(emcFEMtuple& femtuple, int absPosition, int pinNumber, int post_pre, int tac_pre)
virtual void Reset(void)
virtual void ToPdbCalBank(emcCalFEM* calfem, PdbCalBank* bank)
virtual bool Write(const emcManageable& object, const PHTimeStamp& tdummy, int dummy=-1)
Alphabetic index HTML hierarchy of classes or Java