Jpp  19.1.0
the software that should make you happy
Functions
JPrintAttenuationLength.cc File Reference

Auxiliary program to print attenuation length. More...

#include <iostream>
#include <iomanip>
#include "JAcoustics/JAcousticsSupportkit.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 attenuation length.

Author
mdejong

Definition in file JPrintAttenuationLength.cc.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 16 of file JPrintAttenuationLength.cc.

17 {
18  using namespace std;
19  using namespace JPP;
20 
21  double D_m;
22  double f_kHz;
23  int debug;
24 
25  try {
26 
27  JParser<> zap("Auxiliary program to print attenuation length.");
28 
29  zap['D'] = make_field(D_m, "depth [m]");
30  zap['f'] = make_field(f_kHz, "frequency [kHz]");
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  cout << getAttenuationLength(D_m, f_kHz) << endl;
40 }
#define FATAL(A)
Definition: JMessage.hh:67
int debug
debug level
Definition: JSirene.cc:69
#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
static const JAttenuationLength getAttenuationLength(13.2, 38.0, 8.0)
Function object to calculate attenutation length.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition: JSTDTypes.hh:14