]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliRunDataStorage.h
Removing warnings on alphacxx6
[u/mrichter/AliRoot.git] / STEER / AliRunDataStorage.h
1 #ifndef ALIRUNDATASTORAGE_H
2 #define ALIRUNDATASTORAGE_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8 ///
9 /// base class for data base access classes
10 ///
11
12 #include <TObject.h>
13 #include <TObjArray.h>
14
15 class TFile;
16 class AliSelectionMetaData;
17 class AliObjectMetaData;
18 class AliRunData;
19
20
21 class AliRunDataStorage: public TObject {
22 public:
23   virtual ~AliRunDataStorage();
24
25   const TObject*         Get(const char* name, Int_t runNumber);        // Gets an object from the database
26
27   Bool_t                 Put(const TObject* object, 
28                              const AliObjectMetaData& objMetaData);     // Put an object into the database
29
30   void                   Select(const AliSelectionMetaData& selMetaData);       // Add a selection criterion 
31
32   Bool_t                 RecordToFile(const char* fileName = "DB.root");        // prepares to record the retrieved entries to a local file
33   
34   const AliObjectMetaData& GetObjectMetaData(const char* name);         // Gets the ObjectMetaData of the retrieved entry (name=entry's name)
35   
36 //  virtual void                 TagForProduction(const AliSelectionMetaData& selMetaData, Uint_t prodVers);
37
38   static AliRunDataStorage* Instance();         // Instance of the current AliRunDataStorage object (AliRunDataFile, AliRunDataOrganizedFile etc...)
39
40 protected:
41   AliRunDataStorage();
42
43   virtual AliRunData*    GetEntry(AliSelectionMetaData& selMetaData, Int_t runNumber) = 0;      // virtual, see the correspondent method of the derived classes
44
45   virtual Bool_t         PutEntry(AliRunData* entry);                   // virtual, see the correspondent method of the derived classes
46
47   AliRunData*            GetCurrentEntry(const char* name) const
48     {return (AliRunData*) fEntries.FindObject(name);}
49
50 private:
51   AliRunDataStorage(const AliRunDataStorage& db);
52   AliRunDataStorage& operator = (const AliRunDataStorage& db);
53
54   TObjArray              fSelection;   //! meta data selection
55
56   TObjArray              fEntries;     //! array of current AliRunData objects
57   TFile*                 fRecordFile;  //! file for recorded entries
58
59   static AliRunDataStorage* fgInstance;   //! pointer to the DB instance
60
61   ClassDef(AliRunDataStorage, 0)     // base class for data base access classes
62 };
63
64 #endif