BRAT 2.4.5
Class index
Full class index
brahmlib
BRAHMS
ROOT page

BrCalibration


class description - source file - inheritance tree

class BrCalibration : public TNamed


    protected:
const Char_t* FormatDate(const Int_t time) const public:
BrCalibration BrCalibration() BrCalibration BrCalibration(Char_t* name, Char_t* title) BrCalibration BrCalibration(BrCalibration&) virtual void ~BrCalibration() virtual void AddParameterData(Char_t*, BrCalibrationData*) static TClass* Class() virtual void Close(Option_t* option) virtual void Commit(Int_t, Int_t) virtual Int_t DebugLevel() const virtual Int_t GetAccessMode(const Char_t* par) const virtual const Char_t* GetRevisionDate(const Char_t* parameterName) const virtual Int_t GetRevisionDateUnix(const Char_t* parameterName) const virtual const Char_t* GetRevisionValidEnd(const Char_t* parameterName) const virtual Int_t GetRevisionValidEndUnix(const Char_t* parameterName) const virtual const Char_t* GetRevisionValidStart(const Char_t* parameterName) const virtual Int_t GetRevisionValidStartUnix(const Char_t* parameterName) const virtual void Init() virtual TClass* IsA() const virtual void Print(Option_t* option = "b") const virtual Bool_t RevisionExists(const Char_t* parameterName) const virtual void SetComment(const char*, const char*) virtual void SetDatabase(BrCalibrationsDb*) virtual void SetDebugLevel(Int_t lvl) virtual void SetVerbose(Int_t lvl) virtual void ShowMembers(TMemberInspector& insp, char* parent) static Bool_t StillValid(Int_t start, Int_t stop, Int_t ValidStart, Int_t ValidEnd) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b) virtual void Update(Int_t, Int_t) virtual void Use(const TString& parName, BrCalibration::EAccessMode mode = kRead, UInt_t nElements = 0) virtual Int_t Verbose() const

Data Members


    protected:
BrDbDetector* fDetector !Detector Int_t fDetectorId Db table unique ID BrMainDb* fMainDb !Database Pointer BrCalibrationsDb* fCalibDb ! TObjArray fParameterDataList ! List of ParameterData defined for this element. Bool_t fInitialized Int_t fDebugLevel ! Debug Level Int_t fVerboseLevel ! Verbose Level public:
static const BrCalibration::EAccessMode kRead static const BrCalibration::EAccessMode kWrite static const BrCalibration::EAccessMode kTransitional


See also

BrBbCalibration, BrChkvCalibration, BrDcCalibration, BrMultCalibration, BrMultCentCalibration, BrTestCalibration, BrTofCalibration, BrTpcCalibration, BrVertexCalibration, BrZdcCalibration

Class Description

 BrCalibration is a BRAHMS data class providing storage and
 access function for Calibration constants. It is an essential
 baseclass for concrete detectorclasses. This class calls the
 BrDb.. MySql access methods, and uses structures from there.

 The class utilizes a utility class
 BrParameterDbData that should not be used anywhere else.




BrCalibration()
 Constructor. Set counter and list data members to zero.
 Don't use this constructor unless you have to and know
 what you are doing
 Use BrCalibration(Char_t, Char_t ) instead

BrCalibration(Char_t *name, Char_t *title) : TNamed(name, title)
 Standard constructor.
 the name should be that of the associated detector e.g. "H1"
 This will be called from the ParameterManager - so the Database
 etc is defined at this point.
 The fCalibDb is set to the default in the constructor. It can be
 overwritten by the SetDatabase Method.

~BrCalibration()
 Default destructor


void AddParameterData(Char_t* parametername, BrCalibrationData* data)
 Add the parameterdata structure to objectlist AND create the
 BrDbParameter object.


void Commit(Int_t start, Int_t stop)
 Check validity of data and update if need be by call to DB engine


void Close(Option_t* option)
 Close connection to the database, if it exists, so that we free
 this slot on the server.  Since we can have multiple DBs, one for
 each BrCalibration object, we need to run through them all.  This
 is done by the BrCalibrationManager, so here we only need to make
 sure if we're connected or not.

void Init()
 Init will be called be BrDbParameterManager Init() method.
 Create the Parameter description Object for all objects.
 Usualy called from the BrCalibrationManager::Init() method.
 The Databse MUST have been set at this point, since the parameter
 information is extracted from the DB here.


Int_t GetAccessMode(const Char_t* param) const
 get the access mode in general term by looking up the
 parameter element defined by name.


const Char_t* FormatDate(const Int_t time) const
 Return formatted start date-time
 Input is the fDatim from the TDatime
 This is done in later versions of root using
 TDatime::AsSQLString() but that is not yet in root that is being
 used at the time of this writing.  So we do it by hand for
 compatibility.
 Copied from BrRunInfo.

const Char_t* GetRevisionValidStart(const Char_t* param) const
 get the unix time for the Revion in use.
 parameter element defined by name.


const Char_t* GetRevisionValidEnd(const Char_t* param) const
 get the Revison Time in human readable form
 parameter element defined by name.


const Char_t* GetRevisionDate(const Char_t* param) const
 get the Insertion Date/Time in human readable form
 parameter element defined by name.


Int_t GetRevisionValidStartUnix(const Char_t* param) const
 get the unix time for the Revion in use.
 parameter element defined by name.


Int_t GetRevisionDateUnix(const Char_t* param) const
 get the unix time for the Revion in use.
 parameter element defined by name.


Int_t GetRevisionValidEndUnix(const Char_t* param) const
 get the unix time for the Revion in use.
 parameter element defined by name.


Bool_t RevisionExists(const Char_t* param) const
 Check if there's a revision for parameter param.  If param is
 "*", then check all parameters that has been flaged for use.

void SetComment(const Char_t * parametername, const Char_t * text)
 Set the revision comment if the table is set writeable


void SetDatabase(BrCalibrationsDb* calib)
 This MUST be done before Init()


void Update(Int_t start, Int_t stop)
 Check validity of data and update if need be by call to DB engine
 In case of access mode==3 (Load) reply an module to load these.

void Use(const TString& parName, BrCalibration::EAccessMode mode=kRead, UInt_t nElements=0)
 Mark the access mode for the parameter.
 By default a given class will not be updated unless
 being marked by this method in on of the user modules.


void Print(Option_t* option) const
 Options:
   B         Basic information
   D         Detector information
   L         Recursively print the contained BrCalibrationData

 Other options are passed onto contained BrCalibrationData
 objects.  See BrCalibrationData::Print for a description of
 avaliable options.

Bool_t StillValid(Int_t start, Int_t stop, Int_t ValidStart, Int_t ValidEnd)
 This routine seems to be lacking some
 reasonable content.




Inline Functions


                 void SetDebugLevel(Int_t lvl)
                 void SetVerbose(Int_t lvl)
                Int_t DebugLevel() const
                Int_t Verbose() const
              TClass* Class()
              TClass* IsA() const
                 void ShowMembers(TMemberInspector& insp, char* parent)
                 void Streamer(TBuffer& b)
                 void StreamerNVirtual(TBuffer& b)
        BrCalibration BrCalibration(BrCalibration&)

This page automatically generated by script docBrat by Christian Holm

Copyright ; 2002 BRAHMS Collaboration <brahmlib@rcf.rhic.bnl.gov>
Last Update on 2002/06/23 17:06:44 $ by videbaek $

Validate HTML
Validate CSS