#include <TRandomAdaptor.h>
|
void | Grumble (std::string const &errortext) const |
|
Definition at line 13 of file TRandomAdaptor.h.
edm::TRandomAdaptor::TRandomAdaptor |
( |
| ) |
|
|
inline |
edm::TRandomAdaptor::TRandomAdaptor |
( |
long |
seed | ) |
|
|
inline |
edm::TRandomAdaptor::TRandomAdaptor |
( |
int |
rowIndex, |
|
|
int |
colIndex |
|
) |
| |
|
inline |
edm::TRandomAdaptor::TRandomAdaptor |
( |
std::istream & |
is | ) |
|
Definition at line 17 of file TRandomAdaptor.cc.
References Grumble().
18 Grumble(std::string(
"Cannot instantiate a TRandom engine from an istream"));
void Grumble(std::string const &errortext) const
edm::TRandomAdaptor::~TRandomAdaptor |
( |
| ) |
|
|
virtual |
std::string edm::TRandomAdaptor::beginTag |
( |
| ) |
|
|
inline |
static std::string edm::TRandomAdaptor::engineName |
( |
| ) |
|
|
inlinestatic |
Definition at line 60 of file TRandomAdaptor.h.
60 {
return std::string(
"TRandomAdaptor"); }
double edm::TRandomAdaptor::flat |
( |
void |
| ) |
|
|
inline |
void edm::TRandomAdaptor::flatArray |
( |
int const |
size, |
|
|
double * |
vect |
|
) |
| |
|
inline |
std::istream & edm::TRandomAdaptor::get |
( |
std::istream & |
is | ) |
|
|
virtual |
bool edm::TRandomAdaptor::get |
( |
std::vector< unsigned long > const & |
v | ) |
|
TRandom3* edm::TRandomAdaptor::getRootEngine |
( |
| ) |
|
|
inline |
std::istream & edm::TRandomAdaptor::getState |
( |
std::istream & |
is | ) |
|
|
virtual |
Definition at line 70 of file TRandomAdaptor.cc.
References Grumble().
Referenced by get().
71 Grumble(std::string(
"getState(std::istream) not available for TRandom engines"));
void Grumble(std::string const &errortext) const
bool edm::TRandomAdaptor::getState |
( |
std::vector< unsigned long > const & |
v | ) |
|
|
inline |
void edm::TRandomAdaptor::Grumble |
( |
std::string const & |
errortext | ) |
const |
|
private |
std::string edm::TRandomAdaptor::name |
( |
void |
| ) |
const |
|
inline |
edm::TRandomAdaptor::operator float |
( |
| ) |
|
|
inline |
edm::TRandomAdaptor::operator unsigned int |
( |
| ) |
|
|
inline |
std::ostream & edm::TRandomAdaptor::put |
( |
std::ostream & |
os | ) |
const |
|
virtual |
Definition at line 24 of file TRandomAdaptor.cc.
References Grumble().
25 Grumble(std::string(
"put(std::ostream) not available for TRandom engines"));
void Grumble(std::string const &errortext) const
std::vector< unsigned long > edm::TRandomAdaptor::put |
( |
| ) |
const |
Definition at line 29 of file TRandomAdaptor.cc.
References i, trand_, and v.
30 std::vector<unsigned long>
v;
32 int32_t itemSize =
sizeof(uint32_t);
33 TBufferFile buffer(TBuffer::kWrite, 2048 * itemSize);
36 char* bufferPtr = buffer.Buffer();
37 int32_t numItems = (buffer.Length() + itemSize - 1) / itemSize;
38 v.reserve(numItems + 1);
39 v.push_back(CLHEP::engineIDulong<TRandomAdaptor>());
40 for(
int i = 0;
i < numItems; ++
i) {
50 uint32_t value32 = *
reinterpret_cast<uint32_t*
>(bufferPtr +
i * itemSize);
52 if(
i == numItems - 1) {
53 int nBytes = buffer.Length() % itemSize;
54 if(nBytes == 1) value32 &= 0xffu;
55 else if(nBytes == 2) value32 &= 0xffffu;
56 else if(nBytes == 3) value32 &= 0xffffffu;
60 v.push_back(static_cast<unsigned long>(value32));
void edm::TRandomAdaptor::restoreStatus |
( |
char const |
filename[] = "TRandom.conf" | ) |
|
|
inline |
void edm::TRandomAdaptor::saveStatus |
( |
char const |
filename[] = "TRandom.conf" | ) |
const |
|
inline |
void edm::TRandomAdaptor::setSeed |
( |
long |
seed, |
|
|
int |
|
|
) |
| |
|
inline |
void edm::TRandomAdaptor::setSeeds |
( |
long const * |
seeds, |
|
|
int |
|
|
) |
| |
|
inline |
void edm::TRandomAdaptor::showStatus |
( |
| ) |
const |
|
inline |
Definition at line 73 of file TRandomAdaptor.h.
Referenced by beginTag(), flat(), flatArray(), get(), getRootEngine(), name(), operator float(), operator unsigned int(), put(), restoreStatus(), saveStatus(), setSeed(), setSeeds(), and showStatus().