void AliCDBManager::SetDefaultStorage(const char* dbString) {
// sets default storage from URI string
- AliInfo(Form("Setting Default storage to: %s",dbString));
-
// checking whether we are in the raw case
TString dbStringTemp(dbString);
if (dbStringTemp == "raw://")
{
fRaw = kTRUE;
AliInfo("Setting the run-number will set the corresponding OCDB for raw data reconstruction.");
+ AliInfo("Connecting to the grid...");
+ if(!gGrid) {
+ TGrid::Connect("alien://","");
+ if(!gGrid) {
+ AliError("Connection to alien failed!");
+ return;
+ }
+ }
return;
}
AliWarning("Clearing cache!");
ClearCache();
}
+
+ fRun = fStartRunLHCPeriod = fEndRunLHCPeriod = -1;
+ fRaw = kFALSE;
fDefaultStorage = 0x0;
}
// calibType must be a valid CDB path! (3 level folder structure)
- if(!fDefaultStorage) {
+ if(!fDefaultStorage && !fRaw) {
AliError("Please activate a default storage first!");
return;
}
return NULL;
}
- if(fLock && query.GetFirstRun() != fRun)
+ if(fLock && !(fRun >= query.GetFirstRun() && fRun <= query.GetLastRun()))
AliFatal("Lock is ON: cannot use different run number than the internal one!");
- if(fCache && query.GetFirstRun() != fRun)
+ if(fCache && !(fRun >= query.GetFirstRun() && fRun <= query.GetLastRun()))
AliWarning("Run number explicitly set in query: CDB cache temporarily disabled!");
AliCDBEntry *entry=0;
void AliCDBManager::UnloadFromCache(const char* path){
// unload cached object
+ if(!fActiveStorages.GetEntries()) {
+ AliDebug(2, Form("No active storages. Object \"%s\" is not unloaded from cache", path));
+ return;
+ }
+
AliCDBPath queryPath(path);
if(!queryPath.IsValid()) return;