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 ReadSelectionFromFile(const char *fileName);
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(int position);
52 void RemoveAllSelections();
54 void PrintSelectionList();
56 AliCDBEntry* Get(const AliCDBId& query);
57 AliCDBEntry* Get(const AliCDBPath& path, Int_t runNumber,
58 Int_t version = -1, Int_t subVersion = -1);
59 AliCDBEntry* Get(const AliCDBPath& path, const AliCDBRunRange& runRange,
60 Int_t version = -1, Int_t subVersion = -1);
62 TList* GetAll(const AliCDBId& query);
63 TList* GetAll(const AliCDBPath& path, Int_t runNumber,
64 Int_t version = -1, Int_t subVersion = -1);
65 TList* GetAll(const AliCDBPath& path, const AliCDBRunRange& runRange,
66 Int_t version = -1, Int_t subVersion = -1);
68 Bool_t Put(TObject* object, AliCDBId& id, AliCDBMetaData* metaData);
69 Bool_t Put(AliCDBEntry* entry);
72 virtual Bool_t IsReadOnly() const = 0;
73 virtual Bool_t HasSubVersion() const = 0;
75 virtual Bool_t Contains(const char* path) const = 0;
79 virtual ~AliCDBStorage();
80 void GetSelection(/*const*/ AliCDBId* id);
81 virtual AliCDBEntry* GetEntry(const AliCDBId& query) = 0;
82 virtual TList* GetEntries(const AliCDBId& query) = 0;
83 virtual Bool_t PutEntry(AliCDBEntry* entry) = 0;
84 virtual TList *GetIdListFromFile(const char* fileName)=0;
88 TList fSelections; // list of selection criteria
90 ClassDef(AliCDBStorage, 0);