]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliCDBStorage.h
Merging changes from v4-04-Release
[u/mrichter/AliRoot.git] / STEER / AliCDBStorage.h
CommitLineData
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 20class AliCDBEntry;
21
22class AliCDBStorage: public TObject {
fe913d8f 23
9e1ceb13 24public:
25 AliCDBStorage();
9e1ceb13 26
b05400be 27 void ReadSelectionFromFile(const char *fileName);
28
9e1ceb13 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
02c4845e 54 void PrintSelectionList();
55
9e1ceb13 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);
61
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);
67
9e1ceb13 68 Bool_t Put(TObject* object, AliCDBId& id, AliCDBMetaData* metaData);
69 Bool_t Put(AliCDBEntry* entry);
70
71
fdf65bb5 72 virtual Bool_t IsReadOnly() const = 0;
73 virtual Bool_t HasSubVersion() const = 0;
fe913d8f 74
b05400be 75 virtual Bool_t Contains(const char* path) const = 0;
76
fe913d8f 77protected:
9e1ceb13 78
b05400be 79 virtual ~AliCDBStorage();
4b5e0dce 80 void GetSelection(/*const*/ AliCDBId* id);
9e1ceb13 81 virtual AliCDBEntry* GetEntry(const AliCDBId& query) = 0;
82 virtual TList* GetEntries(const AliCDBId& query) = 0;
83 virtual Bool_t PutEntry(AliCDBEntry* entry) = 0;
b05400be 84 virtual TList *GetIdListFromFile(const char* fileName)=0;
fe913d8f 85
86private:
fe913d8f 87
9e1ceb13 88 TList fSelections; // list of selection criteria
fe913d8f 89
9e1ceb13 90 ClassDef(AliCDBStorage, 0);
fe913d8f 91};
92
93#endif