18int main(
int argc,
char**argv)
30 JParser<> zap(
"Auxiliary program to print a random number according Poisson statistics or the Poisson probability."\
31 "\nIf the number of events is less than zero, the random number is printed, else the probability.");
33 zap[
'e'] =
make_field(value,
"expectation value");
34 zap[
'n'] =
make_field(n,
"number of events") = -1;
40 catch(
const exception &error) {
41 FATAL(error.what() << endl);
46 gRandom->SetSeed(seed);
48 cout << gRandom->Poisson(value) << endl;
52 cout <<
SCIENTIFIC(12,5) << poisson(n, value) << endl;
Auxiliary methods for mathematics.
General purpose messaging.
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Utility class to parse command line options.
int main(int argc, char **argv)
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for floating point format specification.