Auxiliary data structure for mechanical model parameters of strings in a given detector.
More...
#include <JMechanics.hh>
|
void | load (const std::string &file_name) |
| Load mechanical model parameters from file. More...
|
|
void | load (const int id) |
| Load mechanical model parameters for given detector identifier. More...
|
|
const JMechanics & | operator() (const int string) const |
| Get mechanical parameters for given string. More...
|
|
|
static std::string | getFilename (const int id) |
| Get file name with mechanical model parameters for given detector identifier. More...
|
|
Auxiliary data structure for mechanical model parameters of strings in a given detector.
Note that the JDetectorMechanics::WILD_CARD acts as default value for the string number.
Definition at line 110 of file JMechanics.hh.
Enumerator |
---|
WILD_CARD |
wild card for string number.
|
Definition at line 113 of file JMechanics.hh.
wild card for string number.
static std::string JACOUSTICS::JDetectorMechanics::getFilename |
( |
const int |
id | ) |
|
|
inlinestatic |
Get file name with mechanical model parameters for given detector identifier.
Note that the environment variable LD_LIBRARY_PATH is used to obtain the path of the targeted file.
- Parameters
-
- Returns
- file name
Definition at line 126 of file JMechanics.hh.
131 const string file_name =
MAKE_STRING(
"mechanics_" <<
FILL(8,
'0') <<
id <<
".txt");
static const char *const LD_LIBRARY_PATH
Nick names of environment variables.
#define MAKE_STRING(A)
Make string.
Auxiliary data structure for sequence of same character.
std::string getFullFilename(const std::string &variable, const std::string &file_name)
Get full file name (see JEEP::getPath).
void JACOUSTICS::JDetectorMechanics::load |
( |
const std::string & |
file_name | ) |
|
|
inline |
Load mechanical model parameters from file.
- Parameters
-
Definition at line 142 of file JMechanics.hh.
144 std::ifstream
in(file_name.c_str());
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
void JACOUSTICS::JDetectorMechanics::load |
( |
const int |
id | ) |
|
|
inline |
Load mechanical model parameters for given detector identifier.
- Parameters
-
Definition at line 157 of file JMechanics.hh.
void load(const std::string &file_name)
Load mechanical model parameters from file.
static std::string getFilename(const int id)
Get file name with mechanical model parameters for given detector identifier.
const JMechanics& JACOUSTICS::JDetectorMechanics::operator() |
( |
const int |
string | ) |
const |
|
inline |
Get mechanical parameters for given string.
- Parameters
-
- Returns
- mechanical parameters
Definition at line 169 of file JMechanics.hh.
175 if ((p = this->find(
string)) != this->end())
177 else if ((p = this->find(
WILD_CARD)) != this->end())
wild card for string number.
Auxiliary data structure for parameters of mechanical model.
Read detector mechanics from input.
- Parameters
-
in | input stream |
object | detector mechanics |
- Returns
- input stream
Definition at line 191 of file JMechanics.hh.
195 JStringStream
is(
in);
203 is >>
object.comment;
208 while (
is >>
string >> mechanics) {
209 object[string] = mechanics;
static JStat getFileStatus
Function object for file status.
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
Auxiliary data structure for parameters of mechanical model.
Write detector mechanics to output.
- Parameters
-
out | output stream |
object | detector mechanics |
- Returns
- output stream
Definition at line 223 of file JMechanics.hh.
227 out <<
object.comment;
229 for (JDetectorMechanics::const_iterator i =
object.begin(); i !=
object.end(); ++i) {
230 out << setw(4) << i->first <<
' ' << i->second << endl;
JComment JACOUSTICS::JDetectorMechanics::comment |
The documentation for this struct was generated from the following file: