Merging files

Hello all,

I’m looking to find a way to merge 2 rootfiles.
Do you know if there is something already done, or a function that will do the job ?

Exemple :

  • If TObject not exists just add it.
  • If it exists already, for example an TH1, add content according to the binning of the worst precision.
  • Add folders, etc…

Actually I sent a program on cern’s grid and that will produce rootfiles with the same structure (parallel calculation)

Hi,

did you give a try to the hadd utility?

Cheers,
Danilo

Hi,

I never heart about that!

Do you speak about this program ?
root.cern.ch/root/html/tutorials/io/hadd.C.html

Hi,

You can invoke hadd just typing hadd once the root environment of ROOT is set. It comes “for free”.

Cheers,
Danilo