]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Correction in StoreOCDB; change of text in mail to detector expert
authoracolla <acolla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 17 Apr 2007 12:43:57 +0000 (12:43 +0000)
committeracolla <acolla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 17 Apr 2007 12:43:57 +0000 (12:43 +0000)
SHUTTLE/AliShuttle.cxx

index 5a1cc05391960b5684b755ae4c0b0e74ea23ec9e..c204ff2040a45c0c68d8299c68f7f59faf70ec72 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.38  2007/04/12 08:26:18  jgrosseo
+updated comment
+
 Revision 1.37  2007/04/10 16:53:14  jgrosseo
 redirecting sub detector stdout, stderr to sub detector log file
 
@@ -413,15 +416,15 @@ Bool_t AliShuttle::StoreOCDB()
                return kFALSE;
        }
        
-       AliInfo("Storing OCDB data ...");
-       Bool_t resultCDB = StoreOCDB(fgkMainCDB);
-
        AliInfo("Storing reference data ...");
        Bool_t resultRef = StoreOCDB(fgkMainRefStorage);
        
        AliInfo("Storing reference files ...");
        Bool_t resultRefFiles = StoreRefFilesToGrid();
        
+       AliInfo("Storing OCDB data ...");
+       Bool_t resultCDB = StoreOCDB(fgkMainCDB);
+
        return resultCDB && resultRef && resultRefFiles;
 }
 
@@ -435,6 +438,9 @@ Bool_t AliShuttle::StoreOCDB(const TString& gridURI)
        TObjArray* gridIds=0;
 
        Bool_t result = kTRUE;
+       // to check whether all files have been transferred, or some files were left behind
+       // because the run is not first unprocessed
+       Bool_t willDoAgain = kFALSE;  
 
        const char* type = 0;
        TString localURI;
@@ -489,6 +495,7 @@ Bool_t AliShuttle::StoreOCDB(const TString& gridURI)
                        Log("SHUTTLE", Form("StoreOCDB - %s: object %s has validity infinite but "
                                                "there are previous unprocessed runs!",
                                                fCurrentDetector.Data(), aLocId.GetPath().Data()));
+                       willDoAgain=kTRUE;
                        continue;
                }
 
@@ -534,6 +541,12 @@ Bool_t AliShuttle::StoreOCDB(const TString& gridURI)
                }
        }
        localEntries->Clear();
+       
+       if(result && willDoAgain) {
+               Log(fCurrentDetector.Data(), 
+                       "Some files have been left on local storage, will try again later!");
+               result = kFALSE;
+       }
 
        return result;
 }
@@ -2479,7 +2492,7 @@ Bool_t AliShuttle::SendMail()
 
        TString body = Form("Dear %s expert(s), \n\n", fCurrentDetector.Data());
        body += Form("SHUTTLE just detected that your preprocessor "
-                       "exited with ERROR state in run %d!!\n\n", GetCurrentRun());
+                       "FAILED after %d retries in run %d!!\n\n", fConfig->GetMaxRetries(), GetCurrentRun());
        body += Form("Please check %s status on the web page asap!\n\n", fCurrentDetector.Data());
        body += Form("The last 10 lines of %s log file are following:\n\n");