Jpp 20.0.0-195-g190c9e876
the software that should make you happy
Loading...
Searching...
No Matches
JPrintMechanics.cc File Reference

Auxiliary program to print mechanical constants. More...

#include <iostream>
#include <iomanip>
#include <vector>
#include "JAcoustics/JMechanics.hh"
#include "Jeep/JPrint.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Detailed Description

Auxiliary program to print mechanical constants.

Author
mdejong

Definition in file JPrintMechanics.cc.

Function Documentation

◆ main()

int main ( int argc,
char ** argv )

Definition at line 18 of file JPrintMechanics.cc.

19{
20 using namespace std;
21 using namespace JPP;
22
23 JDetectorMechanics mechanics;
24 int string;
25 int debug;
26
27 try {
28
29 JParser<> zap("Auxiliary program to print mechanical constants.");
30
31 zap['M'] = make_field(mechanics, "mechanics data") = JPARSER::initialised();
32 zap['S'] = make_field(string, "string number") = 0;
33 zap['d'] = make_field(debug) = 1;
34
35 zap(argc, argv);
36 }
37 catch(const exception &error) {
38 FATAL(error.what() << endl);
39 }
40
41 if (string != 0)
42 cout << setw(4) << string << ' ' << mechanics(string) << endl;
43 else
44 cout << mechanics << endl;
45}
#define FATAL(A)
Definition JMessage.hh:67
int debug
debug level
Definition JSirene.cc:74
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition JParser.hh:2142
Utility class to parse command line options.
Definition JParser.hh:1698
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for mechanical model parameters with commented data.
Definition JMechanics.hh:38
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Definition JParser.hh:68