// -*- mode: c++ -*- // // $Id: BrDbDb.h,v 1.1 2001/10/08 10:54:51 cholm Exp $ // $Author: cholm $ // $Date: 2001/10/08 10:54:51 $ // $Copyright: (C) 2001 BRAHMS Collaboration // #ifndef BRAT_BrDbDb #define BRAT_BrDbDb #ifndef BRAT_BrDbTable #include "BrDbTable.h" #endif #ifndef ROOT_TSQLRow #include "TSQLRow.h" #endif #ifndef ROOT_TSQLResult #include "TSQLResult.h" #endif #ifndef ROOT_TObjArray #include "TObjArray.h" #endif #define DB_NAME "DB" class BrDbDb : public BrDbTable { private: Char_t fName[64]; Char_t fHost[64]; Char_t fFile[64]; Char_t fType[16]; public: BrDbDb(const Char_t* name, const Char_t* host, const Char_t* file, const Char_t* type="mysql"); static const Char_t* kTableName; static BrDbQuery* Create(); static BrDbDb* SingleInstance(TSQLRow*); static TObjArray* MultipleInstance(TSQLResult*); virtual BrDbQuery* Insert(); virtual void SetName(const Char_t* name); virtual void SetHost(const Char_t* host); virtual void SetFile(const Char_t* file); virtual void SetType(const Char_t* type); virtual const Char_t* GetName() const { return fName; } virtual const Char_t* GetHost() const { return fHost; } virtual const Char_t* GetFile() const { return fFile; } virtual const Char_t* GetType() const { return fType; } ClassDef(BrDbDb,1) // Rep. of database entries in main db }; #endif //____________________________________________________________________ // // $Log: BrDbDb.h,v $ // Revision 1.1 2001/10/08 10:54:51 cholm // Added the pure table representation BrDbDb of BrahmsMain.DB, rather than // the misuse of BrDb. Also added MySQL and ROOT implmentations of the // access. // //