ATLAS Offline Software
Loading...
Searching...
No Matches
TrigAnalysis/TrigInDetAnalysisUser/Resplot/src/Random.h
Go to the documentation of this file.
1/* emacs: this is -*- c++ -*- */
17
18
19#ifndef RANDOM_H
20#define RANDOM_H
21
22#include <iostream>
23
24#include "TRandom3.h"
25
26class Random : TRandom3 {
27
28public:
29
30 static Random& RandomBuilder() {
31 static Random _r;
32 return _r;
33 }
34
35 // virtual ~Random() { delete m_rand; }
36 virtual ~Random() { }
37
38 static double exp() { return RandomBuilder().Exp(1); }
39 static double gauss() { return RandomBuilder().Gaus(); }
40 static double uniform() { return RandomBuilder().Uniform(); }
41
42
43private:
44
45 Random(int seed=4357) : TRandom3(seed) { }
46
47};
48
49inline std::ostream& operator<<( std::ostream& s, const Random& _r ) {
50 return s;
51}
52
53
54
55#endif // RANDOM_H
56
57
58
59
60
61
62
63
64
65
std::ostream & operator<<(std::ostream &s, const Random &_r)