1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 ///////////////////////////////////////////////////////////////////////////////
20 // class that contains an object from the data base and knows about its //
21 // validity range (meta data) //
23 ///////////////////////////////////////////////////////////////////////////////
26 #include "AliCDBEntry.h"
31 //_____________________________________________________________________________
32 AliCDBEntry::AliCDBEntry() :
37 // default constructor
41 //_____________________________________________________________________________
42 AliCDBEntry::AliCDBEntry(const TObject* object, const AliCDBMetaData& metaData) :
44 fObject(object->Clone()),
51 //_____________________________________________________________________________
52 AliCDBEntry::~AliCDBEntry()
60 //_____________________________________________________________________________
61 AliCDBEntry::AliCDBEntry(const AliCDBEntry& entry) :
63 fMetaData(entry.fMetaData)
69 //_____________________________________________________________________________
70 AliCDBEntry& AliCDBEntry::operator = (const AliCDBEntry& entry)
72 // assignment operator
75 fObject = entry.fObject->Clone();
76 fMetaData = entry.fMetaData;
82 //_____________________________________________________________________________
83 const char* AliCDBEntry::GetName() const
87 return fMetaData.GetName();
91 //_____________________________________________________________________________
92 Int_t AliCDBEntry::Compare(const TObject* object) const
94 // check whether this is preferred to object
96 if (!object || !object->InheritsFrom(AliCDBEntry::Class())) return 1;
97 return fMetaData.Compare(&((AliCDBEntry*)object)->GetCDBMetaData());