|
BrCalibrationclass description - source file - inheritance tree class BrCalibration : public TNamedprotected: Data Membersprotected: See also
Class DescriptionBrCalibration 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 Functionsvoid 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>
|