]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Correction for delta AOD handling in proof and saving in AliEn
authoragheata <agheata@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 20 May 2009 11:58:20 +0000 (11:58 +0000)
committeragheata <agheata@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 20 May 2009 11:58:20 +0000 (11:58 +0000)
ANALYSIS/AliAnalysisManager.cxx
ANALYSIS/AliAnalysisManager.h

index f1aff019c65da1e4ccfbe96aac13680ec0c8f19b..d3eec491c8e29e6d5d9f9674723b053ad846633b 100644 (file)
@@ -432,6 +432,7 @@ void AliAnalysisManager::PackOutput(TList *target)
          const char *filename = output->GetFileName();
          if (!(strcmp(filename, "default")) && fOutputEventHandler) {
             isManagedByHandler = kTRUE;
+            printf("#### Handler output. Extra: %s\n", fExtraFiles.Data());
             filename = fOutputEventHandler->GetOutputFileName();
          }
          // Check if data was posted to this container. If not, issue an error.
@@ -558,10 +559,33 @@ void AliAnalysisManager::PackOutput(TList *target)
                   Info("PackOutput", "Output file for container %s to be copied \n   at: %s. No merging.",
                        output->GetName(), remote.Data());
                TFile::Cp ( outFilename.Data(), remote.Data() );
+               // Copy extra outputs
+               if (fExtraFiles.Length() && isManagedByHandler) {
+                  TObjArray *arr = fExtraFiles.Tokenize(" ");
+                  TObjString *os;
+                  TIter nextfilename(arr);
+                  while ((os=(TObjString*)nextfilename())) {
+                     outFilename = os->GetString();
+                     remote = fSpecialOutputLocation;
+                     remote += "/";
+                     if (remote.BeginsWith("alien://")) {
+                        remote += outFilename;
+                        remote.ReplaceAll(".root", Form("_%d.root", gid));
+                     } else {   
+                        remote += Form("%s_%d_", gSystem->HostName(), gid);
+                        remote += outFilename;
+                     }   
+                     if (fDebug > 1) 
+                        Info("PackOutput", "Extra AOD file %s to be copied \n   at: %s. No merging.",
+                             outFilename.Data(), remote.Data());
+                     TFile::Cp ( outFilename.Data(), remote.Data() );
+                  }   
+                  delete arr;
+               }   
             } else {
             // No special location specified-> use TProofOutputFile as merging utility
             // The file at this output slot must be opened in CreateOutputObjects
-               if (fDebug > 1) printf("   File %s to be merged...\n", file->GetName());
+               if (fDebug > 1) printf("   File for container %s to be merged via file merger...\n", output->GetName());
             }
          }      
       }
index 04a662664719e6f094571653708ce533d25123fd..d0821e45d58f80ee834086dbb3d944323935351f 100644 (file)
@@ -164,9 +164,9 @@ private:
    AliAnalysisDataContainer *fCommonOutput;      // Common output container
    AliAnalysisSelector    *fSelector;            //! Current selector
    AliAnalysisGrid        *fGridHandler;         //! Grid handler plugin
-   TString                 fExtraFiles;          //! List of extra files to be merged
+   TString                 fExtraFiles;          // List of extra files to be merged
 
    static AliAnalysisManager *fgAnalysisManager; //! static pointer to object instance
-   ClassDef(AliAnalysisManager,4)  // Analysis manager class
+   ClassDef(AliAnalysisManager,5)  // Analysis manager class
 };   
 #endif