48 FileList =
new TList();
52 MergeRootfile( Target, FileList );
63 first_source->
cd( path );
73 while ( (key = (
TKey*)nextkey())) {
76 if (oldkey && !strcmp(oldkey->GetName(),key->GetName()))
continue;
79 first_source->
cd( path );
91 while ( nextsource ) {
94 nextsource->
cd( path );
102 nextsource = (
TFile*)sourcelist->
After( nextsource );
108 const char* obj_name= obj->
GetName();
110 globChain =
new TChain(obj_name);
115 while ( nextsource ) {
118 nextsource = (
TFile*)sourcelist->
After( nextsource );
124 cout <<
"Found subdirectory " << obj->
GetName() << endl;
133 MergeRootfile( newdir, sourcelist );
138 cout <<
"Unknown object type, name: " 153 obj->
Write( key->GetName() );
virtual Bool_t cd(const char *path=0)
Change current directory to "this" directory.
virtual const char * GetName() const
Returns name of object.
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
virtual TList * GetListOfKeys() const
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
static Bool_t AddDirectoryStatus()
Static function: cannot be inlined on Windows/NT.
virtual TDirectory * mkdir(const char *name, const char *title="")
Create a sub-directory "a" or a hierarchy of sub-directories "a/b/c/...".
static void AddDirectory(Bool_t add=kTRUE)
Sets the flag controlling the automatic add of histograms in memory.
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=1, Int_t netopt=0)
Create / open a file.
virtual Long64_t Merge(const char *name, Option_t *option="")
Merge all the entries in the chain into a new tree in a new file.
Book space in a file, create I/O buffers, to fill them, (un)compress them.
virtual TFile * GetFile() const
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
R__EXTERN TSystem * gSystem
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual TObject * After(const TObject *obj) const
Returns the object after object obj.
virtual const char * GetPath() const
Returns the full path of the directory.
virtual void SaveSelf(Bool_t=kFALSE)
Describe directory structure in memory.
virtual Bool_t Add(TF1 *h1, Double_t c1=1, Option_t *option="")
Performs the operation: this = this + c1*f1 if errors are defined (see TH1::Sumw2), errors are also recalculated.
Mother of all ROOT objects.
virtual const char * GetTitle() const
Returns title of object.
virtual TObject * ReadObj()
To read a TObject* from the file.
virtual Bool_t cd(const char *path=0)
Change current directory to "this" directory.
virtual void Add(TObject *obj)
A chain is a collection of files containing TTree objects.
virtual int CopyFile(const char *from, const char *to, Bool_t overwrite=kFALSE)
Copy a file.
virtual const char * GetName() const
Returns name of object.
virtual Int_t Add(TChain *chain)
Add all files referenced by the passed chain to this chain.