]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliCDBEntry.cxx
Common class for DCS sensors (Haavard, Marian)
[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),
62032124 32fId(),
9e1ceb13 33fMetaData(NULL),
34fIsOwner(kFALSE){
2c8628dd 35// default constructor
36
37}
38
39//_____________________________________________________________________________
9e1ceb13 40AliCDBEntry::AliCDBEntry(TObject* object, const AliCDBId& id,
41 AliCDBMetaData* metaData, Bool_t owner):
42fObject(object),
43fId(id),
44fMetaData(metaData),
45fIsOwner(owner){
2c8628dd 46// constructor
47
48}
49
50//_____________________________________________________________________________
9e1ceb13 51AliCDBEntry::AliCDBEntry(TObject* object, const AliCDBPath& path,
52 const AliCDBRunRange& runRange,
53 AliCDBMetaData* metaData,Bool_t owner):
54fObject(object),
55fId(path, runRange, -1, -1),
56fMetaData(metaData),
57fIsOwner(owner){
58// constructor
2c8628dd 59
2c8628dd 60}
61
2c8628dd 62//_____________________________________________________________________________
9e1ceb13 63AliCDBEntry::AliCDBEntry(TObject* object, const AliCDBPath& path,
64 const AliCDBRunRange& runRange,
65 Int_t version, AliCDBMetaData* metaData, Bool_t owner):
66fObject(object),
67fId(path, runRange, version, -1),
68fMetaData(metaData),
69fIsOwner(owner){
70// constructor
2c8628dd 71
72}
73
74//_____________________________________________________________________________
9e1ceb13 75AliCDBEntry::AliCDBEntry(TObject* object, const AliCDBPath& path,
76 const AliCDBRunRange& runRange,
77 Int_t version, Int_t subVersion,
78 AliCDBMetaData* metaData, Bool_t owner):
79fObject(object),
80fId(path, runRange, version, subVersion),
81fMetaData(metaData),
82fIsOwner(owner){
83// constructor
84
2c8628dd 85}
86
87
9e1ceb13 88//_____________________________________________________________________________
89AliCDBEntry::AliCDBEntry(TObject* object, const AliCDBPath& path,
90 Int_t firstRun, Int_t lastRun,
91 AliCDBMetaData* metaData, Bool_t owner):
92fObject(object),
93fId(path, firstRun, lastRun, -1, -1),
94fMetaData(metaData),
95fIsOwner(owner){
96// constructor
97
98}
2c8628dd 99
100//_____________________________________________________________________________
9e1ceb13 101AliCDBEntry::AliCDBEntry(TObject* object, const AliCDBPath& path,
102 Int_t firstRun, Int_t lastRun,
103 Int_t version, AliCDBMetaData* metaData,
104 Bool_t owner):
105fObject(object),
106fId(path, firstRun, lastRun, version, -1),
107fMetaData(metaData),
108fIsOwner(owner){
109// constructor
2c8628dd 110
2c8628dd 111}
112
9e1ceb13 113//_____________________________________________________________________________
114AliCDBEntry::AliCDBEntry( TObject* object, const AliCDBPath& path,
115 Int_t firstRun, Int_t lastRun,
116 Int_t version, Int_t subVersion,
117 AliCDBMetaData* metaData, Bool_t owner):
118fObject(object),
119fId(path, firstRun, lastRun, version, subVersion),
120fMetaData(metaData), fIsOwner(owner){
121// constructor
122
123}
2c8628dd 124
125//_____________________________________________________________________________
9e1ceb13 126AliCDBEntry::~AliCDBEntry() {
127// destructor
128
129 if (fIsOwner) {
130 if (fObject) {
131 delete fObject;
132 }
2c8628dd 133
9e1ceb13 134 if (fMetaData) {
135 delete fMetaData;
136 }
137 }
2c8628dd 138}
139
024cf675 140//_____________________________________________________________________________
141void AliCDBEntry::PrintId() const {
142
143 AliInfo(Form("%s",fId.ToString().Data()));
144
145}