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 **************************************************************************/
16 /////////////////////////////////////////////////////////////////////
19 // Identity of an object stored into a database: //
20 // path, run validity range, version, subVersion //
22 /////////////////////////////////////////////////////////////////////
28 //_____________________________________________________________________________
40 //_____________________________________________________________________________
41 AliCDBId::AliCDBId(const AliCDBId& other):
44 fRunRange(other.fRunRange),
45 fVersion(other.fVersion),
46 fSubVersion(other.fSubVersion),
47 fLastStorage(other.fLastStorage)
53 //_____________________________________________________________________________
54 AliCDBId::AliCDBId(const AliCDBPath& path, Int_t firstRun, Int_t lastRun,
55 Int_t version, Int_t subVersion):
57 fRunRange(firstRun, lastRun),
59 fSubVersion(subVersion),
66 //_____________________________________________________________________________
67 AliCDBId::AliCDBId(const AliCDBPath& path, const AliCDBRunRange& runRange,
68 Int_t version, Int_t subVersion):
72 fSubVersion(subVersion),
79 //_____________________________________________________________________________
80 AliCDBId::~AliCDBId() {
85 //_____________________________________________________________________________
86 Bool_t AliCDBId::IsValid() const {
89 if (!(fPath.IsValid() && fRunRange.IsValid())) {
93 // FALSE if doesn't have version but has subVersion
94 return !(!HasVersion() && HasSubVersion());
97 //_____________________________________________________________________________
98 TString AliCDBId::ToString() const {
99 // returns a string of Id data
104 result += "\"; run range [";
105 result += GetFirstRun();
107 result += GetLastRun();
108 result += "]; version v";
109 result += GetVersion();
111 result += GetSubVersion();