1#ifndef __QPRANDOMTRANDOM__
2#define __QPRANDOMTRANDOM__ 1
4#include "QPRandomBase.hpp"
23 virtual void SetSeed(
unsigned long seed){ fRandom->SetSeed(seed); }
28 virtual double Uniform(
double a,
double b){
return fRandom->Uniform(a, b); }
33 virtual double Gaus(
double mean,
double sigma){
return fRandom->Gaus(mean, sigma); }
37 TRandom* fRandom =
nullptr;
Abstract random number source.
Header-only adapter: implements QPRandomBase on top of a caller-owned TRandom.
QPRandomTRandom(TRandom *random)
virtual double Uniform(double a, double b)
Delegates to TRandom::Uniform(a, b).
virtual ~QPRandomTRandom()
Does not delete the wrapped TRandom.
virtual void SetSeed(unsigned long seed)
Delegates to TRandom::SetSeed.
virtual double Gaus(double mean, double sigma)
Delegates to TRandom::Gaus(mean, sigma).