// -*- mode: c++ -*- // $Id: BrDbDetector.h,v 1.2 2001/10/08 10:54:55 cholm Exp $ // $Author: cholm $ // $Date: 2001/10/08 10:54:55 $ // $Copyright: 2000 Brahms Collaboration // #ifndef BRAT_BrDetector #define BRAT_BrDetector #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 DETECTOR_NAME "Detector" class BrDbDetector : public BrDbTable { private: Char_t fName[64]; // Name of Detector Int_t fTypeID; // Reference to type Int_t fSectorID; // Reference to sector Int_t fMaintainerID; // Reference to maintainer public: BrDbDetector(const Char_t* name, Int_t typeId = -1, Int_t sectorId =-1, Int_t maintainerId = -1); static const Char_t* kTableName; static BrDbQuery* Create(void); static BrDbDetector* 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 SetSectorID(Int_t id) { fSectorID = id; } virtual void SetMaintainerID(Int_t id) { fMaintainerID = id; } virtual const Char_t* GetName(void) const { return fName; } virtual Int_t GetTypeID(void) const { return fTypeID; } virtual Int_t GetSectorID(void) const { return fSectorID; } virtual Int_t GetMaintainerID(void) const { return fMaintainerID; } ClassDef(BrDbDetector,1) // Detector Class for BRAHMS database } ; #endif