Logo ROOT   6.08/07
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 #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 
43 private:
44  TFileMergeInfo() = delete;
45  TFileMergeInfo(const TFileMergeInfo&) = delete;
46  TFileMergeInfo& operator=(const TFileMergeInfo&) = delete;
47 
48 public:
49  TDirectory *fOutputDirectory; // Target directory where the merged object will be written.
50  Bool_t fIsFirst; // True if this is the first call to Merge for this series of object.
51  TString fOptions; // Additional text based option being passed down to customize the merge.
52  TObject *fUserData; // Place holder to pass extra information. This object will be deleted at the end of each series of objects.
53 
54  TFileMergeInfo(TDirectory *outputfile) : fOutputDirectory(outputfile), fIsFirst(kTRUE), fOptions(), fUserData(0) {}
55  virtual ~TFileMergeInfo() { delete fUserData; } ;
56 
57  void Reset() { fIsFirst = kTRUE; delete fUserData; fUserData = 0; }
58 
60 };
61 
62 #endif
TFileMergeInfo & operator=(const TFileMergeInfo &)=delete
TFileMergeInfo()=delete
Basic string class.
Definition: TString.h:137
bool Bool_t
Definition: RtypesCore.h:59
#define ClassDef(name, id)
Definition: Rtypes.h:254
TObject * fUserData
TFileMergeInfo(TDirectory *outputfile)
virtual ~TFileMergeInfo()
Describe directory structure in memory.
Definition: TDirectory.h:44
Mother of all ROOT objects.
Definition: TObject.h:37
TDirectory * fOutputDirectory
const Bool_t kTRUE
Definition: Rtypes.h:91