Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
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

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  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 }
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
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1961
int debug
debug level
Definition: JSirene.cc:63
Auxiliary data structure for sequence of same character.
Definition: JManip.hh:327
#define FATAL(A)
Definition: JMessage.hh:67
container_type::const_iterator const_iterator
Definition: JHashMap.hh:85
do set_variable DETECTOR_TXT $WORKDIR detector