i’m using root version 5.22/00d (or 5.24/00) and i’m encountering a mind-blasting conundrum. i have a c++ program which has the aim of reading a series of .root files, fetch histograms contained in those files, draw them on TCanvases and save them. for each plot it intends to make, the program will open each file and look for the corresponding histogram: mind that files have different names, but i look for histograms with the same name in each file.
i’m attaching a simple macro (micromacro.C) and two .root files. when loaded in interpreter mode, the macro works correctly and the two saved eps files show that the two histograms contained in the two files are different.
now, the problem arises when using the full c++ program. i’m attaching a tar with a simplified version of the program which reproduces the error. please follow these instructions:
tar xvf SAMETH1FPROBLEM.tar
./drawPhotonJet_2bkg EG QCD_Spring10 PhotonJet_Summer1036X pf akt5 SHAPE
this will produce two eps files (h0 and h1) which (at least in my case) contain the same histogram.
if you check lines 201-215 of DrawBase.C (and compare to what is printed on the standard out while the program is running) the two histograms should be taken by two different files, and should therefore be different (just as micromacro.C does).
SAMETH1FPROBLEM.tar (250 KB)