class emcDataManager

EmCal DataManager.

Public Methods

[more]void ls(const char* opt="")
Shows the list of the supported object's type (ie.
[more]emcManageable* Collect(const emcManageable& object, const PHTimeStamp& when)
Collect 1 big manageable valid for all the supermodules in the current configuration.
[more]const char* GetDestinationDir(void)
Get the directory where to put the calibration data files.
[more]const char* GetSourceDir(void)
Get the directory where to find the calibration data files.
[more]static int GetVerboseLevel(void)
Get the verbose level
[more]bool Read(emcManageable& object, const PHTimeStamp& tSearch, int id)
Read a manageable object from db.
[more]void Reset(void)
Reset DM and underlying plugins.
[more]void SetDestinationDir(const char* path)
Set the directory where to put the calibration data files.
[more]void SetSourceDir(const char* path)
Set the directory where to find the calibration data files.
[more]static void SetVerboseLevel(int level=0)
Set the verbose level
[more]bool Write(const emcManageable& object, const PHTimeStamp& tStart, int id=-1)
Write a manageable object to db


Documentation

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).

ovoid ls(const char* opt="")
Shows the list of the supported object's type (ie. the plug-in list).

oemcManageable* Collect(const emcManageable& object, const PHTimeStamp& when)
Collect 1 big manageable valid for all the supermodules in the current configuration.
Parameters:
object - Object you want to collect (must be a subclass of emcManageable)
when - The recovery time

oconst char* GetDestinationDir(void)
Get the directory where to put the calibration data files. (in case calibration data has to go on files instead of DB).

oconst char* GetSourceDir(void)
Get the directory where to find the calibration data files. (in case calibration data has to be fetched from files instead of DB).

ostatic int GetVerboseLevel(void)
Get the verbose level

obool Read(emcManageable& object, const PHTimeStamp& tSearch, int id)
Read a manageable object from db.
Parameters:
object - Object you want to read (must be a subclass of emcManageable)
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).

ovoid Reset(void)
Reset DM and underlying plugins. Call this method if you would like to have the same behavior of the DM as if it was freshly created.

ovoid SetDestinationDir(const char* path)
Set the directory where to put the calibration data files. (in case calibration data has to go on files instead of DB).

ovoid SetSourceDir(const char* path)
Set the directory where to find the calibration data files. (in case calibration data has to be fetched from files instead of DB).

ostatic void SetVerboseLevel(int level=0)
Set the verbose level

obool Write(const emcManageable& object, const PHTimeStamp& tStart, int id=-1)
Write a manageable object to db
Parameters:
object - Object to write to db.
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


This class has no child classes.
Author:
L. Aphecetche

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.