rooDBObj


class description - source file - inheritance tree

class rooDBObj : public rooObj


    public:
rooDBObj rooDBObj() rooDBObj rooDBObj(void* imp) rooDBObj rooDBObj(const rooDBObj&) virtual void ~rooDBObj() virtual void Browse(TBrowser* b) Bool_t change(const TString& newDB, const TString& newHost, const TString& newPath, FILE* fp = stdout) const TClass* Class() Bool_t close() const rooFDObj containedIn() rooFDObj& containedIn(rooFDObj& fd) Bool_t contains(rooContItr& itr, Int_t openMode = kooNoOpen) const Bool_t convertObjects() Bool_t exist(const TString& dbName, Int_t openMode = kooNoOpen) Bool_t exist(const rooFDObj& fd, const TString& dbName, Int_t openMode = kooNoOpen) TString fileName() const rooContObj getDefaultContObj(Int_t openMode = kooNoOpen) const virtual const char* GetName() const virtual const char* GetTitle() const TString hostName() const virtual TClass* IsA() const virtual Bool_t IsFolder() Bool_t isValid() const Bool_t lock(Int_t lockMode) const TString name() const ULong_t numContObjs() const Bool_t open(const TString& DBname, Int_t openMode = kooRead) Bool_t open(const rooFDObj& FDhandle, const TString& DBname, Int_t openMode = kooRead) Bool_t open(Int_t openMode = kooRead) const Int_t openMode() const rooDBObj& operator=(const rooDBObj&) TString pathName() const virtual void Print(Option_t* option) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) Bool_t tidy(FILE* fp = stdout, const TString& hostName, const TString& pathName) const virtual Int_t typeN() const virtual TString typeName() const Bool_t update() const

Data Members

private:
rooFDObj* fFD parent fd


See also

rooDBItr

Class Description

 rooDBObj corresponds to ooHandle(ooDBObj) class

 Handle class for databases

rooDBObj()
 default ctor.

rooDBObj(const rooDBObj& db)
 copy ctor.

Bool_t change(const TString& newDB, const TString& newHost, const TString& newPath, FILE* fp) const
 newDB - new system name of the database. This feature
          is currently not implemented. Always pass the
          value of "" for this parameter.
 newHost - new name of the host on which the database
          file resides
 newPath - new local path name of the database file. The
          database file name should be the last component of
          the path name.
 fp - pointer to a transcript file to which the
       information for the database is echoed before
       and after invoking this member function. The
       default is stdout.

 Use this member function to rename or physically move a database file
 to a new location. Objectivity/DB tries to get an exclusive update lock
 on the corresponding database when the member function is invoked.
 If it cannot obtain the lock, the member function returns an error
 status.
 If Objectivity/DB obtains the exclusive update lock, this member
 function logically renames or relocates the database file within the
 federated database. However, you must then physically move or
 rename the file using the operating system command to move a file.

Bool_t close() const
 Closes the referenced database.

rooFDObj containedIn()
 Returns object handle to federated database in which the
 database is contained.

Bool_t contains(rooContItr& itr,Int_t openMode) const
 Initializes the iterator contI to traverse all containers in the
 referenced database. Objects of the iteration are automatically opened
 in the mode specified by openMode. The default is kooNoOpen (do not
 open the container automatically).

Bool_t convertObjects()
 Convert all objects affected by schema evolution operations within a
 database to their current class representations.

Bool_t exist(const TString& dbName, Int_t openMode)
 Tests for the existence of a database. Returns the constant kTRUE if
 the database with system name dbName exists in the federated
 database referenced by handle fdH, otherwise returns oocFalse. If the
 database exists and openMode is oocRead or kooUpdate, the database
 is opened and its object reference or handle is initialized to the
 database. If openMode is kooRead or kooUpdate, and exist returns
 kFALSE, the database either does not exist or the database exists but
 is not accessible, and the object reference or handle is set to null. If
 openMode is kooNoOpen and the database exists, the database is not
 opened, but the object reference or handle is initialized to the database.
 If openMode is kooNoOpen and the database does not exist, the
 database is not opened, and the object reference or handle is set to null.

Bool_t exist(const rooFDObj &fd, const TString& dbName, Int_t openMode)
 Tests for the existence of a database. Returns the constant kTRUE if
 the database with system name dbName exists in the federated
 database referenced by handle fdH, otherwise returns oocFalse. If the
 database exists and openMode is oocRead or kooUpdate, the database
 is opened and its object reference or handle is initialized to the
 database. If openMode is kooRead or kooUpdate, and exist returns
 kFALSE, the database either does not exist or the database exists but
 is not accessible, and the object reference or handle is set to null. If
 openMode is kooNoOpen and the database exists, the database is not
 opened, but the object reference or handle is initialized to the database.
 If openMode is kooNoOpen and the database does not exist, the
 database is not opened, and the object reference or handle is set to null.

TString fileName() const
 Returns string containing full file name of the
 database file, including path information.

rooContObj getDefaultContObj(Int_t openMode) const
 Returns object handle of the default container for the
 database.

TString hostName() const
 Returns string containing name of the network
 host on which the database file is located

Bool_t isValid() const
 kTRUE if the object handle is valid.

Bool_t lock(Int_t lockMode) const
 Explicitly locks the database and propagates the lock to any objects
 associated through links that have lock propagation enabled.

TString name() const
 Returns the system name of the referenced database

ULong_t numContObjs() const
 Returns the number of containers in a database.

Bool_t open(const TString& DBname, Int_t openMode)
 Opens the referenced database in the access mode specified by
 openMode, either kooRead and kooUpdate. The default open mode is
 kooRead.

Bool_t open(const rooFDObj& FDhandle, const TString& DBname, Int_t openMode )
 Opens the referenced database in the access mode specified by
 openMode, either kooRead and kooUpdate. The default open mode is
 kooRead.

Bool_t open(Int_t openMode) const
 Opens the referenced database in the access mode specified by
 openMode, either kooRead and kooUpdate. The default open mode is
 kooRead.

Int_t openMode() const
 Returns the mode in which the currently referenced database has been
 opened.

TString pathName() const
 Returns string containing full path of the directory
 where the database file is located

Bool_t tidy(FILE* fp, const TString& hostName, const TString& pathName) const
 Use the tidy member function to invoke the
 ootidy tool from within an application to tidy a database.
 When Objectivity/DB is tidying a database, it needs a temporary
 scratch file to hold the intermediate data. By default, this scratch file
 is created in the directory that contains the database file. The
 hostName and pathName arguments allow you to control where the
 scratch file is created. If either hostName or pathName is zero or empty
 (""), the scratch file is created in the default directory.

 When using this member function, you must follow these steps:
    1. Start a transaction.
    2. Open the database for update.
    3. Invoke the rooDBObj::tidy member function.
    4. Immediately commit the transaction.

 You cannot manipulate any database, container, or basic object within
 the transaction before invoking the rooDBObj::tidy
 member function. This member function performs physical storage
 compaction and relocation. After calling this function, some of the
 cached system data is in an inconsistent state, so it is important that
 you immediately commit the transaction so that the system data can be
 reinitialized to a known state.
 You cannot abort a transaction after calling this member function.

Int_t typeN() const
  Returns the string "ooDBObj"

TString typeName() const
 Returns the type number of ooDBObj.

Bool_t update() const
 Opens the referenced database in update access mode

const char* GetTitle()
 returns hostname::pathname of this database

void Print(Option_t *option)
 print out content of database

void Browse(TBrowser *b)
 browse content of database



Inline Functions


           rooDBObj rooDBObj(const rooDBObj&)
          rooDBObj& operator=(const rooDBObj&)
          rooFDObj& containedIn(rooFDObj& fd)
        const char* GetName() const
             Bool_t IsFolder()
            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
               void Streamer(TBuffer& b)
               void ~rooDBObj()


Author: Valeriy Onuchin 11/09/2000


ROOT page - Class index - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.