New version of CDB framework. Proper initialization of CDB inside AliSimulation and...
[u/mrichter/AliRoot.git] / STEER / AliCDBEntry.cxx
CommitLineData
2c8628dd 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
9e1ceb13 16/////////////////////////////////////////////////////////////////////
17// //
18// class AliCDBEntry //
19// container for an object, it identity (AliCDBId) //
20// and its metaData (AliCDBMetaData) //
21// //
22/////////////////////////////////////////////////////////////////////
2c8628dd 23
fe913d8f 24#include "AliCDBEntry.h"
024cf675 25#include "AliLog.h"
2c8628dd 26
fe913d8f 27ClassImp(AliCDBEntry)
2c8628dd 28
2c8628dd 29//_____________________________________________________________________________
9e1ceb13 30AliCDBEntry::AliCDBEntry():
31fObject(NULL),
32fMetaData(NULL),
33fIsOwner(kFALSE){
2c8628dd 34// default constructor
35
36}
37
38//_____________________________________________________________________________
9e1ceb13 39AliCDBEntry::AliCDBEntry(TObject* object, const AliCDBId& id,
40 AliCDBMetaData* metaData, Bool_t owner):
41fObject(object),
42fId(id),
43fMetaData(metaData),
44fIsOwner(owner){
2c8628dd 45// constructor
46
47}
48
49//_____________________________________________________________________________
9e1ceb13 50AliCDBEntry::AliCDBEntry(TObject* object, const AliCDBPath& path,
51 const AliCDBRunRange& runRange,
52 AliCDBMetaData* metaData,Bool_t owner):
53fObject(object),
54fId(path, runRange, -1, -1),
55fMetaData(metaData),
56fIsOwner(owner){
57// constructor
2c8628dd 58
2c8628dd 59}
60
2c8628dd 61//_____________________________________________________________________________
9e1ceb13 62AliCDBEntry::AliCDBEntry(TObject* object, const AliCDBPath& path,
63 const AliCDBRunRange& runRange,
64 Int_t version, AliCDBMetaData* metaData, Bool_t owner):
65fObject(object),
66fId(path, runRange, version, -1),
67fMetaData(metaData),
68fIsOwner(owner){
69// constructor
2c8628dd 70
71}
72
73//_____________________________________________________________________________
9e1ceb13 74AliCDBEntry::AliCDBEntry(TObject* object, const AliCDBPath& path,
75 const AliCDBRunRange& runRange,
76 Int_t version, Int_t subVersion,
77 AliCDBMetaData* metaData, Bool_t owner):
78fObject(object),
79fId(path, runRange, version, subVersion),
80fMetaData(metaData),
81fIsOwner(owner){
82// constructor
83
2c8628dd 84}
85
86
9e1ceb13 87//_____________________________________________________________________________
88AliCDBEntry::AliCDBEntry(TObject* object, const AliCDBPath& path,
89 Int_t firstRun, Int_t lastRun,
90 AliCDBMetaData* metaData, Bool_t owner):
91fObject(object),
92fId(path, firstRun, lastRun, -1, -1),
93fMetaData(metaData),
94fIsOwner(owner){
95// constructor
96
97}
2c8628dd 98
99//_____________________________________________________________________________
9e1ceb13 100AliCDBEntry::AliCDBEntry(TObject* object, const AliCDBPath& path,
101 Int_t firstRun, Int_t lastRun,
102 Int_t version, AliCDBMetaData* metaData,
103 Bool_t owner):
104fObject(object),
105fId(path, firstRun, lastRun, version, -1),
106fMetaData(metaData),
107fIsOwner(owner){
108// constructor
2c8628dd 109
2c8628dd 110}
111
9e1ceb13 112//_____________________________________________________________________________
113AliCDBEntry::AliCDBEntry( TObject* object, const AliCDBPath& path,
114 Int_t firstRun, Int_t lastRun,
115 Int_t version, Int_t subVersion,
116 AliCDBMetaData* metaData, Bool_t owner):
117fObject(object),
118fId(path, firstRun, lastRun, version, subVersion),
119fMetaData(metaData), fIsOwner(owner){
120// constructor
121
122}
2c8628dd 123
124//_____________________________________________________________________________
9e1ceb13 125AliCDBEntry::~AliCDBEntry() {
126// destructor
127
128 if (fIsOwner) {
129 if (fObject) {
130 delete fObject;
131 }
2c8628dd 132
9e1ceb13 133 if (fMetaData) {
134 delete fMetaData;
135 }
136 }
2c8628dd 137}
138
024cf675 139//_____________________________________________________________________________
140void AliCDBEntry::PrintId() const {
141
142 AliInfo(Form("%s",fId.ToString().Data()));
143
144}