]>
Commit | Line | Data |
---|---|---|
9e1ceb13 | 1 | #ifndef ALI_CDB_STORAGE_H |
2 | #define ALI_CDB_STORAGE_H | |
3 | ||
fe913d8f | 4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
9e1ceb13 | 7 | ///////////////////////////////////////////////////////////////////// |
8 | // // | |
9 | // class AliCDBStorage // | |
10 | // interface to specific storage classes // | |
11 | // (AliCDBGrid, AliCDBLocal, AliCDBDump) // | |
12 | // // | |
13 | ///////////////////////////////////////////////////////////////////// | |
fe913d8f | 14 | |
9e1ceb13 | 15 | #include "AliCDBId.h" |
fe913d8f | 16 | #include "AliCDBMetaData.h" |
17 | ||
9e1ceb13 | 18 | #include <TList.h> |
fe913d8f | 19 | |
fe913d8f | 20 | class AliCDBEntry; |
21 | ||
22 | class AliCDBStorage: public TObject { | |
fe913d8f | 23 | |
9e1ceb13 | 24 | public: |
25 | AliCDBStorage(); | |
26 | virtual ~AliCDBStorage(); | |
27 | ||
28 | ||
29 | void AddSelection(const AliCDBId& selection); | |
30 | ||
31 | void AddSelection(const AliCDBPath& path, | |
32 | const AliCDBRunRange& runRange, | |
33 | Int_t version, | |
34 | Int_t subVersion = -1); | |
35 | ||
36 | void AddSelection(const AliCDBPath& path, | |
37 | Int_t firstRun, | |
38 | Int_t lastRun, | |
39 | Int_t version, | |
40 | Int_t subVersion = -1); | |
41 | ||
42 | void RemoveSelection(const AliCDBId& selection); | |
43 | ||
44 | void RemoveSelection(const AliCDBPath& path, | |
45 | const AliCDBRunRange& runRange); | |
46 | ||
47 | void RemoveSelection(const AliCDBPath& path, | |
48 | Int_t firstRun = -1, | |
49 | Int_t lastRun = -1); | |
50 | ||
eb0b1051 | 51 | void RemoveSelection(int position); |
9e1ceb13 | 52 | void RemoveAllSelections(); |
53 | ||
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); | |
59 | ||
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); | |
65 | ||
66 | void PrintSelectionList(); | |
67 | ||
68 | ||
69 | Bool_t Put(TObject* object, AliCDBId& id, AliCDBMetaData* metaData); | |
70 | Bool_t Put(AliCDBEntry* entry); | |
71 | ||
72 | ||
fdf65bb5 | 73 | virtual Bool_t IsReadOnly() const = 0; |
74 | virtual Bool_t HasSubVersion() const = 0; | |
fe913d8f | 75 | |
76 | protected: | |
9e1ceb13 | 77 | |
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; | |
fe913d8f | 82 | |
83 | private: | |
fe913d8f | 84 | |
9e1ceb13 | 85 | TList fSelections; // list of selection criteria |
fe913d8f | 86 | |
9e1ceb13 | 87 | ClassDef(AliCDBStorage, 0); |
fe913d8f | 88 | }; |
89 | ||
90 | #endif |