]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Added method SetExecutableCommand(const char *command) to the plugin. The default
authoragheata <agheata@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 16 Oct 2009 07:38:24 +0000 (07:38 +0000)
committeragheata <agheata@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 16 Oct 2009 07:38:24 +0000 (07:38 +0000)
value is "root -b -q". One can force aliroot to be run instead of root on the worker
nodes via:
   plugin->SetExecutableCommand("aliroot -b -q")

ANALYSIS/AliAnalysisAlien.cxx
ANALYSIS/AliAnalysisAlien.h

index 5f8bef9fd08b7526cf93f984cb3fa06b37b37bf3..04a9be268564ff267f4e5e6b22597c39df6b29a3 100644 (file)
@@ -56,6 +56,7 @@ AliAnalysisAlien::AliAnalysisAlien()
                   fProductionMode(0),
                   fRunNumbers(),
                   fExecutable(),
+                  fExecutableCommand(),
                   fArguments(),
                   fAnalysisMacro(),
                   fAnalysisSource(),
@@ -102,6 +103,7 @@ AliAnalysisAlien::AliAnalysisAlien(const char *name)
                   fProductionMode(0),
                   fRunNumbers(),
                   fExecutable(),
+                  fExecutableCommand(),
                   fArguments(),
                   fAnalysisMacro(),
                   fAnalysisSource(),
@@ -148,6 +150,7 @@ AliAnalysisAlien::AliAnalysisAlien(const AliAnalysisAlien& other)
                   fProductionMode(other.fProductionMode),
                   fRunNumbers(other.fRunNumbers),
                   fExecutable(other.fExecutable),
+                  fExecutableCommand(other.fExecutableCommand),
                   fArguments(other.fArguments),
                   fAnalysisMacro(other.fAnalysisMacro),
                   fAnalysisSource(other.fAnalysisSource),
@@ -222,6 +225,7 @@ AliAnalysisAlien &AliAnalysisAlien::operator=(const AliAnalysisAlien& other)
       fProductionMode          = other.fProductionMode;
       fRunNumbers              = other.fRunNumbers;
       fExecutable              = other.fExecutable;
+      fExecutableCommand       = other.fExecutableCommand;
       fArguments               = other.fArguments;
       fAnalysisMacro           = other.fAnalysisMacro;
       fAnalysisSource          = other.fAnalysisSource;
@@ -1238,6 +1242,7 @@ void AliAnalysisAlien::SetDefaults()
    fMaxMergeFiles              = 100;
    fRunNumbers                 = "";
    fExecutable                 = "analysis.sh";
+   fExecutableCommand          = "root -b -q";
    fArguments                  = "";
    fAnalysisMacro              = "myAnalysis.C";
    fAnalysisSource             = "";
@@ -1981,7 +1986,7 @@ void AliAnalysisAlien::WriteExecutable()
       out << "which aliroot" << endl;
       out << "echo \"=========================================\"" << endl << endl;
 //      if (TestBit(AliAnalysisGrid::kTest)) out << "root ";
-      out << "root -b -q "; 
+      out << fExecutableCommand << " "; 
       out << fAnalysisMacro.Data() << endl << endl;
       out << "echo \"======== " << fAnalysisMacro.Data() << " finished ========\"" << endl;
    }   
index 6688a9228a93cee0c778786470145525284bd2f8..da2efce86efbfb837f349e59d38013de49b218e1 100644 (file)
@@ -35,6 +35,7 @@ public:
    virtual void        AddRunNumber(const char *run);
    virtual void        AddDataFile(const char *lfn);
    virtual void        SetExecutable(const char *name="analysis.sh")     {fExecutable = name;}
+   virtual void        SetExecutableCommand(const char *command="root -b -q") {fExecutableCommand = command;}
    virtual void        SetArguments(const char *name="")                 {fArguments = name;}
    virtual void        SetAnalysisMacro(const char *name="myAnalysis.C") {fAnalysisMacro = name;}
    virtual void        SetAnalysisSource(const char *name="myAnalysisClass.cxx") {fAnalysisSource = name;}
@@ -114,6 +115,7 @@ private:
    Int_t            fProductionMode;  // Production mode (0-off, 1-on)
    TString          fRunNumbers;      // List of runs to be processed
    TString          fExecutable;      // Executable script for AliEn job
+   TString          fExecutableCommand;  // Command(s) to be executed in the executable script
    TString          fArguments;       // Arguments for the executable script
    TString          fAnalysisMacro;   // Root macro steering the analysis
    TString          fAnalysisSource;  // User analysis implementation (.cxx) file(s)
@@ -140,6 +142,6 @@ private:
    TObjArray       *fInputFiles;      // List of input files to be processed by the job
    TObjArray       *fPackages;        // List of packages to be used
    
-   ClassDef(AliAnalysisAlien, 6)   // Class providing some AliEn utilities
+   ClassDef(AliAnalysisAlien, 7)   // Class providing some AliEn utilities
 };
 #endif