Add modelSplitLevel as an option

Issue #349 resolved
Robin Tesse created an issue

To use the new module DataUproot without explicitly importing ROOT, we can add an option modelSplitLevel (same structure as for samplerSplitLevel). The default value is 1 to be compatible with pybdsim (pybdsim.data.Getmodel()).
With this option, we can access the model using the following:

from pybdsim.DataUproot import BDSimOutput
data = BDSimOutput('root_file.root')
data.model.df

Comments (5)

  1. Robin Tesse reporter

    Here is a proposal from Laurie:

    We can add the option, and we should also add maybe a 'superior' option called uprootCompatible (for example), and when we turn that option on, we then turn on the others required for the split level.
    Also, we can warn the user that using a splitlevel = 1 for the samplers can increase the simulation time, especially if the user has a very large number of samplers (e.g. for optics).

  2. Laurie Nevay

    Thumbs up from me.

    What bit of the data is it that uproot has trouble with? Is it an std::vector in a branch? Or a vector of custom class (not a basic type)?

  3. Robin Tesse reporter

    I think it has to do with the stored data being in the form of a custom class vector. Therefore, we need to change the split level, to have a vector of known types (float, int, ...).

  4. Log in to comment