BRAT 2.4.5
Class index
Full class index
brahmlib
BRAHMS
ROOT page

BrRdbmMainDb


class description - source file - inheritance tree

class BrRdbmMainDb : public BrMainDb


    public:
BrRdbmMainDb BrRdbmMainDb(const Char_t* name = "MainDb", const Char_t* title = "BRAHMS_MAIN_DB_NAME") BrRdbmMainDb BrRdbmMainDb(BrRdbmMainDb&) virtual void ~BrRdbmMainDb() virtual void AddComponent(BrDbComponent* comp) virtual void AddComponentType(BrDbComponentType* type) virtual void AddDb(BrDbDb* db) 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




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.


BrRdbmMainDb(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 db to the db table. 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* det)
 Add a detector to the database. Throws a BrException in case of
 Error.

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

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

void AddComponentType(BrDbComponentType* type)
 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 BrDbDb for the
 symbolic database called name. The BrDbDb object must be deleted
 by user.

BrDbPerson* GetPerson(const Char_t* condition)
 See GetSector and BrDb::GetSingle.

BrDbSector* GetSector(const Char_t* condition)
 Selects a Sector from database, according to the conditions in
 the argument e.g., "name LIKE '%%%s%%', "FMS"".  See also
 BrDb::GetSingle. Valid fields are
    name (string)

BrDbDetector* GetDetector(const Char_t* condition)
 See GetSector and BrDb::GetSingle. Valid fields are
   name (string), type (int), sector (int), maintainer (int)

BrDbDetectorType* GetDetectorType(const Char_t* condition)
 See GetSector and BrDb::GetSingle. Valid fields are
    lastname, firstnames, email, institute (all strings)

BrDbComponent* GetComponent(const Char_t* condition)
 See GetSector and BrDb::GetSingle. Valid fields are
   name (string), type (int), sector (int), maintainer (int)

GetComponentType(const Char_t* condition)
 See GetSector and BrDb::GetSingle. Valid fields are
    lastname, firstnames, email, institute (all strings)

GetXPerson(const Char_t* condition)
 You need to explicitly provide the "WHERE" in the where claus.
 See also BrDb::GetMulitple

GetXSector(const Char_t* condition)
 You need to explicitly provide the "WHERE" in the where claus.
 See also BrDb::GetMulitple

GetXDetector(const Char_t* condition)
 You need to explicitly provide the "WHERE" in the where claus.
 See also BrDb::GetMulitple

GetXDetectorType(const Char_t* condition)
 You need to explicitly provide the "WHERE" in the where claus.
 See also BrDb::GetMulitple

GetXComponent(const Char_t* condition)
 You need to explicitly provide the "WHERE" in the where claus.
 See also BrDb::GetMulitple

GetXComponentType(const Char_t* condition)
 You need to explicitly provide the "WHERE" in the where claus.
 See also BrDb::GetMulitple

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)
        BrRdbmMainDb BrRdbmMainDb(BrRdbmMainDb&)
                void ~BrRdbmMainDb()

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:18 $ by cholm $

Validate HTML
Validate CSS