]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliCDBEntry.cxx
Added preprocessor conditionals to support ROOT > 5.11.2.
[u/mrichter/AliRoot.git] / STEER / AliCDBEntry.cxx
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
16 /////////////////////////////////////////////////////////////////////
17 //                                                                 //
18 //  class AliCDBEntry                                              //
19 //  container for an object, it identity (AliCDBId)                //
20 //  and its metaData (AliCDBMetaData)                              //
21 //                                                                 //
22 /////////////////////////////////////////////////////////////////////
23
24 #include "AliCDBEntry.h"
25 #include "AliLog.h"
26
27 ClassImp(AliCDBEntry)
28
29 //_____________________________________________________________________________
30 AliCDBEntry::AliCDBEntry():
31 fObject(NULL),
32 fMetaData(NULL), 
33 fIsOwner(kFALSE){
34 // default constructor
35
36 }
37
38 //_____________________________________________________________________________
39 AliCDBEntry::AliCDBEntry(TObject* object, const AliCDBId& id, 
40                         AliCDBMetaData* metaData, Bool_t owner):
41 fObject(object), 
42 fId(id), 
43 fMetaData(metaData), 
44 fIsOwner(owner){
45 // constructor
46
47 }
48
49 //_____________________________________________________________________________
50 AliCDBEntry::AliCDBEntry(TObject* object, const AliCDBPath& path, 
51                         const AliCDBRunRange& runRange,
52                         AliCDBMetaData* metaData,Bool_t owner):
53 fObject(object), 
54 fId(path, runRange, -1, -1), 
55 fMetaData(metaData),
56 fIsOwner(owner){
57 // constructor
58
59 }
60
61 //_____________________________________________________________________________
62 AliCDBEntry::AliCDBEntry(TObject* object, const AliCDBPath& path, 
63                         const AliCDBRunRange& runRange,
64                         Int_t version, AliCDBMetaData* metaData, Bool_t owner):
65 fObject(object), 
66 fId(path, runRange, version, -1), 
67 fMetaData(metaData),
68 fIsOwner(owner){
69 // constructor
70
71 }
72
73 //_____________________________________________________________________________
74 AliCDBEntry::AliCDBEntry(TObject* object, const AliCDBPath& path, 
75                         const AliCDBRunRange& runRange,
76                         Int_t version, Int_t subVersion, 
77                         AliCDBMetaData* metaData, Bool_t owner):
78 fObject(object),
79 fId(path, runRange, version, subVersion), 
80 fMetaData(metaData), 
81 fIsOwner(owner){
82 // constructor
83
84 }
85
86
87 //_____________________________________________________________________________
88 AliCDBEntry::AliCDBEntry(TObject* object, const AliCDBPath& path, 
89                         Int_t firstRun, Int_t lastRun, 
90                         AliCDBMetaData* metaData, Bool_t owner):
91 fObject(object),
92 fId(path, firstRun, lastRun, -1, -1), 
93 fMetaData(metaData), 
94 fIsOwner(owner){
95 // constructor
96
97 }
98
99 //_____________________________________________________________________________
100 AliCDBEntry::AliCDBEntry(TObject* object, const AliCDBPath& path, 
101                         Int_t firstRun, Int_t lastRun,
102                         Int_t version, AliCDBMetaData* metaData,
103                         Bool_t owner):
104 fObject(object),
105 fId(path, firstRun, lastRun, version, -1),
106 fMetaData(metaData), 
107 fIsOwner(owner){
108 // constructor
109
110 }
111
112 //_____________________________________________________________________________
113 AliCDBEntry::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):
117 fObject(object),
118 fId(path, firstRun, lastRun, version, subVersion),
119 fMetaData(metaData), fIsOwner(owner){
120 // constructor
121
122 }
123
124 //_____________________________________________________________________________
125 AliCDBEntry::~AliCDBEntry() {
126 // destructor
127
128         if (fIsOwner) {
129                 if (fObject) {
130                         delete fObject;
131                 }
132
133                 if (fMetaData) {
134                         delete fMetaData;
135                 }
136         }
137 }
138
139 //_____________________________________________________________________________
140 void AliCDBEntry::PrintId() const {
141  
142         AliInfo(Form("%s",fId.ToString().Data()));
143
144 }