Make BDSSampler output writing more memory and cpu efficient

Issue #86 resolved
Jochem Snuverink created an issue
  • Make one instance of Sampler, static members of logical volumes
  • Careful with deletion of containersolid and logicalvolume
  • Store vector of TTrees in BDSOutputROOT so that TTree lookup can be done with index (copy number of sampler)

Comments (2)

  1. Jochem Snuverink reporter

    a single instance of sampler turned out to be difficult to combine with cpu-efficiency. Now a new object is created for every sampler. A vector of TTrees is stored in BDSOutputROOT with index lookup. This is done from the Sampler.outputName which is of the format Sampler_elementname_samplerNumber. Since counting starts at 1, samplerNumber is also the index of the TTree vector (since primaries has index 0). The sampler number is removed from the TTree name again. This means that duplicate TTree names can be possible.

  2. Log in to comment