#ifndef TSLOWCONTROLDATABASE_seen #define TSLOWCONTROLDATABASE_seen #include #include "ISlowControlMySQLInterface.hxx" /// A singleton class that creates, and provides access to a temporary /// slow control database (or at least the interface to a slow control database). /// There may be a number of different GSC databases that the user can access. /// The user must choose a particular database to access using the following /// environment variables: /// /// ENV_GSC_TSQL_URL = url of database in form < mysql://[host]:[port]/[database_name] > /// where ':[port]' can be ommitted /// ENV_GSC_TSQL_USER = username for database account /// ENV_GSC_TSQL_PSWD = password for database account /// class ISlowControlDatabase { public: virtual ~ISlowControlDatabase(); /// Get a reference to GSC interface static ISlowControlMySQLInterface& Get(void); /// Get a reference to ODB interface static ISlowControlMySQLInterface& ODB(void); private: ISlowControlDatabase(); /// The static pointer to the singleton instance. static ISlowControlDatabase* fTSlowControlDatabase; /// Pointer to the Slow Control Database Interface ISlowControlMySQLInterface *fGSCInterface; /// Pointer to the ODB Database Interface ISlowControlMySQLInterface *fODBInterface; }; #endif