![]() |
Project
|
#include <RandomRing.h>
Public Types | |
| enum class | RandomType : char { Gaus , Flat , CustomTF1 , CustomLambda } |
Public Member Functions | |
| RandomRing (const RandomType randomType=RandomType::Gaus, TRandom *rng=nullptr) | |
| RandomRing (TF1 &function) | |
| void | initialize (const RandomType randomType=RandomType::Gaus, TRandom *rng=nullptr) |
| void | initialize (TF1 &function, TRandom *rng=nullptr) |
| void | initialize (std::function< float()> function) |
| float | getNextValue () |
| template<typename VcType > | |
| VcType | getNextValueVc () |
| unsigned int | getRingPosition () const |
| void | setRandomPosition (TRandom &rng) |
Definition at line 45 of file RandomRing.h.
|
strong |
| Enumerator | |
|---|---|
| Gaus | Gaussian distribution. |
| Flat | Flat distribution. |
| CustomTF1 | Custom TF1 function to be used. |
| CustomLambda | Initialized through external lambda. |
Definition at line 48 of file RandomRing.h.
|
inline |
constructor
| [in] | randomType | type of the random generator |
| [in] | rng | random generator to draw from, gRandom if null |
Definition at line 137 of file RandomRing.h.
|
inline |
constructor accepting TF1
| [in] | function | TF1 function |
Definition at line 147 of file RandomRing.h.
|
inline |
next random value from the ring buffer This function return a value from the ring buffer and increases the buffer position
Definition at line 82 of file RandomRing.h.
|
inline |
next vector with random values This function retuns a Vc vector with random numbers to be used for vectorised programming and increases the buffer position by the size of the vector
Definition at line 98 of file RandomRing.h.
|
inline |
position in the ring buffer
Definition at line 118 of file RandomRing.h.
|
inline |
initialisation of the random ring
| [in] | randomType | type of the random generator |
| [in] | rng | random generator to draw from, gRandom if null |
Definition at line 156 of file RandomRing.h.
|
inline |
initialisation of the random ring
| [in] | randomType | type of the random generator |
Definition at line 190 of file RandomRing.h.
|
inline |
initialisation of the random ring
| [in] | function | TF1 function |
| [in] | rng | random generator to draw from, gRandom if null |
Definition at line 180 of file RandomRing.h.
|
inline |
move to a random position in the ring buffer
| [in] | rng | random generator to draw the position from |
Definition at line 122 of file RandomRing.h.