if (UpdateTable() == kFALSE) returnCode = 1;
}
+ for (UInt_t iSys=0; iSys<3; iSys++)
+ {
+ if (fFXSCalled[iSys]) fFXSlist[iSys].Clear();
+ }
+
AliInfo(Form("Client process of %d - %s is exiting now with %d.",
GetCurrentRun(), aDetector->GetName(), returnCode));
AliError("We should never get here!!!");
}
-
- for (UInt_t iSys=0; iSys<3; iSys++)
- {
- if (fFXSCalled[iSys]) fFXSlist[iSys].Clear();
- }
}
AliInfo(Form("\n\n \t\t\t^*^*^*^*^*^*^*^*^*^*^*^* run %d: FINISH ^*^*^*^*^*^*^*^*^*^*^*^* \n",
// file retrieval from FXS
- Bool_t result = RetrieveFile(system, filePath.Data(), localFileName.Data());
- if(!result)
- {
- Log(detector, Form("GetFileName - Copy of file %s from %s FXS failed",
+ UInt_t nRetries = 0;
+ UInt_t maxRetries = 3;
+ Bool_t result = kFALSE;
+
+ // copy!! if successful TSystem::Exec returns 0
+ while(nRetries++ < maxRetries) {
+ AliDebug(2, Form("Trying to copy file. Retry # %d", nRetries));
+ result = RetrieveFile(system, filePath.Data(), localFileName.Data());
+ if(!result)
+ {
+ Log(detector, Form("GetFileName - Copy of file %s from %s FXS failed",
filePath.Data(), GetSystemName(system)));
- return 0;
- } else {
- AliInfo(Form("File %s copied from %s FXS into %s/%s",
- filePath.Data(), GetSystemName(system), GetShuttleTempDir(), localFileName.Data()));
- }
+ continue;
+ } else {
+ AliInfo(Form("File %s copied from %s FXS into %s/%s",
+ filePath.Data(), GetSystemName(system),
+ GetShuttleTempDir(), localFileName.Data()));
+ }
- if (system == kHLT)
- {
- // compare md5sum of local file with the one stored in the FXS DB
- Int_t md5Comp = gSystem->Exec(Form("md5sum %s/%s |grep %s 2>&1 > /dev/null",
+ if (system == kHLT)
+ {
+ // compare md5sum of local file with the one stored in the FXS DB
+ Int_t md5Comp = gSystem->Exec(Form("md5sum %s/%s |grep %s 2>&1 > /dev/null",
GetShuttleTempDir(), localFileName.Data(), fileMd5Sum.Data()));
- if (md5Comp != 0)
- {
- Log(detector, Form("GetFileName - md5sum of file %s does not match with local copy!",
- filePath.Data()));
- return 0;
+ if (md5Comp != 0)
+ {
+ Log(detector, Form("GetFileName - md5sum of file %s does not match with local copy!",
+ filePath.Data()));
+ result = kFALSE;
+ continue;
+ }
}
+ if (result) break;
}
+ if(!result) return 0;
+
fFXSCalled[system]=kTRUE;
TObjString *fileParams = new TObjString(Form("%s#!?!#%s", id, sourceName.Data()));
fFXSlist[system].Add(fileParams);
AliDebug(2, Form("%s",command.Data()));
- UInt_t nRetries = 0;
- UInt_t maxRetries = 3;
+ Bool_t result = (gSystem->Exec(command.Data()) == 0);
- // copy!! if successful TSystem::Exec returns 0
- while(nRetries++ < maxRetries) {
- AliDebug(2, Form("Trying to copy file. Retry # %d", nRetries));
- if(gSystem->Exec(command.Data()) == 0) return kTRUE;
- }
-
- return kFALSE;
+ return result;
}
//______________________________________________________________________________________________
if (!Process(anEntry)){
hasError = kTRUE;
}
+
+ // clean SHUTTLE temp directory
+ TString command = Form("rm -f %s/*.shuttle", GetShuttleTempDir());
+ gSystem->Exec(command.Data());
}
return hasError == kFALSE;