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 {
26 virtual ~AliCDBStorage();
29 void AddSelection(const AliCDBId& selection);
31 void AddSelection(const AliCDBPath& path,
32 const AliCDBRunRange& runRange,
34 Int_t subVersion = -1);
36 void AddSelection(const AliCDBPath& path,
40 Int_t subVersion = -1);
42 void RemoveSelection(const AliCDBId& selection);
44 void RemoveSelection(const AliCDBPath& path,
45 const AliCDBRunRange& runRange);
47 void RemoveSelection(const AliCDBPath& path,
51 void RemoveSelection(const int position);
52 void RemoveAllSelections();
54 AliCDBEntry* Get(const AliCDBId& query);
55 AliCDBEntry* Get(const AliCDBPath& path, Int_t runNumber,
56 Int_t version = -1, Int_t subVersion = -1);
57 AliCDBEntry* Get(const AliCDBPath& path, const AliCDBRunRange& runRange,
58 Int_t version = -1, Int_t subVersion = -1);
60 TList* GetAll(const AliCDBId& query);
61 TList* GetAll(const AliCDBPath& path, Int_t runNumber,
62 Int_t version = -1, Int_t subVersion = -1);
63 TList* GetAll(const AliCDBPath& path, const AliCDBRunRange& runRange,
64 Int_t version = -1, Int_t subVersion = -1);
66 void PrintSelectionList();
69 Bool_t Put(TObject* object, AliCDBId& id, AliCDBMetaData* metaData);
70 Bool_t Put(AliCDBEntry* entry);
73 virtual Bool_t IsReadOnly() = 0;
74 virtual Bool_t HasSubVersion() = 0;
78 AliCDBId GetSelection(const AliCDBId& id);
79 virtual AliCDBEntry* GetEntry(const AliCDBId& query) = 0;
80 virtual TList* GetEntries(const AliCDBId& query) = 0;
81 virtual Bool_t PutEntry(AliCDBEntry* entry) = 0;
85 TList fSelections; // list of selection criteria
87 ClassDef(AliCDBStorage, 0);