Jpp 19.3.0-rc.3
the software that should make you happy
Loading...
Searching...
No Matches
JZero.cc File Reference

Example program to test zero values (JMATH::zero). More...

#include <iostream>
#include <iomanip>
#include "JMath/JZero.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"

Go to the source code of this file.

Macros

#define PRINT(OUT, CLASS)
 

Functions

int main (int argc, char **argv)
 

Detailed Description

Example program to test zero values (JMATH::zero).

Author
mdejong

Definition in file JZero.cc.

Macro Definition Documentation

◆ PRINT

#define PRINT ( OUT,
CLASS )
Value:
print<CLASS>(OUT, #CLASS)
void print(const TH1 &h1, std::ostream &out)
Print histogram parameters.

Definition at line 87 of file JZero.cc.

Function Documentation

◆ main()

int main ( int argc,
char ** argv )

Definition at line 97 of file JZero.cc.

98{
99 using namespace std;
100
101 int debug;
102
103 try {
104
105 JParser<> zap("Example program to test zero values of non-primitive data types.");
106
107 zap['d'] = make_field(debug) = 3;
108
109 zap(argc, argv);
110 }
111 catch(const exception &error) {
112 FATAL(error.what() << endl);
113 }
114
115 using namespace JPP;
116
117 PRINT(cout, int);
118 PRINT(cout, float);
119 PRINT(cout, double);
120 PRINT(cout, __A__);
121
122 ASSERT(is_equal<int> (0));
123 ASSERT(is_equal<float> (0.0));
124 ASSERT(is_equal<double>(0.0));
125 ASSERT(is_equal<__A__> (__A__(0)));
126
127 return 0;
128}
#define ASSERT(A,...)
Assert macro.
Definition JMessage.hh:90
#define FATAL(A)
Definition JMessage.hh:67
int debug
debug level
Definition JSirene.cc:72
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition JParser.hh:2142
#define PRINT(OUT, CLASS)
Definition JZero.cc:87
Utility class to parse command line options.
Definition JParser.hh:1698
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).