I am trying to read some histos from a file and then write these to another file. It should be a straightforward and common task ; I tried 2 different approaches but ended up with the same result. I am attaching the rootfile and the codes I tried. Why can’t I iterate over this f->get thing ? Doesn’t make any sense
I would appreciate some insight from experienced users.
First of all, you should replace:
for(i=0;i==55;i++){
By:
for(i=0;i<55;i++){
And also use TString::Format() to format parameters… For example:
hHFR->Write(TString::Format("Chan_%d",i));
And try again