2 TTrees are generated for the same ROOT file despite only defining one

_ROOT Version: 6.20/04

I can find two trees inside the root file, although I only created a single Tree called Events. Why is this happening? In any root file, I generate in my system, the same is happening. And another issue that I think might be related to this is that the header file I created using MakeClass for this root file with 1k events is 4.5 GB in size. The information on branches is appended several times. How to rectify this?

Yes, I had already seen this post. I know the cycle numbers are 11 and 10. But what command should I give in order to avoid two objects being written? Also if I inspect the Tree, the branches are repeated several times.


Attach your source code that defines / creates this tree (i.e., its branches).

I am using a software called OpenCMSG4. So all I modified is setting the file name. It’s a mac file that I am not able to upload here. So I have pasted the code below

#/vis/ogl/set/displayListLimit 10000000000
#/vis/viewer/set/viewpointThetaPhi 65 315 deg

#/detector/nonSensitiveMode true
#/detector/trackerMode 111111
#/detector/ecalMode 111
/detector/nonSensitiveMode true
/detector/trackerMode 111111
/detector/ecalMode 111


/generator particle
/generator/particle/type e-
/generator/particle/momentum 15 GeV
/generator/particle/eta 0
/generator/particle/sigmaEta 0.1
/root/setFileName em_15GeV_seta_p1.root

/run/beamOn 1000

That’s not ROOT but Geant4, so you need to ask them and the authors of your OpenCMSG4 application.

Hi @Ali_Esha ,
the object is not written several times, each namecycle is a snapshot of the TTree metadata, the actual data is written only once. You can safely ignore all namecycles but the highest, and ROOT automatically picks up the highest namecycle whenever you refer to the object name without specifying one.

About the repeated branches, maybe those are data members with the same name that belong to different objects? In any case yes, this is probably a question for the authors of the TTree-writing code.