Jpp
17.3.1
the software that should make you happy
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
software
JAcoustics
JPrintMechanics.cc
Go to the documentation of this file.
1
#include <iostream>
2
#include <iomanip>
3
#include <vector>
4
5
#include "
JAcoustics/JMechanics.hh
"
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
string
;
24
int
id;
25
int
debug
;
26
27
try
{
28
29
JParser<>
zap(
"Auxiliary program to print mechanical constants."
);
30
31
zap[
'M'
] =
make_field
(
getMechanics
,
"mechanics data"
) =
JPARSER::initialised
();
32
zap[
'S'
] =
make_field
(
string
,
"string number"
) = 0;
33
zap[
'D'
] =
make_field
(
id
,
"detector identifier"
) = 0;
34
zap[
'd'
] =
make_field
(
debug
) = 1;
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
}
JMechanics.hh
Mechanical modelling of string.
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1517
main
int main(int argc, char *argv[])
Definition:
Main.cc:15
JACOUSTICS::getMechanics
static JDetectorMechanics getMechanics
Function object to get string mechanics.
Definition:
JMechanics.hh:243
JPARSER::initialised
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Definition:
JParser.hh:83
JPrint.hh
I/O formatting auxiliaries.
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition:
JParser.hh:1993
string
then awk string
Definition:
pre-calibration.sh:45
JACOUSTICS::JDetectorMechanics::load
void load(const std::string &file_name)
Load mechanical model parameters from file.
Definition:
JMechanics.hh:142
JMessage.hh
General purpose messaging.
FATAL
#define FATAL(A)
Definition:
JMessage.hh:67
JParser.hh
Utility class to parse command line options.
JEEP::getFilename
std::string getFilename(const std::string &file_name)
Get file name part, i.e. part after last JEEP::PATHNAME_SEPARATOR if any.
Definition:
JeepToolkit.hh:128
debug
int debug
debug level
Definition:
archive-put-wiki-detectors.sh:92
DEBUG
#define DEBUG(A)
Message macros.
Definition:
JMessage.hh:62
Generated by
1.8.5