#include <dSFMTEngine.h>
- Author
Definition at line 31 of file dSFMTEngine.h.
◆ dSFMTEngine() [1/4]
CLHEP::dSFMTEngine::dSFMTEngine |
( |
| ) |
|
Definition at line 47 of file dSFMTEngine.cxx.
53 int curIndex = abs(
int(engineNum%
maxIndex));
56 HepRandom::getTheTableSeeds( seedlist, curIndex );
57 seedlist[0] = (seedlist[0])^
mask;
◆ dSFMTEngine() [2/4]
CLHEP::dSFMTEngine::dSFMTEngine |
( |
long |
seed | ) |
|
◆ dSFMTEngine() [3/4]
CLHEP::dSFMTEngine::dSFMTEngine |
( |
const long * |
seeds | ) |
|
◆ ~dSFMTEngine()
CLHEP::dSFMTEngine::~dSFMTEngine |
( |
| ) |
|
|
virtual |
◆ dSFMTEngine() [4/4]
◆ beginTag()
std::string CLHEP::dSFMTEngine::beginTag |
( |
| ) |
|
|
static |
◆ engineName()
static std::string CLHEP::dSFMTEngine::engineName |
( |
| ) |
|
|
inlinestatic |
◆ flat()
double CLHEP::dSFMTEngine::flat |
( |
| ) |
|
|
overridevirtual |
◆ flatArray()
void CLHEP::dSFMTEngine::flatArray |
( |
const int |
size, |
|
|
double * |
vect |
|
) |
| |
|
overridevirtual |
◆ get() [1/2]
bool CLHEP::dSFMTEngine::get |
( |
const std::vector< unsigned long > & |
v | ) |
|
|
overridevirtual |
Definition at line 287 of file dSFMTEngine.cxx.
288 if ((
v[0] & 0xffffffffUL) != engineIDulong<dSFMTEngine>()) {
290 "\ndSFMTEngine get:state vector has wrong ID word - state unchanged\n";
◆ get() [2/2]
std::istream & CLHEP::dSFMTEngine::get |
( |
std::istream & |
is | ) |
|
|
overridevirtual |
Definition at line 241 of file dSFMTEngine.cxx.
243 char beginMarker [MarkerLen];
249 if (strcmp(beginMarker,
"dSFMTEngine-begin")) {
250 is.clear(std::ios::badbit | is.rdstate());
251 std::cerr <<
"\nInput stream mispositioned or"
252 <<
"\ndSFMTEngine state description missing or"
253 <<
"\nwrong engine type found." << std::endl;
◆ getState() [1/2]
bool CLHEP::dSFMTEngine::getState |
( |
const std::vector< unsigned long > & |
v | ) |
|
|
overridevirtual |
Definition at line 296 of file dSFMTEngine.cxx.
299 "\ndSFMTEngine get:state vector has wrong length - state unchanged\n";
304 for (
int i=0;
i<DSFMT_N + 1; ++
i) {
◆ getState() [2/2]
std::istream & CLHEP::dSFMTEngine::getState |
( |
std::istream & |
is | ) |
|
|
overridevirtual |
Definition at line 263 of file dSFMTEngine.cxx.
265 char endMarker [MarkerLen];
268 for (
int i=0;
i<DSFMT_N + 1; ++
i) {
278 if (strcmp(endMarker,
"dSFMTEngine-end")) {
279 is.clear(std::ios::badbit | is.rdstate());
280 std::cerr <<
"\ndSFMTEngine state description incomplete."
281 <<
"\nInput stream is probably mispositioned now." << std::endl;
◆ init_dsfmt()
void CLHEP::dSFMTEngine::init_dsfmt |
( |
| ) |
|
|
private |
Definition at line 79 of file dSFMTEngine.cxx.
81 int err=posix_memalign((
void**)&
m_dsfmt,16,
sizeof(dsfmt_t));
83 std::stringstream errstring;
84 errstring <<
"dSFMTEngine::init_dsfmt() : could not allocate memory for dsfmt data structure, error=" <<
err;
85 throw std::runtime_error(errstring.str());
◆ name()
std::string CLHEP::dSFMTEngine::name |
( |
| ) |
const |
|
overridevirtual |
◆ operator float()
CLHEP::dSFMTEngine::operator float |
( |
| ) |
|
|
overridevirtual |
◆ operator unsigned int()
CLHEP::dSFMTEngine::operator unsigned int |
( |
| ) |
|
|
overridevirtual |
◆ operator=()
◆ put() [1/2]
std::vector< unsigned long > CLHEP::dSFMTEngine::put |
( |
| ) |
const |
|
overridevirtual |
Definition at line 228 of file dSFMTEngine.cxx.
229 std::vector<unsigned long>
v;
230 v.push_back (engineIDulong<dSFMTEngine>());
232 for (
int i=0;
i<DSFMT_N + 1; ++
i) {
233 v.push_back(
static_cast<unsigned long>(
m_dsfmt->status[
i].u32[0]));
234 v.push_back(
static_cast<unsigned long>(
m_dsfmt->status[
i].u32[1]));
235 v.push_back(
static_cast<unsigned long>(
m_dsfmt->status[
i].u32[2]));
236 v.push_back(
static_cast<unsigned long>(
m_dsfmt->status[
i].u32[3]));
◆ put() [2/2]
std::ostream & CLHEP::dSFMTEngine::put |
( |
std::ostream & |
os | ) |
const |
|
overridevirtual |
Definition at line 209 of file dSFMTEngine.cxx.
211 char beginMarker[] =
"dSFMTEngine-begin";
212 char endMarker[] =
"dSFMTEngine-end";
214 int pr =
os.precision(20);
215 os <<
" " << beginMarker <<
" ";
217 for (
int i=0;
i<DSFMT_N + 1; ++
i) {
223 os << endMarker <<
"\n";
◆ restoreStatus()
void CLHEP::dSFMTEngine::restoreStatus |
( |
const char |
filename[] = "MTwist.conf" | ) |
|
|
overridevirtual |
Definition at line 170 of file dSFMTEngine.cxx.
174 std::cerr <<
" -- Engine state remains unchanged\n";
180 for (
int i=0; i<DSFMT_N + 1; ++i) inFile >>
m_dsfmt->status[
i].u32[0] >>
m_dsfmt->status[
i].u32[1]
◆ saveStatus()
void CLHEP::dSFMTEngine::saveStatus |
( |
const char |
filename[] = "MTwist.conf" | ) |
const |
|
overridevirtual |
◆ setSeed()
void CLHEP::dSFMTEngine::setSeed |
( |
long |
seed, |
|
|
int |
k = 0 |
|
) |
| |
|
overridevirtual |
◆ setSeeds() [1/2]
void CLHEP::dSFMTEngine::setSeeds |
( |
const long * |
seeds, |
|
|
int |
k = 0 |
|
) |
| |
|
overridevirtual |
Definition at line 141 of file dSFMTEngine.cxx.
145 const int numBuff=DSFMT_N;
147 while (
i < numBuff && seeds[
i]) {
◆ setSeeds() [2/2]
void CLHEP::dSFMTEngine::setSeeds |
( |
const uint32_t * |
seeds, |
|
|
int |
k = 0 |
|
) |
| |
Definition at line 126 of file dSFMTEngine.cxx.
130 const int numBuff=DSFMT_N;
131 while (
i < numBuff && seeds[
i]) {
◆ showStatus()
void CLHEP::dSFMTEngine::showStatus |
( |
| ) |
const |
|
overridevirtual |
Definition at line 185 of file dSFMTEngine.cxx.
188 std::cout <<
"--------- dSFMT engine status ---------\n";
189 int pr = std::cout.precision();
190 std::cout.precision(20);
191 std::cout <<
" Current index = " <<
m_dsfmt->idx <<
"\n";
192 std::cout <<
" Array status[] = \n";
193 for (
int i=0;
i<DSFMT_N + 1; ++
i) {
194 std::cout <<
m_dsfmt->status[
i].u32[0] <<
" " <<
m_dsfmt->status[
i].u32[1] <<
" "
197 std::cout <<
"----------------------------------------" << std::endl;
198 std::cout.precision(
pr);
◆ m_dsfmt
DSFMT_T* CLHEP::dSFMTEngine::m_dsfmt |
|
private |
◆ maxIndex
constexpr int CLHEP::dSFMTEngine::maxIndex = 215 |
|
staticconstexprprivate |
◆ numEngines
std::atomic< int > CLHEP::dSFMTEngine::numEngines = 0 |
|
staticprivate |
The documentation for this class was generated from the following files:
outFile
Comment Out Those You do not wish to run.