New version of CDB framework. Proper initialization of CDB inside AliSimulation and...
[u/mrichter/AliRoot.git] / STEER / AliCDBEntry.h
CommitLineData
9e1ceb13 1#ifndef ALI_CDB_ENTRY_H
2#define ALI_CDB_ENTRY_H
3
2c8628dd 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 AliCDBEntry //
10// container for an object, it identity (AliCDBId) //
11// and its metaData (AliCDBMetaData) //
12// //
13/////////////////////////////////////////////////////////////////////
2c8628dd 14
9e1ceb13 15#include "AliCDBId.h"
fe913d8f 16#include "AliCDBMetaData.h"
2c8628dd 17
fe913d8f 18class AliCDBEntry: public TObject {
9e1ceb13 19
2c8628dd 20public:
9e1ceb13 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);
2c8628dd 45
9e1ceb13 46 virtual ~AliCDBEntry();
2c8628dd 47
f05209ee 48
9e1ceb13 49 void SetId(const AliCDBId& id) {fId = id;};
50 AliCDBId& GetId() {return fId;};
51 const AliCDBId& GetId() const {return fId;};
024cf675 52 void PrintId() const;
9e1ceb13 53
54 void SetObject(TObject* object) {fObject = object;};
55 TObject* GetObject() {return fObject;};
56 const TObject* GetObject() const {return fObject;};
2c8628dd 57
9e1ceb13 58 void SetMetaData(AliCDBMetaData* metaData) {fMetaData = metaData;};
59 AliCDBMetaData* GetMetaData() {return fMetaData;};
60 const AliCDBMetaData* GetMetaData() const {return fMetaData;};
024cf675 61 void PrintMetaData() const {fMetaData->PrintMetaData();}
2c8628dd 62
9e1ceb13 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);};
2c8628dd 71
72private:
9e1ceb13 73
74 AliCDBEntry(const AliCDBEntry& other); // no copy ctor
75 void operator= (const AliCDBEntry& other); // no assignment op
2c8628dd 76
9e1ceb13 77 TObject* fObject; // object
78 AliCDBId fId; // entry ID
79 AliCDBMetaData* fMetaData; // metaData
80 Bool_t fIsOwner; // ownership flag
81
82 ClassDef(AliCDBEntry, 1);
2c8628dd 83};
84
85#endif