Logo ROOT   6.10/09
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 
39 private:
40  TFileMergeInfo() = delete;
41  TFileMergeInfo(const TFileMergeInfo&) = delete;
42  TFileMergeInfo& operator=(const TFileMergeInfo&) = delete;
43 
44 public:
45  TDirectory *fOutputDirectory; // Target directory where the merged object will be written.
46  Bool_t fIsFirst; // 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; // Place holder to pass extra information. This object will be deleted at the end of each series of objects.
49 
50  TFileMergeInfo(TDirectory *outputfile) : fOutputDirectory(outputfile), fIsFirst(kTRUE), fOptions(), fUserData(0) {}
51  virtual ~TFileMergeInfo() { delete fUserData; } ;
52 
53  void Reset() { fIsFirst = kTRUE; delete fUserData; fUserData = 0; }
54 
56 };
57 
58 #endif
TFileMergeInfo & operator=(const TFileMergeInfo &)=delete
TFileMergeInfo()=delete
Basic string class.
Definition: TString.h:129
bool Bool_t
Definition: RtypesCore.h:59
#define ClassDef(name, id)
Definition: Rtypes.h:297
TObject * fUserData
TFileMergeInfo(TDirectory *outputfile)
virtual ~TFileMergeInfo()
Describe directory structure in memory.
Definition: TDirectory.h:34
Mother of all ROOT objects.
Definition: TObject.h:37
TDirectory * fOutputDirectory
const Bool_t kTRUE
Definition: RtypesCore.h:91