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.
 | 
| int  | main (int argc, char **argv) | 
|   | 
Auxiliary program to print mechanical constants. 
- Author
 - mdejong 
 
Definition in file JPrintMechanics.cc.
 
◆ main()
      
        
          | int main  | 
          ( | 
          int |           argc,  | 
        
        
           | 
           | 
          char ** |           argv ) | 
        
      
 
Definition at line 18 of file JPrintMechanics.cc.
   19{
   22 
   23  int    string;
   24  int    id;
   26 
   27  try {
   28 
   29    JParser<> zap(
"Auxiliary program to print mechanical constants."); 
 
   30 
   32    zap[
'S'] = 
make_field(
string,          
"string number")                  = 0;
 
   33    zap[
'D'] = 
make_field(
id,              
"detector identifier")            = 0;
 
   35 
   36    zap(argc, argv);
   37  }
   38  catch(const exception &error) {
   39    FATAL(error.what() << endl);
 
   40  }
   41 
   42 
   43  if (id != 0) {
   44 
   45    DEBUG(
"Load mechanical model parameters from file: " << JDetectorMechanics::getFilename(
id) << endl);
 
   46 
   47    getMechanics.load(id);
   48  }
   49 
   50  if (string != 0)
   51    cout << setw(4) << string << ' ' << getMechanics(string) << endl;
   52  else
   53    cout << getMechanics << endl;
   54}
#define DEBUG(A)
Message macros.
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
 
Utility class to parse command line options.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 
Empty structure for specification of parser element that is initialised (i.e. does not require input)...