Skip to content
This repository has been archived by the owner on Nov 21, 2020. It is now read-only.

Allocate a sensible default size for m_time_int #58

Open
tdealtry opened this issue Apr 24, 2020 · 0 comments
Open

Allocate a sensible default size for m_time_int #58

tdealtry opened this issue Apr 24, 2020 · 0 comments

Comments

@tdealtry
Copy link
Collaborator

Thinking ahead to memory fragmentation and tools running for days at a time...
m_time_int is a vector used in NHits & TestVertices to take a SubSample's (nominally double) times and convert them to an int. In order to prevent memory fragmentation (and for speed), it's a good idea to allocate as much memory as required in the Initalise() method, so that the vector isn't moved around in memory multiple times as it sees larger and larger SubSamples

Studies should be done on an appropriate value - but having the SubSample width used by PrepareSubSamples available in the data model would be useful (so you can potentially do something like 1.5 * average_dark_noise_rate_in_subsample_width)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant