// -*- mode: c++ -*- // $Id: BrDbComponent.h,v 1.2 2001/10/08 10:54:37 cholm Exp $ // $Author: cholm $ // $Date: 2001/10/08 10:54:37 $ // $Copyright: 2000 Brahms Collaboration // #ifndef BRAT_BrDbComponent #define BRAT_BrDbComponent #ifndef ROOT_TObjArray #include "TObjArray.h" #endif #ifndef ROOT_TSQLServer #include "TSQLServer.h" #endif #ifndef ROOT_TSQLResult #include "TSQLResult.h" #endif #ifndef ROOT_TSQLRow #include "TSQLRow.h" #endif #ifndef BRAT_BrDbTable #include "BrDbTable.h" #endif #ifndef BRAT_BrDbQuery #include "BrDbQuery.h" #endif #define COMPONENT_NAME "Component" class BrDbComponent : public BrDbTable { private: Char_t fName[64]; Int_t fTypeID; Int_t fDetectorID; public: BrDbComponent(const Char_t* name, Int_t typeId = -1, Int_t detectorid = -1); static const Char_t* kTableName; static BrDbQuery* Create(void); static BrDbComponent* SingleInstance(TSQLRow*); static TObjArray* MultipleInstance(TSQLResult*); virtual BrDbQuery* Insert(void); virtual void SetName(const Char_t* name); virtual void SetTypeID(Int_t id) { fTypeID = id; } virtual void SetDetectorID(Int_t id) { fDetectorID = id; } virtual const Char_t* GetName(void) const { return fName; } virtual Int_t GetTypeID(void) const { return fTypeID; } virtual Int_t GetDetectorID(void) const { return fDetectorID; } ClassDef(BrDbComponent,1) // Component Class for BRAHMS database } ; #endif