Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JPrintMechanics.cc
Go to the documentation of this file.
1 #include <iostream>
2 #include <iomanip>
3 #include <vector>
4 
6 
7 #include "Jeep/JPrint.hh"
8 #include "Jeep/JParser.hh"
9 #include "Jeep/JMessage.hh"
10 
11 
12 /**
13  * \file
14  *
15  * Auxiliary program to print mechanical constants.
16  * \author mdejong
17  */
18 int main(int argc, char **argv)
19 {
20  using namespace std;
21  using namespace JPP;
22 
23  int detector;
24  int debug;
25 
26  try {
27 
28  JParser<> zap("Auxiliary program to print mechanical constants.");
29 
30  zap['D'] = make_field(detector);
31  zap['d'] = make_field(debug) = 1;
32 
33  zap(argc, argv);
34  }
35  catch(const exception &error) {
36  FATAL(error.what() << endl);
37  }
38 
39 
41 
42  cout << detector << endl;
43 
44  cout << "default " << parameters.mechanics << endl;
45 
46  for (JDetectorMechanics<>::const_iterator i = parameters.begin(); i != parameters.end(); ++i) {
47  cout << "string " << FILL(4, '0') << i->first << FILL() << ' ' << i->second << endl;
48  }
49 }
Mechanical modelling of string.
Utility class to parse command line options.
Definition: JParser.hh:1500
*fatal Wrong number of arguments esac JCookie sh typeset Z DETECTOR typeset Z SOURCE_RUN typeset Z TARGET_RUN set_variable PARAMETERS_FILE $WORKDIR parameters
Definition: diff-Tuna.sh:38
JACOUSTICS::JGetMechanics getMechanics
I/O formatting auxiliaries.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1961
int debug
debug level
Definition: JSirene.cc:63
General purpose messaging.
Auxiliary data structure for sequence of same character.
Definition: JManip.hh:327
#define FATAL(A)
Definition: JMessage.hh:67
Utility class to parse command line options.
container_type::const_iterator const_iterator
Definition: JHashMap.hh:85
do set_variable DETECTOR_TXT $WORKDIR detector
int main(int argc, char *argv[])
Definition: Main.cpp:15