Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-21 09:24:48

0001 // Author: Philippe Canal May, 2011
0002 
0003 /*************************************************************************
0004  * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers.               *
0005  * All rights reserved.                                                  *
0006  *                                                                       *
0007  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0008  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0009  *************************************************************************/
0010 
0011 /** \class TFileMergeInfo
0012 A class to pass information from the TFileMerger to the objects being merged.
0013 */
0014 
0015 #ifndef ROOT_TFileMergeInfo
0016 #define ROOT_TFileMergeInfo
0017 
0018 /// This class provides access to the output directory pointer (fOutputDirectory)
0019 /// whether or not this is the first time Merge is being called in the
0020 /// series (for example for TTree, the first time we also need to Clone
0021 /// the object on which Merge is called), and provides for a User Data
0022 /// object to be passed along to each of the calls to Merge.
0023 /// The fUserData object is owned by the TFileMergeInfo and will be
0024 /// deleted when the TFileMerger moves on to the next set of objects.
0025 
0026 #include "TObject.h"
0027 
0028 #include "TString.h"
0029 
0030 class TDirectory;
0031 
0032 namespace ROOT {
0033 class TIOFeatures;
0034 }
0035 
0036 class TFileMergeInfo {
0037 public:
0038    using TIOFeatures = ROOT::TIOFeatures;
0039 private:
0040    TFileMergeInfo() = delete;
0041    TFileMergeInfo(const TFileMergeInfo&) = delete;
0042    TFileMergeInfo& operator=(const TFileMergeInfo&) = delete;
0043 
0044 public:
0045    TDirectory  *fOutputDirectory{nullptr}; ///< Target directory where the merged object will be written.
0046    Bool_t       fIsFirst{kTRUE};           ///< True if this is the first call to Merge for this series of object.
0047    TString      fOptions;                  ///< Additional text based option being passed down to customize the merge.
0048    TObject     *fUserData{nullptr};        ///< Place holder to pass extra information.  This object will be deleted at the end of each series of objects.
0049    TIOFeatures *fIOFeatures{nullptr};      ///< Any ROOT IO features that should be explicitly enabled.
0050 
0051    TFileMergeInfo(TDirectory *outputfile) : fOutputDirectory(outputfile) {}
0052    virtual ~TFileMergeInfo() { delete fUserData; } ;
0053 
0054    void Reset() { fIsFirst = kTRUE; delete fUserData; fUserData = nullptr; }
0055 
0056    ClassDef(TFileMergeInfo, 0);
0057 };
0058 
0059 #endif