Add histograms

There are 2 root files, f1 and f2. f1 includes direcotry of ec1 and ec2. f2 includes directory of ic1 and ic2. Every direcotry includes about 20 histograms. I want to add ic1 and ic2 into f1. I tried with hadd, but it doesn’t work because they are different kind of histograms. How to add them?
Thanks.

Could you make clear what you want to do?
-add contents of histograms in two directories, the histograms and
directories having different names
-import histograms from ic1 and store them in ec1?
-or ??

Rene

Thanks, Rene. I just want to move all the histograms in direcotries of ic1 and ic2 in f2 to f1, so that I only need to keep f1 and delete f2.

To move all histograms in f1/ic1 to f2/ic2, do
cd to f1/ic1
gDirectory->ReadAll();
TDirectory *old = gDirectory;
cd to f2/ic2
old->GetList()->Write();

Rene