Example program to test JTOOLS::JTuple class.
More...
#include <iostream>
#include <sstream>
#include <iomanip>
#include "JTools/JTuple.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
Example program to test JTOOLS::JTuple class.
- Author
- mdejong
Definition in file JTuple.cc.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 18 of file JTuple.cc.
27 JParser<> zap(
"Example program to test tuple class.");
33 catch(
const exception &error) {
34 FATAL(error.what() << endl);
41 JTuple<typelist>
A(+1, +2, +0.9999);
42 JTuple<typelist> B(-
A);
45 DEBUG(
A.second.first << endl);
46 DEBUG(
A.second.second << endl);
48 DEBUG(
"A = " << showpos <<
A << endl);
49 DEBUG(
"B = " << showpos << B << endl);
50 DEBUG(
"A + B = " << noshowpos <<
A+B << endl);
68 JTuple<typelist>
C = A + B;
70 DEBUG(
"A = " << A << endl);
71 DEBUG(
"B = " << B << endl);
72 DEBUG(
"A + B = " << C << endl);
75 ASSERT(C == JTuple<typelist>(
"aapnoot", 0),
"Test of A + B with std::string");
83 DEBUG(os.str() << endl);
85 ASSERT(os.str() ==
"1 aap 0.99",
"Test of JPP::make_tuple");
Utility class to parse command line options.
static const double C
Physics constants.
#define ASSERT(A,...)
Assert macro.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
then usage $script< input_file >< detector_file > fi set_variable OUTPUT_DIR set_variable SELECTOR JDAQTimesliceL1 set_variable DEBUG case set_variable DEBUG
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A