1 #ifndef ALI_CDB_STORAGE_H
2 #define ALI_CDB_STORAGE_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
7 /////////////////////////////////////////////////////////////////////
9 // class AliCDBStorage //
10 // interface to specific storage classes //
11 // (AliCDBGrid, AliCDBLocal, AliCDBDump) //
13 /////////////////////////////////////////////////////////////////////
16 #include "AliCDBMetaData.h"
22 class AliCDBStorage: public TObject {
27 void SetURI(const TString& uri) {fURI = uri;}
28 const TString& GetURI() const {return fURI;}
30 void ReadSelectionFromFile(const char *fileName);
32 void AddSelection(const AliCDBId& selection);
34 void AddSelection(const AliCDBPath& path,
35 const AliCDBRunRange& runRange,
37 Int_t subVersion = -1);
39 void AddSelection(const AliCDBPath& path,
43 Int_t subVersion = -1);
45 void RemoveSelection(const AliCDBId& selection);
47 void RemoveSelection(const AliCDBPath& path,
48 const AliCDBRunRange& runRange);
50 void RemoveSelection(const AliCDBPath& path,
54 void RemoveSelection(int position);
55 void RemoveAllSelections();
57 void PrintSelectionList();
59 AliCDBEntry* Get(const AliCDBId& query);
60 AliCDBEntry* Get(const AliCDBPath& path, Int_t runNumber,
61 Int_t version = -1, Int_t subVersion = -1);
62 AliCDBEntry* Get(const AliCDBPath& path, const AliCDBRunRange& runRange,
63 Int_t version = -1, Int_t subVersion = -1);
65 TList* GetAll(const AliCDBId& query);
66 TList* GetAll(const AliCDBPath& path, Int_t runNumber,
67 Int_t version = -1, Int_t subVersion = -1);
68 TList* GetAll(const AliCDBPath& path, const AliCDBRunRange& runRange,
69 Int_t version = -1, Int_t subVersion = -1);
71 Bool_t Put(TObject* object, AliCDBId& id, AliCDBMetaData* metaData);
72 Bool_t Put(AliCDBEntry* entry);
75 virtual Bool_t IsReadOnly() const = 0;
76 virtual Bool_t HasSubVersion() const = 0;
78 virtual Bool_t Contains(const char* path) const = 0;
82 virtual ~AliCDBStorage();
83 void GetSelection(/*const*/ AliCDBId* id);
84 virtual AliCDBEntry* GetEntry(const AliCDBId& query) = 0;
85 virtual TList* GetEntries(const AliCDBId& query) = 0;
86 virtual Bool_t PutEntry(AliCDBEntry* entry) = 0;
87 virtual TList *GetIdListFromFile(const char* fileName)=0;
91 TList fSelections; // list of selection criteria
92 TString fURI; //! storage URI;
94 ClassDef(AliCDBStorage, 0);