//-------------------------------------------------------------------------- // File and Version Information: // $Id: BdbConfig.hh,v 1.4 1998/01/10 00:58:16 yury Exp $ // // Description: // Class BdbConfig represents the BaBar configuration database // as a part of online domain. // // Environment: // Software developed for the BaBar Detector at the SLAC B-Factory. // // Author List: // David R. Quarrie Original Author (BdbConditions) // Yury Kolomensky clone // // Copyright Information: // Copyright (C) 1994, 1995 Lawrence Berkeley Laboratory // Copyright (C) 1997 Caltech // //-------------------------------------------------------------------------- #ifndef BDBCONFIG_HH #define BDBCONFIG_HH //----------------- // BaBar Headers -- //----------------- #include "BaBar/BaBar.hh" //-------------------- // Database Headers -- //-------------------- #include "BdbUtil/Bdb.hh" //---------------------- // Base Class Headers -- //---------------------- #include "BdbApplication/BdbDomain.hh" //------------------------------- // Collaborating Class Headers -- //------------------------------- #include // --------------------- // -- Class Interface -- // --------------------- class BdbConfig : public virtual BdbDomain { //------------------ // Static Members -- //------------------ public: // The singleton configuration Database instance selector static BdbConfig* instance( ); // Status values and transaction modes inherited from BdbApplication private: // The singleton database instance static BdbConfig* _instance; static const char* databaseName(); //-------------------- // Instance Members -- //-------------------- public: // Destructor virtual ~BdbConfig( ); // Selectors const char* getHostName ( ) const; const char* getRootPath ( ) const; // Modifiers protected: // Constructor(s) BdbConfig( ); // Operations void initialize( ); d_Boolean isAuthorized( BdbDomain::AuthLevels theAuthLevel=BdbDomain::User, const char* const theAuthName=NULL ); private: RWCString _rootPath; RWCString _hostName; }; #endif