Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
36class TDirectory;
37
38namespace ROOT {
39class TIOFeatures;
40}
41
43private:
45
46 TFileMergeInfo() = delete;
49
50public:
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 = nullptr; }
61
63};
64
65#endif
constexpr Bool_t kTRUE
Definition RtypesCore.h:100
#define ClassDef(name, id)
Definition Rtypes.h:337
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
TIOFeatures * fIOFeatures
TDirectory * fOutputDirectory
TFileMergeInfo(TDirectory *outputfile)
TFileMergeInfo & operator=(const TFileMergeInfo &)=delete
TObject * fUserData
TFileMergeInfo()=delete
virtual ~TFileMergeInfo()
TFileMergeInfo(const TFileMergeInfo &)=delete
Mother of all ROOT objects.
Definition TObject.h:41
Basic string class.
Definition TString.h:139
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.