AliInfo(Form("gGrid = %x; fGridUrl = %s; gGrid->GridUrl() = %s",gGrid,fGridUrl.Data(), gGrid->GridUrl()));
AliInfo(Form("fUser = %s; gGrid->GetUser() = %s",fUser.Data(), gGrid->GetUser()));
}
- AliDebug(2,Form("1. Grid Url = %s",fGridUrl.Data()));
- if (fGridUrl == "raw://") fGridUrl = "alien://";
- AliDebug(2,Form("2. Grid Url = %s (should be different from previous in cas eof raw)", fGridUrl.Data()));
TGrid::Connect(fGridUrl.Data(),fUser.Data());
}
}
delete res;
- if (!id.HasVersion()){
- id.SetVersion(lastVersion + 1);
+ // GRP entries with explicitly set version escape default incremental versioning
+ if(id.GetPath().Contains("GRP") && id.HasVersion() && lastVersion!=0)
+ {
+ AliDebug(5,Form("Entry %s won't be put in the destination OCDB", id.ToString().Data()));
+ return kFALSE;
}
+
+ id.SetVersion(lastVersion + 1);
id.SetSubVersion(0);
TString lastStorage = id.GetLastStorage();
AliCDBId* AliCDBGrid::GetId(const TObjArray& validFileIds, const AliCDBId& query) {
// look for the Id that matches query's requests (highest or exact version)
- if(validFileIds.GetEntriesFast() < 1) {
+ if(validFileIds.GetEntriesFast() < 1)
return NULL;
- } else if (validFileIds.GetEntriesFast() == 1) {
- return dynamic_cast<AliCDBId*> (validFileIds.At(0)->Clone());
- }
TIter iter(&validFileIds);
if(selectedId.GetFirstRun() == fRun &&
fPathFilter.Comprises(selectedId.GetAliCDBPath()) && fVersion < 0 && !fMetaDataFilter){
// look into list of valid files previously loaded with AliCDBStorage::FillValidFileIds()
- AliDebug(2, Form("List of files valid for run %d and for path %s was loaded. Looking there!",
+ AliDebug(2, Form("List of files valid for run %d was loaded. Looking there for fileids valid for path %s!",
selectedId.GetFirstRun(), selectedId.GetPath().Data()));
dataId = GetId(fValidFileIds, selectedId);
} else {
// List of files valid for reqested run was not loaded. Looking directly into CDB
- AliDebug(2, Form("List of files valid for run %d and for path %s was not loaded. Looking directly into CDB!",
+ AliDebug(2, Form("List of files valid for run %d was not loaded. Looking directly into CDB for fileids valid for path %s!",
selectedId.GetFirstRun(), selectedId.GetPath().Data()));
TString filter;
return;
}
- AliCDBId validFileId;
- for(int i=0; i<res->GetEntries(); i++){
- TString filename = res->GetKey(i, "lfn");
- if(filename == "") continue;
- AliDebug(2,Form("Found valid file: %s", filename.Data()));
- Bool_t result = FilenameToId(filename, validFileId);
- if(result) {
- fValidFileIds.AddLast(validFileId.Clone());
- }
+ TIter next(res);
+ TMap *map;
+ while ((map = (TMap*)next())) {
+ TObjString *entry;
+ if ((entry = (TObjString *) ((TMap *)map)->GetValue("lfn"))) {
+ TString& filename = entry->String();
+ if(filename.IsNull()) continue;
+ AliDebug(2,Form("Found valid file: %s", filename.Data()));
+ AliCDBId *validFileId = new AliCDBId;
+ Bool_t result = FilenameToId(filename, *validFileId);
+ if(result) {
+ fValidFileIds.AddLast(validFileId);
+ }
+ else {
+ delete validFileId;
+ }
+ }
}
delete res;
// check if the string is valid Grid URI
TRegexp gridPattern("^alien://.+$");
- TRegexp gridRawPattern("^raw://.+$");
- return (TString(gridString).Contains(gridPattern)||TString(gridString).Contains(gridRawPattern));
+ return TString(gridString).Contains(gridPattern);
}
//_____________________________________________________________________________
}
TString buffer(gridString);
- Bool_t rawFlag = kFALSE; // flag to say whether we are in the "raw://" case
TString gridUrl = "alien://";
TString user = "";
if(entry.BeginsWith("alien://")) { // maybe it's a gridUrl!
gridUrl = entry;
continue;
- } else if(entry.BeginsWith("raw://")) { // maybe it's a gridRawUrl!
- gridUrl = entry;
- rawFlag = kTRUE;
- continue;
} else {
AliError(Form("Invalid entry! %s",entry.Data()));
continue;
AliDebug(2, Form("local cache size: %d", cacheSize));
AliDebug(2, Form("local cache cleanup interval: %d", cleanupInterval));
- if(dbFolder == "" && !rawFlag){
+ if(dbFolder == ""){
AliError("Base folder must be specified!");
return NULL;
}
fDBFolder.Data(), fSE.Data(), fCacheFolder.Data(),
fOperateDisconnected, fCacheSize, fCleanupInterval);
- AliDebug(2,Form("uri = %s", uri.Data()));
SetURI(uri.Data());
}