EmCal DataManager.
EmCal DataManager.The general idea is :
1 If you want to put an EmCal object in a database, use this object.
2 If you want to get an EmCal object from a database, use this object.The interface of the Data Manager (DM) has 3 methods : Read, Write and Collect.
The Read method is used to store/retrieve objects to/from the Objy Database, by packets of 144 items.
The Write method can write objects of any size which is a multiple of 144 items (as long as the underlying plugin is able to do the job, of course...)The Collect method give access to one big object which contains all the relevant information for N packets of 144 items (the Collect method may in turn use the Read method). N is given by the current configuration of the detector (an ASCII file for the moment).
This configuration is accessed through the emcRawDataAccessor object.The DM does nothing by itself. It uses Object Managers (OM) to handle Read/Write/Collect requests.
DM and OM can only handle object which are of type emcManageable.
OM are added to the DM via a plug-in mechanism (see documentation on emcObjectManager class for more information).
emcManageable* Collect(const emcManageable& object, const PHTimeStamp& when)
when - The recovery timeconst char* GetDestinationDir(void)
const char* GetSourceDir(void)
static int GetVerboseLevel(void)
bool Read(emcManageable& object, const PHTimeStamp& tSearch, int id)
when - The recovery time
id - An identifier of your object (e.g. FEMcode).
This id will be used to compute a Bank Identifier (this bankid
is the actual id which will be stored in the DB). void Reset(void)
void SetDestinationDir(const char* path)
void SetSourceDir(const char* path)
static void SetVerboseLevel(int level=0)
bool Write(const emcManageable& object, const PHTimeStamp& tStart, int id=-1)
tStart - Only starting time for the validity period is given.
Value of ending time is chosen by the OM.
It might be 'now' (e.g. for the Gains), 'infinity' (e.g. for
the Pedestals), or whatever the plugins decides.
id - As in the read method
Alphabetic index HTML hierarchy of classes or Java