AliRoot Core  ee782a0 (ee782a0)
AliCDBEntry.h
Go to the documentation of this file.
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 
8 // //
9 // class AliCDBEntry //
10 // container for an object, it identity (AliCDBId) //
11 // and its metaData (AliCDBMetaData) //
12 // //
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  virtual void Print(Option_t* option="") const;
48 
49 
50  void SetId(const AliCDBId& id) {fId = id;};
51  AliCDBId& GetId() {return fId;};
52  const AliCDBId& GetId() const {return fId;};
53  void PrintId() const;
54 
55  void SetObject(TObject* object) {fObject = object;};
56  TObject* GetObject() {return fObject;};
57  const TObject* GetObject() const {return fObject;};
58 
59  void SetMetaData(AliCDBMetaData* metaData) {fMetaData = metaData;};
61  const AliCDBMetaData* GetMetaData() const {return fMetaData;};
63 
64  void SetOwner(Bool_t owner) {fIsOwner = owner;};
65  Bool_t IsOwner() const {return fIsOwner;};
66 
67  void SetVersion(Int_t version) {fId.SetVersion(version);}
68  void SetSubVersion(Int_t subVersion) {fId.SetSubVersion(subVersion);}
69 
70  const TString GetLastStorage() const {return fId.GetLastStorage();};
71  void SetLastStorage(TString lastStorage) {fId.SetLastStorage(lastStorage);};
72  virtual Int_t Compare(const TObject* obj) const;
73  virtual Bool_t IsSortable() const;
74  private:
75 
76  AliCDBEntry(const AliCDBEntry& other); // no copy ctor
77  void operator= (const AliCDBEntry& other); // no assignment op
78 
79  TObject* fObject; // object
80  AliCDBId fId; // entry ID
81  AliCDBMetaData* fMetaData; // metaData
82  Bool_t fIsOwner; // ownership flag
83 
84  ClassDef(AliCDBEntry, 1);
85 };
86 
87 #endif
void PrintId() const
void SetVersion(Int_t version)
Definition: AliCDBEntry.h:67
void operator=(const AliCDBEntry &other)
Bool_t fIsOwner
Definition: AliCDBEntry.h:82
const AliCDBId & GetId() const
Definition: AliCDBEntry.h:52
const char * path
void SetSubVersion(Int_t subVersion)
Definition: AliCDBId.h:62
const TObject * GetObject() const
Definition: AliCDBEntry.h:57
AliCDBMetaData * fMetaData
Definition: AliCDBEntry.h:81
virtual Bool_t IsSortable() const
const TString & GetLastStorage() const
Definition: AliCDBId.h:64
virtual ~AliCDBEntry()
const AliCDBMetaData * GetMetaData() const
Definition: AliCDBEntry.h:61
TObject * fObject
Definition: AliCDBEntry.h:79
void PrintMetaData() const
Definition: AliCDBEntry.h:62
TObject * GetObject()
Definition: AliCDBEntry.h:56
AliCDBEntry()
Definition: AliCDBEntry.cxx:30
void SetVersion(Int_t version)
Definition: AliCDBId.h:61
void SetId(const AliCDBId &id)
Definition: AliCDBEntry.h:50
virtual void Print(Option_t *option="") const
AliCDBId fId
Definition: AliCDBEntry.h:80
void SetMetaData(AliCDBMetaData *metaData)
Definition: AliCDBEntry.h:59
Definition: AliCDBEntry.h:18
Bool_t IsOwner() const
Definition: AliCDBEntry.h:65
void PrintMetaData() const
void SetObject(TObject *object)
Definition: AliCDBEntry.h:55
AliCDBMetaData * GetMetaData()
Definition: AliCDBEntry.h:60
void SetLastStorage(TString &lastStorage)
Definition: AliCDBId.h:65
void SetLastStorage(TString lastStorage)
Definition: AliCDBEntry.h:71
const TString GetLastStorage() const
Definition: AliCDBEntry.h:70
void SetOwner(Bool_t owner)
Definition: AliCDBEntry.h:64
AliCDBId & GetId()
Definition: AliCDBEntry.h:51
virtual Int_t Compare(const TObject *obj) const
void SetSubVersion(Int_t subVersion)
Definition: AliCDBEntry.h:68