diff --git a/proof/proofplayer/inc/TFileMerger.h b/proof/proofplayer/inc/TFileMerger.h index df9a208d465300a3e9948af0173bad764bec95ab..b589f9fcf7ad01d988b2004772c9f099516e4ba5 100644 --- a/proof/proofplayer/inc/TFileMerger.h +++ b/proof/proofplayer/inc/TFileMerger.h @@ -75,7 +75,7 @@ public: virtual Bool_t AddFile(const char *url); virtual Bool_t OutputFile(const char *url); virtual void PrintFiles(Option_t *options); - virtual Bool_t Merge(); + virtual Bool_t Merge(Bool_t progressbar = kTRUE); virtual Bool_t MergeRecursive(TDirectory *target, TList *sourcelist, Int_t isdir); virtual void SetFastMethod(Bool_t fast=kTRUE) {fFastMethod = fast;} virtual void SetNotrees(Bool_t notrees=kFALSE) {fNoTrees = notrees;} diff --git a/proof/proofplayer/src/TFileMerger.cxx b/proof/proofplayer/src/TFileMerger.cxx index 1fba16b70a55c4a92fa387f88362dd95982929e9..4861c32d7b491b355db976d426ebe515ecb02b59 100644 --- a/proof/proofplayer/src/TFileMerger.cxx +++ b/proof/proofplayer/src/TFileMerger.cxx @@ -156,11 +156,13 @@ void TFileMerger::PrintFiles(Option_t *options) } //______________________________________________________________________________ -Bool_t TFileMerger::Merge() +Bool_t TFileMerger::Merge(Bool_t cp_progressbar) { // Merge the files. If no output file was specified it will write into // the file "FileMerger.root" in the working directory. Returns true // on success, false in case of error. + // "cp_progressbar" is pass to TFile::Cp to control whether there is + // visual feedback on the progress of the copy. if (!fOutputFile) { Info("Merge", "will merge the results to the file " @@ -175,9 +177,10 @@ Bool_t TFileMerger::Merge() if (!result) { Error("Merge", "error during merge of your ROOT files"); } else { - //fOutputFile->Write(); Not needed as already done in MergeRecursive() + //fOutputFile->Write(); Not needed as already done in MergeRecursive() ... well actually it is SaveSelf which is a bit different. + fOutputFile->Close(); // But Close is required so the file is complete. // copy the result file to the final destination - TFile::Cp(fOutputFilename1, fOutputFilename); + TFile::Cp(fOutputFilename1, fOutputFilename,cp_progressbar); } // Remove the temporary result file