-
Notifications
You must be signed in to change notification settings - Fork 11
/
GenRandom.h
58 lines (43 loc) · 985 Bytes
/
GenRandom.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/**
* \file GenRandom.h
*
* \ingroup LArCVImageMaker
*
* \brief Class def header for a class GenRandom
*
* @author kterao
*/
/** \addtogroup LArCVImageMaker
@{*/
#ifndef SUPERA_GENRANDOM_H
#define SUPERA_GENRANDOM_H
#include <iostream>
#include "CLHEP/Random/RandFlat.h"
class LArSoftSuperaDriver;
namespace supera {
/**
\class GenRandom
User defined class GenRandom ... these comments are used to generate
doxygen documentation!
*/
class GenRandom{
friend class LArSoftSuperaDriver;
private:
/// Default constructor
GenRandom() : _flatRandom(nullptr)
{}
/// Default destructor
~GenRandom(){}
static GenRandom* _sptr;
CLHEP::RandFlat* _flatRandom;
public:
static GenRandom& get() {
if(!_sptr) _sptr = new GenRandom();
return *_sptr;
}
void SetFlatGen(CLHEP::RandFlat* ptr);
double Flat(double min, double max);
};
}
#endif
/** @} */ // end of doxygen group