// -*- mode: c++ -*- // // $Id: BrPassInfo.h,v 1.1 2001/10/08 11:01:03 cholm Exp $ // $Author: cholm $ // $Date: 2001/10/08 11:01:03 $ // $Copyright: (C) 2001 BRAHMS Collaboration // #ifndef BRAT_BrPassInfo #define BRAT_BrPassInfo #ifndef ROOT_TObject #include "TObject.h" #endif #ifndef ROOT_TDatime #include "TDatime.h" #endif #ifndef ROOT_TObjArray #include "TObjArray.h" #endif #ifndef BRAT_BrDbPass #include "BrDbPass.h" #endif #ifndef BRAT_BrPassDb #include "BrPassDb.h" #endif #ifndef BRAT_BrDbInputFile #include "BrDbInputFile.h" #endif #ifndef BRAT_BrDbOutputFile #include "BrDbOutputFile.h" #endif class BrPassInfo { public: enum EAccessMode { kRead, kWrite }; private: Bool_t fInitialized; //! BrPassDb* fPassDb; //! TDatime fStart; //! EAccessMode fAccessMode; //! BrDbPass* fPass; TObjArray* fInputFiles; // TObjArray* fOutputFiles; // public: BrPassInfo(); virtual ~BrPassInfo(); void Init(); void Start() { fStart.Set(); } void AddInputFile(const Char_t* filename, Int_t runno=-1); void AddOutputFile(const Char_t* filename, Int_t runno=-1); TObjArray* GetInputFiles() const { return fInputFiles; } TObjArray* GetOutputFile() const { return fOutputFiles; } void Print(Option_t* option="") const; void SetDatabase(BrPassDb* db); void SetAccessMode(EAccessMode mode) { fAccessMode = mode; } EAccessMode GetAccessMode() const { return fAccessMode; } Bool_t IsRead() const { return fAccessMode==kRead ? kTRUE : kFALSE; } Bool_t IsWrite() const { return fAccessMode==kWrite ? kTRUE : kFALSE; } void Update(const Char_t* name, Int_t runNo); void Commit(const Char_t* name, Int_t runno); ClassDef(BrPassInfo,0) // Information on a pass }; #endif //____________________________________________________________________ // // $Log: BrPassInfo.h,v $ // Revision 1.1 2001/10/08 11:01:03 cholm // Reimplmented this DB interface to allow Polymorphic access. This means // the at the class BrPassInfo and the corresponding manager // BrPassInfoManager is what the user sees, rather than the lowlevel // BrDbPass and so on. Also, shortend some class names since they were // really long and didn't really add any information to the class. All // table representations are now prefixed with BrDb like in other database // access classes. // //