24int main(
int argc,
char **argv)
35 JParser<> zap(
"Program to test TRandom reproducibility.");
43 catch(
const exception &error) {
44 FATAL(error.what() << endl);
47 if (!seed.set(gRandom)) {
48 FATAL(
"Invalid configuration for random number generator " << seed << endl);
51 DEBUG(
"seed: <" << seed <<
"> -> " << gRandom->TRandom::GetSeed() << endl);
53 const UInt_t
MAX = numeric_limits<UInt_t>::max();
55 UInt_t value[2] = { 0, 0 };
57 if (!JRandom::write(file_name, gRandom)) {
58 FATAL(
"Failure writing to file <" << file_name <<
">." << endl);
61 value[0] = gRandom->Integer(
MAX);
63 DEBUG(
"random[0]: " << value[0] << endl);
67 if (!seed.set(gRandom)) {
68 FATAL(
"Invalid configuration for random number generator " << seed << endl);
71 value[1] = gRandom->Integer(
MAX);
73 DEBUG(
"random[1]: " << value[1] << endl);
75 ASSERT(value[0] == value[1]);
General purpose messaging.
#define DEBUG(A)
Message macros.
#define ASSERT(A,...)
Assert macro.
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
int main(int argc, char **argv)
Utility class to parse command line options.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Template definition of random value generator.