Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:11:46

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