Copy directory from existing rootfile

Hi Rooters,

I am making a new root file from an existing root file. I need to copy a particular directory from an existing root file into a new root file. This directory has some histograms.

I do not know if there is any smart way to do this. I assigned pointers for all the histograms in the directory. Then i wrote all the pointers to new root file. This looks like a bad idea. On the bottom line, is there a smart way to just copy a directory of an existing root file into another root file?

Cheers
Rajiv

Hi Rajiv,

There is currently no easy way to copy ‘just’ a directory from one TFile to the other.

[quote] I assigned pointers for all the histograms in the directory. Then i wrote all the pointers to new root file. This looks like a bad idea.[/quote]This is actually fine and any automatic copier would do something similar.

Cheers,
Philippe.