What is the meaning of splitlevel=99?

From the documentation of TTree I understand, that splitlevel=0 will create a single branch where the event will be stored. splitlevel=1 on the other hand creates one branch for each data member of the event. splitlevel=2 is somewhat similar to splitlevel=1 (see e.g. https://root.cern.ch/doc/v606/classTTree.html#af5d6a0d390030b3e0e5c8aa8d99a0088).

What is the effect of setting splitlevel to any other value than 0,1,2 ? Especially, what is the meaning of splitlevel=99 (which is the default for most methods with this parameter)?

Hi,

Indeed the meaning of splitlevel greater than 2 seems to only be implied in the TTree documentation. The intent is that there is a recursive algorithm akin to:

   if (splitlevel > 0) then 
      Create a subbranch for each data member.
      if data member is a nested object, call this algorithm with (splitlevel-1) to create sub-branch of the branches.
   else
      Create a branch without sub-branches.

For all intent and purpose splitlevel 99 means that the top level object should be split as much as possible with one terminal branch being create for each data member of itself or any of its nested and sub-nested (etc.) objects that are elementary types (ints, floats) or not split-able (pointers, std::string, etc.).

Cheers,
Philippe.