Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TFileMergeInfo.h
Go to the documentation of this file.
1// Author: Philippe Canal May, 2011
2
3/*************************************************************************
4 * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *
5 * All rights reserved. *
6 * *
7 * For the licensing terms see $ROOTSYS/LICENSE. *
8 * For the list of contributors see $ROOTSYS/README/CREDITS. *
9 *************************************************************************/
10
11/** \class TFileMergeInfo
12A class to pass information from the TFileMerger to the objects being merged.
13*/
14
15#ifndef ROOT_TFileMergeInfo
16#define ROOT_TFileMergeInfo
17
18/// This class provides access to the output directory pointer (fOutputDirectory)
19/// whether or not this is the first time Merge is being called in the
20/// series (for example for TTree, the first time we also need to Clone
21/// the object on which Merge is called), and provides for a User Data
22/// object to be passed along to each of the calls to Merge.
23/// The fUserData object is owned by the TFileMergeInfo and will be
24/// deleted when the TFileMerger moves on to the next set of objects.
25
26#include "TObject.h"
27
28#include "TString.h"
29
30class TDirectory;
31
32namespace ROOT {
33class TIOFeatures;
34}
35
37public:
39private:
40 TFileMergeInfo() = delete;
43
44public:
45 TDirectory *fOutputDirectory{nullptr}; ///< Target directory where the merged object will be written.
46 Bool_t fIsFirst{kTRUE}; ///< True if this is the first call to Merge for this series of object.
47 TString fOptions; ///< Additional text based option being passed down to customize the merge.
48 TObject *fUserData{nullptr}; ///< Place holder to pass extra information. This object will be deleted at the end of each series of objects.
49 TIOFeatures *fIOFeatures{nullptr}; ///< Any ROOT IO features that should be explicitly enabled.
50
52 virtual ~TFileMergeInfo() { delete fUserData; } ;
53
54 void Reset() { fIsFirst = kTRUE; delete fUserData; fUserData = nullptr; }
55
57};
58
59#endif
constexpr Bool_t kTRUE
Definition RtypesCore.h:107
#define ClassDef(name, id)
Definition Rtypes.h:344
TIOFeatures provides the end-user with the ability to change the IO behavior of data written via a TT...
Describe directory structure in memory.
Definition TDirectory.h:45
A class to pass information from the TFileMerger to the objects being merged.
TIOFeatures * fIOFeatures
Any ROOT IO features that should be explicitly enabled.
Bool_t fIsFirst
True if this is the first call to Merge for this series of object.
TString fOptions
Additional text based option being passed down to customize the merge.
TDirectory * fOutputDirectory
Target directory where the merged object will be written.
TFileMergeInfo(TDirectory *outputfile)
TFileMergeInfo & operator=(const TFileMergeInfo &)=delete
TObject * fUserData
Place holder to pass extra information. This object will be deleted at the end of each series of obje...
TFileMergeInfo()=delete
virtual ~TFileMergeInfo()
TFileMergeInfo(const TFileMergeInfo &)=delete
Mother of all ROOT objects.
Definition TObject.h:41
Basic string class.
Definition TString.h:138