BRAT 2.4.5
Class index
Full class index
brahmlib
BRAHMS
ROOT page

BrRootMainDb


class description - source file - inheritance tree

class BrRootMainDb : public BrMainDb


    public:
BrRootMainDb BrRootMainDb(const Char_t* name = "MainDb", const Char_t* title = "BRAHMS_MAIN_DB_NAME") BrRootMainDb BrRootMainDb(BrRootMainDb&) virtual void ~BrRootMainDb() virtual void AddComponent(BrDbComponent* comp) virtual void AddComponentType(BrDbComponentType* type) virtual void AddDb(BrDbDb* person) virtual void AddDetector(BrDbDetector* det) virtual void AddDetectorType(BrDbDetectorType* type) virtual void AddPerson(BrDbPerson* person) virtual void AddSector(BrDbSector* sector) static TClass* Class() virtual Bool_t Connect(Option_t* option) virtual BrDbComponent* GetComponent(const Char_t* condition) virtual BrDbComponent* GetComponentByName(const Char_t* name, Int_t detectorId) virtual BrDbComponentType* GetComponentType(const Char_t* condition) virtual BrDbComponentType* GetComponentTypeByName(const Char_t* name) virtual BrDbDb* GetDb(const Char_t* name) virtual BrDbDetector* GetDetector(const Char_t* condition) virtual BrDbDetector* GetDetectorByName(const Char_t* name) virtual BrDbDetectorType* GetDetectorType(const Char_t* condition) virtual BrDbDetectorType* GetDetectorTypeByName(const Char_t* name) virtual BrDbPerson* GetPerson(const Char_t* condition) virtual BrDbPerson* GetPersonByName(const Char_t* lastname, const Char_t* firstnames) virtual BrDbSector* GetSector(const Char_t* condition) virtual BrDbSector* GetSectorByName(const Char_t* name) virtual TObjArray* GetXComponent(const Char_t* condition) virtual TObjArray* GetXComponentType(const Char_t* condition) virtual TObjArray* GetXDetector(const Char_t* condition) virtual TObjArray* GetXDetectorType(const Char_t* condition) virtual TObjArray* GetXPerson(const Char_t* condition) virtual TObjArray* GetXSector(const Char_t* condition) static BrMainDb* Instance() virtual TClass* IsA() const virtual Bool_t PurgeDetector(const Char_t* name) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members

    private:
TObjArray* fDb Cache pointer to table TObjArray* fPerson Cache pointer to table TObjArray* fSector Cache pointer to table TObjArray* fDetector Cache pointer to table TObjArray* fDetectorType Cache pointer to table TObjArray* fComponent Cache pointer to table TObjArray* fComponentType Cache pointer to table

Class Description

 Class BrRdbmMainDb

 Singleton class, that connects woth top level database
 Name and host of database is set at compile time in
 BrDBInc.hh, unless overriden in ctor.

 Provides methods to connect ot additional databases.


BrRootMainDb(const Char_t* name, const Char_t* title)

BrMainDb* Instance(void)

Bool_t Connect(Option_t* option)
 Overloaded here, since we need to get the gPerson.
 Options:
   See BrDb::Connect

void AddDb(BrDbDb* db)
 Add a new person to the detector database. Throws a BrException
 in case of error.

void AddPerson(BrDbPerson* person)
 Add a new person to the detector database. Throws a BrException
 in case of error.

void AddSector(BrDbSector* sector)
 Add a new Sector to the Sectors table. The BrDbSector object is
 updated to contain the database ID number. Throws a BrException
 in case of errors.

void AddDetector(BrDbDetector* detector)
 Add a detector to the database. Throws a BrException in case of
 Error.

void AddDetectorType(BrDbDetectorType* detectorType)
 Add a Detector type to the database. Throws a BrException in case of
 Error.

void AddComponent(BrDbComponent* component)
 Add a component to the database. Throws a BrException in case of
 Error.

void AddComponentType(BrDbComponentType* componentType)
 Add a Component type to the database. Throws a BrException in case of
 Error.

BrDbDb* GetDb(const Char_t* name)
 Returns the actual database name and host in a TNamed (name is
 dbname, title is host) for the symbolic database called name.
 The TNamed object must be deleted by user.

BrDbPerson* GetPerson(const Char_t* condition)
 Returns 0 always (General SQL queries not implmented)

BrDbSector* GetSector(const Char_t* condition)
 Returns 0 always (General SQL queries not implmented)

BrDbDetector* GetDetector(const Char_t* condition)
 Returns 0 always (General SQL queries not implmented)

BrDbDetectorType* GetDetectorType(const Char_t* condition)
 Returns 0 always (General SQL queries not implmented)

BrDbComponent* GetComponent(const Char_t* condition)
 Returns 0 always (General SQL queries not implmented)

BrDbComponentType* GetComponentType(const Char_t* condition)
 Returns 0 always (General SQL queries not implmented)

TObjArray* GetXPerson(const Char_t* condition)
 Returns the full list of persons.

TObjArray* GetXSector(const Char_t* condition)
 Returns the full list of sectors.

TObjArray* GetXDetector(const Char_t* condition)
 Returns the full list of detectors.

TObjArray* GetXDetectorType(const Char_t* condition)
 Returns the full list of detector types.

TObjArray* GetXComponent(const Char_t* condition)
 Returns the full list of components.

TObjArray* GetXComponentType(const Char_t* condition)
 Returns the full list of component types.

BrDbPerson* GetPersonByName(const Char_t* lastname, const Char_t* firstnames)
 Get an entry for individual [<firstnames>] <lastname>. Note that
 both arguments must be specified, thought the second my be the
 empty string, NULL, or zero.

BrDbSector* GetSectorByName(const Char_t* name)

BrDbDetector* GetDetectorByName(const Char_t* name)

BrDbDetectorType* GetDetectorTypeByName(const Char_t* name)

BrDbComponent* GetComponentByName(const Char_t* name, Int_t detectorId)

BrDbComponentType* GetComponentTypeByName(const Char_t* name)

Bool_t PurgeDetector(const Char_t* name)
 Completly remove all references to the detector named name from
 the databases.  This involves:

   Removing all revisions for detectors parameters
   Removing all parameters for the detector
   Remove the detector entry itself

 This is a DANGEROUS method, and should not be used lightly.
 Normal users do not have the privileges to do this, so they
 should not worry too much about it, but privileged user can do
 ereperable damage to the database by using this method.

 The method return kFALSE in case something went wrong.



Inline Functions


             TClass* Class()
             TClass* IsA() const
                void ShowMembers(TMemberInspector& insp, char* parent)
                void Streamer(TBuffer& b)
                void StreamerNVirtual(TBuffer& b)
        BrRootMainDb BrRootMainDb(BrRootMainDb&)
                void ~BrRootMainDb()

This page automatically generated by script docBrat by Christian Holm

Copyright ; 2002 BRAHMS Collaboration <brahmlib@rcf.rhic.bnl.gov>
Last Update on 2001/10/08 10:55:31 $ by cholm $

Validate HTML
Validate CSS