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

Example program to test JLANG::JConstructor class. More...

#include <iostream>
#include <iomanip>
#include "JLang/JConstructor.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"

Go to the source code of this file.

Macros

#define PRINT(OUT, U, V)
 Print class parameters.
 

Functions

int main (int argc, char **argv)
 

Detailed Description

Example program to test JLANG::JConstructor class.

Author
mdejong

Definition in file JConstructor.cc.

Macro Definition Documentation

◆ PRINT

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

Print class parameters.

Parameters
OUToutput stream
Uclass
Vclass

Definition at line 46 of file JConstructor.cc.

Function Documentation

◆ main()

int main ( int argc,
char ** argv )

Definition at line 55 of file JConstructor.cc.

56{
57 using namespace std;
58 using namespace JPP;
59
60 int debug;
61
62 try {
63
64 JParser<> zap("Example program to test class inspection.");
65
66 zap['d'] = make_field(debug) = 3;
67
68 zap(argc, argv);
69 }
70 catch(const exception &error) {
71 FATAL(error.what() << endl);
72 }
73
74 if (debug >= debug_t) {
75
76 cout << setw(16) << left << "name";
77 cout << " has constructor ";
78 cout << endl;
79
80 PRINT(cout, __A__, __A__);
81 PRINT(cout, __C__, __A__);
82 PRINT(cout, __C__, __B__);
83 }
84
88}
#define PRINT(OUT, U, V)
Print class parameters.
#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
Template class test for availability of a suitable constructor JType_t(const JArgument_t).
Utility class to parse command line options.
Definition JParser.hh:1698
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).