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 "AliRunData.h"
32 //_____________________________________________________________________________
33 AliRunData::AliRunData() :
38 // default constructor
42 //_____________________________________________________________________________
43 AliRunData::AliRunData(TObject* object, const AliMetaData& metaData) :
52 //_____________________________________________________________________________
53 AliRunData::~AliRunData()
61 //_____________________________________________________________________________
62 AliRunData::AliRunData(const AliRunData& entry) :
64 fMetaData(entry.fMetaData)
70 //_____________________________________________________________________________
71 AliRunData& AliRunData::operator = (const AliRunData& entry)
73 // assignment operator
76 fObject = entry.fObject->Clone();
77 fMetaData = entry.fMetaData;
83 //_____________________________________________________________________________
84 const char* AliRunData::GetName() const
88 return fMetaData.GetName();
92 //_____________________________________________________________________________
93 Int_t AliRunData::Compare(const TObject* object) const
95 // check whether this is prefered to object
97 if (!object || !object->InheritsFrom(AliRunData::Class())) return 1;
98 return fMetaData.Compare(&((AliRunData*)object)->GetMetaData());