]>
Commit | Line | Data |
---|---|---|
1 | #ifndef ALI_CDB_ENTRY_H | |
2 | #define ALI_CDB_ENTRY_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | ///////////////////////////////////////////////////////////////////// | |
8 | // // | |
9 | // class AliCDBEntry // | |
10 | // container for an object, it identity (AliCDBId) // | |
11 | // and its metaData (AliCDBMetaData) // | |
12 | // // | |
13 | ///////////////////////////////////////////////////////////////////// | |
14 | ||
15 | #include "AliCDBId.h" | |
16 | #include "AliCDBMetaData.h" | |
17 | ||
18 | class AliCDBEntry: public TObject { | |
19 | ||
20 | public: | |
21 | AliCDBEntry(); | |
22 | ||
23 | AliCDBEntry(TObject* object, const AliCDBId& id, | |
24 | AliCDBMetaData* metaData, Bool_t owner = kFALSE); | |
25 | ||
26 | AliCDBEntry(TObject* object, const AliCDBPath& path, const AliCDBRunRange& runRange, | |
27 | AliCDBMetaData* metaData, Bool_t owner = kFALSE); | |
28 | ||
29 | AliCDBEntry(TObject* object, const AliCDBPath& path, const AliCDBRunRange& runRange, | |
30 | Int_t version, AliCDBMetaData* metaData, Bool_t owner = kFALSE); | |
31 | ||
32 | AliCDBEntry(TObject* object, const AliCDBPath& path, const AliCDBRunRange& runRange, | |
33 | Int_t version, Int_t subVersion, | |
34 | AliCDBMetaData* metaData, Bool_t owner = kFALSE); | |
35 | ||
36 | AliCDBEntry(TObject* object, const AliCDBPath& path, Int_t firstRun, Int_t lastRun, | |
37 | AliCDBMetaData* metaData, Bool_t owner = kFALSE); | |
38 | ||
39 | AliCDBEntry(TObject* object, const AliCDBPath& path, Int_t firstRun, Int_t lastRun, | |
40 | Int_t version, AliCDBMetaData* metaData, Bool_t owner = kFALSE); | |
41 | ||
42 | AliCDBEntry(TObject* object, const AliCDBPath& path, Int_t firstRun, Int_t lastRun, | |
43 | Int_t version, Int_t subVersion, | |
44 | AliCDBMetaData* metaData, Bool_t owner = kFALSE); | |
45 | ||
46 | virtual ~AliCDBEntry(); | |
47 | ||
48 | ||
49 | void SetId(const AliCDBId& id) {fId = id;}; | |
50 | AliCDBId& GetId() {return fId;}; | |
51 | const AliCDBId& GetId() const {return fId;}; | |
52 | void PrintId() const; | |
53 | ||
54 | void SetObject(TObject* object) {fObject = object;}; | |
55 | TObject* GetObject() {return fObject;}; | |
56 | const TObject* GetObject() const {return fObject;}; | |
57 | ||
58 | void SetMetaData(AliCDBMetaData* metaData) {fMetaData = metaData;}; | |
59 | AliCDBMetaData* GetMetaData() {return fMetaData;}; | |
60 | const AliCDBMetaData* GetMetaData() const {return fMetaData;}; | |
61 | void PrintMetaData() const {fMetaData->PrintMetaData();} | |
62 | ||
63 | void SetOwner(Bool_t owner) {fIsOwner = owner;}; | |
64 | Bool_t IsOwner() const {return fIsOwner;}; | |
65 | ||
66 | void SetVersion(Int_t version) {fId.SetVersion(version);} | |
67 | void SetSubVersion(Int_t subVersion) {fId.SetSubVersion(subVersion);} | |
68 | ||
69 | const TString GetLastStorage() const {return fId.GetLastStorage();}; | |
70 | void SetLastStorage(TString lastStorage) {fId.SetLastStorage(lastStorage);}; | |
71 | ||
72 | private: | |
73 | ||
74 | AliCDBEntry(const AliCDBEntry& other); // no copy ctor | |
75 | void operator= (const AliCDBEntry& other); // no assignment op | |
76 | ||
77 | TObject* fObject; // object | |
78 | AliCDBId fId; // entry ID | |
79 | AliCDBMetaData* fMetaData; // metaData | |
80 | Bool_t fIsOwner; // ownership flag | |
81 | ||
82 | ClassDef(AliCDBEntry, 1); | |
83 | }; | |
84 | ||
85 | #endif |