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
26namespace Resplot {
27
28class Random : TRandom3 {
29
30public:
31
32 static Random& RandomBuilder() {
33 static Random _r;
34 return _r;
35 }
36
37 // virtual ~Random() { delete m_rand; }
38 virtual ~Random() { }
39
40 static double exp() { return RandomBuilder().Exp(1); }
41 static double gauss() { return RandomBuilder().Gaus(); }
42 static double uniform() { return RandomBuilder().Uniform(); }
43
44
45private:
46
47 Random(int seed=4357) : TRandom3(seed) { }
48
49};
50
51inline std::ostream& operator<<( std::ostream& s, const Random& _r ) {
52 return s;
53}
54
55}
56
57#endif // RANDOM_H
58
59
60
61
62
63
64
65
66
67
std::ostream & operator<<(std::ostream &s, const StatVal &sv)
Definition StatVal.h:55