Normalizing files with different cross-section & luminosity

Hi Rooters,

I have a list of Monte Carlo root files with different cross sections and according to it, different luminosities. I’m searching for top quark pairs in these files. I wanna run my code on all of them, means my program takes them one by one and run the code over each of them and fill a histogram by the final result. So after finishing the process I have just “one histogram” filled with all the results but the problem is my code doesn’t understand which data comes from which file and files have different properties ( different cross-sections and luminosities), on the other hand I have many of these MC files so it is not interesting getting many histograms and normalize them one by one and finally add them up together.Is there any one can help me to normalize them at the same time I’m running my code over them?