X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=STEER%2FAliCDBPath.cxx;h=390fd825ae970944126d80ccec6bd39fb15c8996;hb=d298a83f699b26aece3c8538ac02c50b48fe65ca;hp=ce3956eba3f9cd3d62aae60550a17c41a41e4685;hpb=fe12e09c14250ca4a380175a67ffbd6bb844662e;p=u%2Fmrichter%2FAliRoot.git diff --git a/STEER/AliCDBPath.cxx b/STEER/AliCDBPath.cxx index ce3956eba3f..390fd825ae9 100644 --- a/STEER/AliCDBPath.cxx +++ b/STEER/AliCDBPath.cxx @@ -150,9 +150,9 @@ void AliCDBPath::InitPath() { } else if (paramCount == 2) { fLevel0 = ((TObjString*) anArray->At(0))->GetString(); - TString aString = ((TObjString*) anArray->At(1))->GetString(); + TString bString = ((TObjString*) anArray->At(1))->GetString(); - if (IsWord(fLevel0) && aString == "*") { + if (IsWord(fLevel0) && bString == "*") { fLevel1 = "*"; fLevel2 = "*"; @@ -183,10 +183,12 @@ void AliCDBPath::InitPath() { if (!fIsValid) { AliInfo(Form("Invalid AliCDBPath <%s>!", fPath.Data())); + } else { + fPath = Form("%s/%s/%s", fLevel0.Data(), fLevel1.Data(), fLevel2.Data()); } delete anArray; - + Init(); } @@ -249,7 +251,27 @@ Bool_t AliCDBPath::Level2Comprises(const TString& str) const { Bool_t AliCDBPath::Comprises(const AliCDBPath& other) const { // check if path is wildcard and comprises other - return Level0Comprises(other.fLevel0) + return Level0Comprises(other.fLevel0) && Level1Comprises(other.fLevel1) && Level2Comprises(other.fLevel2); } + +//_____________________________________________________________________________ +const char* AliCDBPath::GetLevel(Int_t i) const { +// return level i of the path + + switch (i) { + case 0: + return fLevel0.Data(); + break; + case 1: + return fLevel1.Data(); + break; + case 2: + return fLevel2.Data(); + break; + default: + return 0; + } + +}