1 // @(#)root/proofplayer:$Id$ 2 // Author: Philippe Canal May, 2011 3 4 /************************************************************************* 5 * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. * 6 * All rights reserved. * 7 * * 8 * For the licensing terms see $ROOTSYS/LICENSE. * 9 * For the list of contributors see $ROOTSYS/README/CREDITS. * 10 *************************************************************************/ 11 12 #ifndef ROOT_TFileMergeInfo 13 #define ROOT_TFileMergeInfo 14 15 ////////////////////////////////////////////////////////////////////////// 16 // // 17 // TFileMergeInfo // 18 // // 19 // This class helps passing information from the TFileMerger to // 20 // the objects being merged. // 21 // // 22 // It provides access to the output directory pointer (fOutputDirectory)// 23 // to whether or not this is the first time Merge is being called in the// 24 // serie (for example for TTree, the first time we also need to Clone // 25 // the object on which Merge is called), and provides for a User Data // 26 // object to be passed along to each of the calls to Merge. // 27 // The fUserData object is owned by the TFileMergeInfo and will be // 28 // deleted when the TFileMerger moves on to the next set of objects. // 29 // // 30 ////////////////////////////////////////////////////////////////////////// 31 32 #ifndef ROOT_TObject 33 #include "TObject.h" 34 #endif 35 36 #ifndef ROOT_TString 37 #include "TString.h" 38 #endif 39 40 class TDirectory; 41 42 class TFileMergeInfo { 43 private: 44 TFileMergeInfo(); // Not implemented. 45 TFileMergeInfo(const TFileMergeInfo&); // Not implemented. 46 TFileMergeInfo& operator=(const TFileMergeInfo&); // Not implemented. 47 public: 48 TDirectory *fOutputDirectory; // Target directory where the merged object will be written. 49 Bool_t fIsFirst; // True if this is the first call to Merge for this series of object. 50 TString fOptions; // Additional text based option being passed down to customize the merge. 51 TObject *fUserData; // Place holder to pass extra information. This object will be deleted at the end of each series of objects. 52 53 TFileMergeInfo(TDirectory *outputfile) : fOutputDirectory(outputfile), fIsFirst(kTRUE), fOptions(), fUserData(0) {} 54 virtual ~TFileMergeInfo() { delete fUserData; } ; 55 56 void Reset() { fIsFirst = kTRUE; delete fUserData; fUserData = 0; } 57 58 ClassDef(TFileMergeInfo, 0); 59 }; 60 61 #endif 62