Logo ROOT  
Reference Guide
TFileMergeInfo.h
Go to the documentation of this file.
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 #include "TObject.h"
33 
34 #include "TString.h"
35 
36 class TDirectory;
37 
38 namespace ROOT {
39 class TIOFeatures;
40 }
41 
43 private:
45 
46  TFileMergeInfo() = delete;
47  TFileMergeInfo(const TFileMergeInfo&) = delete;
49 
50 public:
51  TDirectory *fOutputDirectory{nullptr}; // Target directory where the merged object will be written.
52  Bool_t fIsFirst{kTRUE}; // True if this is the first call to Merge for this series of object.
53  TString fOptions; // Additional text based option being passed down to customize the merge.
54  TObject *fUserData{nullptr}; // Place holder to pass extra information. This object will be deleted at the end of each series of objects.
55  TIOFeatures *fIOFeatures{nullptr}; // Any ROOT IO features that should be explicitly enabled.
56 
57  TFileMergeInfo(TDirectory *outputfile) : fOutputDirectory(outputfile) {}
58  virtual ~TFileMergeInfo() { delete fUserData; } ;
59 
60  void Reset() { fIsFirst = kTRUE; delete fUserData; fUserData = 0; }
61 
63 };
64 
65 #endif
TFileMergeInfo
Definition: TFileMergeInfo.h:42
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
TFileMergeInfo::TFileMergeInfo
TFileMergeInfo(TDirectory *outputfile)
Definition: TFileMergeInfo.h:57
ROOT::TIOFeatures
TIOFeatures provides the end-user with the ability to change the IO behavior of data written via a TT...
Definition: TIOFeatures.hxx:69
TFileMergeInfo::TFileMergeInfo
TFileMergeInfo(const TFileMergeInfo &)=delete
TFileMergeInfo::fOutputDirectory
TDirectory * fOutputDirectory
Definition: TFileMergeInfo.h:51
TString
Basic string class.
Definition: TString.h:136
TString.h
bool
TFileMergeInfo::fUserData
TObject * fUserData
Definition: TFileMergeInfo.h:54
TFileMergeInfo::Reset
void Reset()
Definition: TFileMergeInfo.h:60
TFileMergeInfo::fIOFeatures
TIOFeatures * fIOFeatures
Definition: TFileMergeInfo.h:55
TObject.h
TFileMergeInfo::~TFileMergeInfo
virtual ~TFileMergeInfo()
Definition: TFileMergeInfo.h:58
TFileMergeInfo::TFileMergeInfo
TFileMergeInfo()=delete
TObject
Mother of all ROOT objects.
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TFileMergeInfo::operator=
TFileMergeInfo & operator=(const TFileMergeInfo &)=delete
TDirectory
Describe directory structure in memory.
Definition: TDirectory.h:40
TFileMergeInfo::fOptions
TString fOptions
Definition: TFileMergeInfo.h:53
TFileMergeInfo::fIsFirst
Bool_t fIsFirst
Definition: TFileMergeInfo.h:52
ROOT
VSD Structures.
Definition: StringConv.hxx:21