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::WILDCARD acts as default value for the string number.
Definition at line 112 of file JMechanics.hh.
◆ anonymous enum
Enumerator |
---|
WILDCARD | wild card for string number.
|
Definition at line 115 of file JMechanics.hh.
@ WILDCARD
wild card for string number.
◆ getFilename()
static std::string JACOUSTICS::JDetectorMechanics::getFilename |
( |
const int |
id | ) |
|
|
inlinestatic |
Get file name with mechanical model parameters for given detector identifier.
- Parameters
-
- Returns
- file name
Definition at line 126 of file JMechanics.hh.
#define MAKE_STRING(A)
Make string.
Auxiliary data structure for sequence of same character.
◆ load() [1/2]
void JACOUSTICS::JDetectorMechanics::load |
( |
const std::string & |
file_name | ) |
|
|
inline |
Load mechanical model parameters from file.
- Parameters
-
Definition at line 137 of file JMechanics.hh.
139 std::ifstream in(file_name.c_str());
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Exception for opening of file.
◆ load() [2/2]
void JACOUSTICS::JDetectorMechanics::load |
( |
const int |
id | ) |
|
|
inline |
Load mechanical model parameters for given detector identifier.
- Parameters
-
Definition at line 156 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.
◆ operator()()
const JMechanics& JACOUSTICS::JDetectorMechanics::operator() |
( |
const int |
string | ) |
const |
|
inline |
Get mechanical parameters for given string.
- Parameters
-
- Returns
- mechanical parameters
Definition at line 168 of file JMechanics.hh.
174 if ((p = this->find(
string)) != this->end())
176 else if ((p = this->find(
WILDCARD)) != this->end())
Auxiliary data structure for parameters of mechanical model.
◆ operator>>
Read detector mechanics from input.
- Parameters
-
in | input stream |
object | detector mechanics |
- Returns
- input stream
Definition at line 190 of file JMechanics.hh.
202 is >>
object.comment;
207 while (is >>
string >> mechanics) {
208 object[string] = mechanics;
Wrapper class around STL stringstream class to facilitate optional loading of data from file.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
static JStat getFileStatus
Function object for file status.
◆ operator<<
Write detector mechanics to output.
- Parameters
-
out | output stream |
object | detector mechanics |
- Returns
- output stream
Definition at line 222 of file JMechanics.hh.
226 out <<
object.comment;
228 for (JDetectorMechanics::const_iterator i =
object.begin(); i !=
object.end(); ++i) {
229 out << setw(4) << i->first <<
' ' << i->second << endl;
◆ comment
JComment JACOUSTICS::JDetectorMechanics::comment |
The documentation for this struct was generated from the following file: