query.GetFirstRun(), anIdPtr->GetVersion()));
return NULL;
}
- result = anIdPtr;
+ result = new AliCDBId(*anIdPtr);
} else { // look for specified version
if(query.GetVersion() != anIdPtr->GetVersion()) continue;
if(result && result->GetVersion() == anIdPtr->GetVersion()){
query.GetFirstRun(), anIdPtr->GetVersion()));
return NULL;
}
- result = anIdPtr;
+ result = new AliCDBId(*anIdPtr);
}
}
- if (!result) return NULL;
-
- return dynamic_cast<AliCDBId*> (result->Clone());
+ return result;
}
//_____________________________________________________________________________
AliDebug(2,Form("** fDBFolder = %s, pattern = %s, filter = %s",folderCopy.Data(), pattern.Data(), filter.Data()));
TGridResult *res = gGrid->Query(folderCopy, pattern, filter, optionQuery.Data());
if (res) {
- AliCDBId validFileId;
for(int i=0; i<res->GetEntries(); i++){
+ AliCDBId *validFileId = new AliCDBId();
TString filename = res->GetKey(i, "lfn");
if(filename == "") continue;
- if(FilenameToId(filename, validFileId))
- validFileIds.AddLast(validFileId.Clone());
+ if(FilenameToId(filename, *validFileId))
+ validFileIds.AddLast(validFileId);
}
delete res;
}else{
return 0;
}
- AliCDBId validFileId;
for(int i=0; i<res->GetEntries(); i++){
+ AliCDBId *validFileId = new AliCDBId();
TString filename = res->GetKey(i, "lfn");
if(filename == "") continue;
- if(FilenameToId(filename, validFileId))
- validFileIds.AddLast(validFileId.Clone());
+ if(FilenameToId(filename, *validFileId))
+ validFileIds.AddLast(validFileId);
}
delete res;
}
TString& filename = entry->String();
if(filename.IsNull()) continue;
AliDebug(2,Form("Found valid file: %s", filename.Data()));
- AliCDBId *validFileId = new AliCDBId;
+ AliCDBId *validFileId = new AliCDBId();
Bool_t result = FilenameToId(filename, *validFileId);
if(result) {
fValidFileIds.AddLast(validFileId);
while((anIdPtr = dynamic_cast<AliCDBId*> (iter.Next()))){
if(anIdPtr->GetPath() == query.GetPath()){
- result = anIdPtr;
+ result = new AliCDBId(*anIdPtr);
break;
}
}
- if (result)
- return dynamic_cast<AliCDBId*> (result->Clone());
+ return result;
}
// otherwise browse in the local filesystem CDB storage
}
if(highestV >= 0){
AliCDBPath validPath(level0, level1, level2);
- AliCDBId validId(validPath, aRunRange, highestV, highestSubV);
- fValidFileIds.AddLast(validId.Clone());
+ AliCDBId *validId = new AliCDBId(validPath, aRunRange, highestV, highestSubV);
+ fValidFileIds.AddLast(validId);
}
gSystem->FreeDirectory(dirPtr);
AliCDBRunRange runrg(fRun,fRun);
if (!aRunRange.Comprises(runrg)) continue; // should never happen (would mean awk script wrong output)
// aRunRange contains requested run!
- AliCDBId validId(validPath,aRunRange,aVersion,aSubVersion);
- fValidFileIds.AddLast(validId.Clone());
+ AliCDBId *validId = new AliCDBId(validPath,aRunRange,aVersion,aSubVersion);
+ fValidFileIds.AddLast(validId);
}
file->close();