This functions is a hack, to make the number of threads globally available. It should obviously be part of Scheduler or Network, but implementing it there would require a major re-design of the class.
This fct should return the recordables_ entry, but since filling recordables_ leads to seg fault on exit, we just build the list every time, even though that beats the goal of being more efficient ...
Some aspects of RecordingDevice behavior depend on the type of device: Multimeter needs to have its data cleared on n_events==0 and provides an accumulator mode which is administered by RecordingDevice. To tell recording device about this deviating behavior, we mark the type of "owning device" with an enum flag on construction. This is not very clean and should probably be solved by subclassing instead.
The implementation is very quick and dirty and not tuned for performance at all.
Note
The simulator works by calculating the hazard h(t) for each time step and comparing h(t) dt to a [0,1)-uniform number. The hazard is given by $[ h(t) = {a (t) (t)^{a-1} e^{-(t)}}{(a, (t))} $] with $[ (t) = dc + ac ( 2 f t + ) $] $[ (t) = a {t_0}^t (s) ds $] and the incomplete Gamma function $(a,z)$; $a$ is the order of the gamma function and $t_0$ the time of the most recent spike.
This implementation assumes that outgoing connections are all made from the same synapse type, see #737. Once #681 is fixed, we need to add a check that his assumption holds.