- Extra minor fix in AliAnalysisManager::PackOutput() (M.Vala)
authoragheata <agheata@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 15 Feb 2008 09:32:31 +0000 (09:32 +0000)
committeragheata <agheata@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 15 Feb 2008 09:32:31 +0000 (09:32 +0000)
ANALYSIS/AliAnalysisManager.cxx

index 029123e..7308469 100644 (file)
@@ -361,16 +361,18 @@ void AliAnalysisManager::PackOutput(TList *target)
          }   
          // Special outputs files are closed and copied on the remote location
          if (output->IsSpecialOutput() && strlen(output->GetFileName())) {
+            TDirectory *opwd = gDirectory;
             TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject(output->GetFileName());
             if (!file) continue;
             file->cd();
             if (output->GetData()) output->GetData()->Write();
             file->Close();
+            if (opwd) opwd->cd();
             if (strlen(fSpecialOutputLocation.Data())) {
                TString remote = fSpecialOutputLocation;
                remote += "/";
                Int_t gid = gROOT->ProcessLine("gProofServ->GetGroupId();");
-               remote += Form("%s_%d", gSystem->HostName(), gid);
+               remote += Form("%s_%d_", gSystem->HostName(), gid);
                remote += output->GetFileName();
                TFile::Cp(output->GetFileName(), remote.Data());
             }