Added -x flag to the executable command to allow root exiting with the correct error...
authoragheata <agheata@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 26 Oct 2012 08:38:16 +0000 (08:38 +0000)
committeragheata <agheata@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 26 Oct 2012 08:38:16 +0000 (08:38 +0000)
ANALYSIS/AliAnalysisAlien.cxx

index 5e13c38..e5a3323 100644 (file)
@@ -2500,7 +2500,7 @@ void AliAnalysisAlien::SetDefaults()
    fMaxMergeFiles              = 100;
    fRunNumbers                 = "";
    fExecutable                 = "analysis.sh";
-   fExecutableCommand          = "root -b -q";
+   fExecutableCommand          = "root -b -q -x";
    fArguments                  = "";
    fExecutableArgs             = "";
    fAnalysisMacro              = "myAnalysis.C";
@@ -4477,6 +4477,10 @@ Bool_t AliAnalysisAlien::SetupPar(const char *package)
 void AliAnalysisAlien::WriteExecutable()
 {
 // Generate the alien executable script.
+   // Patch executable with -x to catch error code
+   if (fExecutableCommand.Contains("root") && 
+       fExecutableCommand.Contains("-q") && 
+       !fExecutableCommand.Contains("-x")) fExecutableCommand += " -x";
    if (!TestBit(AliAnalysisGrid::kSubmit)) {  
       ofstream out;
       out.open(fExecutable.Data(), ios::out);