Help with root and cxx files

Hi, I’m fairly new to codes. I have a root file that has two Ttrees, one having data of energy. I’d like to propagate this energy, I have a .cxx (and header) file that does this: pro.cxx . I’d like to run a code that opens the rootfile, then uses the cxx to propagate it, then write the new data to a another root file (with the same trees and variables). Can someone advise me, or know of an example? Thanks

Hi,

see $ROOTSYS/tutorials/tree/copytree*.C

Cheers, Axel.

Thanks! I didn’t get the tutorials on my mac, but luckily I can ssh into a computer that has them, thanks again, you have my gratitude!