I want to manage two different root files in the same macro. They have different structure in the inside so there is no point in merge them.
I want to use one, to extract info to set up a TH1F. Then delete it.
After, use the second one, to extract info to set up a TH1F. Then delete it.
After to use the two TH1F to do my analysis.
The problem comes when the macro is capable to manage only one root file, and it does not read the branches of the second one, even if it sees them and knows how many events they hold.
Thank you in advance.
Miguel. twoRootFiles.C (1009 Bytes)
Hola Miguel,
A priori I do not see anything wrong with the macro. Obviously I no not know the actual contents of the files and therefore I do not know if the values in the branch ‘event.fParam1’ of the second file is within the range 1-24000. Can you just try to read the second file by commenting the first part of the macro?
Saludos,
Pere
If I comment one of the two parts, the other works perfectly. But the problem comes when both parts are demanded. In that case the second one fails by not recognizing the branches.
Miguel.
[quote=“mato”]Hola Miguel,
A priori I do not see anything wrong with the macro. Obviously I no not know the actual contents of the files and therefore I do not know if the values in the branch ‘event.fParam1’ of the second file is within the range 1-24000. Can you just try to read the second file by commenting the first part of the macro?
Saludos,
Pere[/quote]