Added job tag support in the alien plugin.
authoragheata <agheata@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 3 Aug 2009 15:30:40 +0000 (15:30 +0000)
committeragheata <agheata@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 3 Aug 2009 15:30:40 +0000 (15:30 +0000)
ANALYSIS/AliAnalysisAlien.cxx
ANALYSIS/AliAnalysisAlien.h
ANALYSIS/AliAnalysisGrid.h

index a797428..96da7da 100644 (file)
@@ -78,6 +78,7 @@ AliAnalysisAlien::AliAnalysisAlien()
                   fIncludePath(),
                   fCloseSE(),
                   fFriendChainName(),
+                  fJobTag(),
                   fInputFiles(0),
                   fPackages(0)
 {
@@ -123,6 +124,7 @@ AliAnalysisAlien::AliAnalysisAlien(const char *name)
                   fIncludePath(),
                   fCloseSE(),
                   fFriendChainName(),
+                  fJobTag(),
                   fInputFiles(0),
                   fPackages(0)
 {
@@ -168,6 +170,7 @@ AliAnalysisAlien::AliAnalysisAlien(const AliAnalysisAlien& other)
                   fIncludePath(other.fIncludePath),
                   fCloseSE(other.fCloseSE),
                   fFriendChainName(other.fFriendChainName),
+                  fJobTag(other.fJobTag),
                   fInputFiles(0),
                   fPackages(0)
 {
@@ -241,6 +244,7 @@ AliAnalysisAlien &AliAnalysisAlien::operator=(const AliAnalysisAlien& other)
       fIncludePath             = other.fIncludePath;
       fCloseSE                 = other.fCloseSE;
       fFriendChainName         = other.fFriendChainName;
+      fJobTag                  = other.fJobTag;
       if (other.fInputFiles) {
          fInputFiles = new TObjArray();
          TIter next(other.fInputFiles);
@@ -900,7 +904,7 @@ Bool_t AliAnalysisAlien::WriteJDL(Bool_t copy)
    sjdl.ReplaceAll("\n\n", "\n");
    sjdl.ReplaceAll("OutputDirectory", "OutputDir");
    sjdl += "JDLVariables = \n{\n   \"Packages\",\n   \"OutputDir\"\n};\n";
-   sjdl.Prepend("JobTag = \"Automatically generated analysis JDL\";\n");
+   sjdl.Prepend(Form("Jobtag = {\n   \"comment:%s\";\n}\n", fJobTag.Data()));
    index = sjdl.Index("JDLVariables");
    if (index >= 0) sjdl.Insert(index, "\n# JDL variables\n");
    // Write jdl to file
@@ -1204,6 +1208,7 @@ void AliAnalysisAlien::SetDefaults()
    fOutputFiles                = "";  // Like "AliAODs.root histos.root"
    fInputFormat                = "xml-single";
    fJDLName                    = "analysis.jdl";
+   fJobTag                     = "Automatically generated analysis JDL";
    fMergeExcludes              = "";
 }   
 
index 472acff..4942b0c 100644 (file)
@@ -40,6 +40,7 @@ public:
    virtual void        SetAdditionalLibs(const char *list)               {fAdditionalLibs = list;}
    virtual void        SetPrice(Int_t price=1)                           {fPrice = price;}
    virtual void        SetRunRange(Int_t min, Int_t max)                 {fRunRange[0] = min; fRunRange[1] = max;}
+   virtual void        SetJobTag(const char *tag="")                     {fJobTag = tag;}
    virtual void        SetNrunsPerMaster(Int_t nruns=1)                  {fNrunsPerMaster = nruns;}
    virtual void        SetMaxMergeFiles(Int_t nfiles)                    {fMaxMergeFiles = nfiles;}
    virtual void        SetSplitMode(const char *type="se")               {fSplitMode = type;}
@@ -133,6 +134,7 @@ private:
    TString          fIncludePath;     // Include path
    TString          fCloseSE;         // Preffered storage element. Taken from alien_CLOSE_SE environment.
    TString          fFriendChainName; // File name to construct friend chain (for AOD)
+   TString          fJobTag;          // Job tag
    TObjArray       *fInputFiles;      // List of input files to be processed by the job
    TObjArray       *fPackages;        // List of packages to be used
    
index 6406649..cf14e6b 100644 (file)
@@ -49,6 +49,7 @@ enum EPluginRunMode {
    virtual void        SetAnalysisSource(const char *name="myAnalysisClass.cxx") = 0;
    virtual void        SetAdditionalLibs(const char *list)               = 0;
    virtual void        SetPrice(Int_t price=1)                           = 0;
+   virtual void        SetJobTag(const char *tag="")                     = 0;
    virtual void        SetSplitMode(const char *type="se")               = 0;
    virtual void        SetSplitMaxInputFileNumber(Int_t nfiles=100)      = 0;
    virtual void        SetAPIVersion(const char *version)                = 0;