I have many files that each contains several histogram. I want to copy all these files’ contents into one data file. For example, the file h11.root, h12.root …, h90.root that each contains these TH1 Objects:
I hope this function can be added to TDirectory or TFile like this:
TDirectory::CopyDirectory(TDirectory *dir, char *newName=NULL);
or
TDirectory:ImportDir(TDirectory *dir, char *newName=NULL);
I mean, when I create a TBrowser object, in the browser window, I can drag and drop one dir from one file into another directory. If this is implemented, it will be more convinient. I expect it in the future version.
The CopyDir function cannot be added as it is in TDirectory because
it depends on TTree. More generally, it could be that users store
objects like TTree with overflow of buffers on disk. These objects may
require special code to copy these buffers.
I leave it for the time being as an example in the tutorials.