Jpp 20.0.0-195-g190c9e876
the software that should make you happy
Loading...
Searching...
No Matches
JACOUSTICS::JDetectorMechanics_t Struct Reference

Auxiliary data structure for mechanical model parameters of strings in a given detector. More...

#include <JMechanics_t.hh>

Inheritance diagram for JACOUSTICS::JDetectorMechanics_t:
std::map< int, JMechanics > TObject JACOUSTICS::JDetectorMechanics

Public Types

enum  { WILDCARD = -1 }
 

Public Member Functions

const JMechanicsoperator() (const int string) const
 Get mechanical parameters for given string.
 
 ClassDef (JDetectorMechanics_t, 1)
 

Friends

std::ostream & operator<< (std::ostream &out, const JDetectorMechanics_t &object)
 Write detector mechanics to output.
 

Detailed Description

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 104 of file JMechanics_t.hh.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
WILDCARD 

wild card for string number.

Definition at line 108 of file JMechanics_t.hh.

108 {
109 WILDCARD = -1 //!< wild card for string number.
110 };
@ WILDCARD
wild card for string number.

Member Function Documentation

◆ operator()()

const JMechanics & JACOUSTICS::JDetectorMechanics_t::operator() ( const int string) const
inline

Get mechanical parameters for given string.

Parameters
stringstring number
Returns
mechanical parameters

Definition at line 119 of file JMechanics_t.hh.

120 {
121 static const JMechanics mechanics;
122
123 const_iterator p;
124
125 if ((p = this->find(string)) != this->end())
126 return p->second;
127 else if ((p = this->find(WILDCARD)) != this->end())
128 return p->second;
129 else
130 return mechanics;
131 }

◆ ClassDef()

JACOUSTICS::JDetectorMechanics_t::ClassDef ( JDetectorMechanics_t ,
1  )

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & out,
const JDetectorMechanics_t & object )
friend

Write detector mechanics to output.

Parameters
outoutput stream
objectdetector mechanics
Returns
output stream

Definition at line 141 of file JMechanics_t.hh.

142 {
143 using namespace std;
144
145 for (JDetectorMechanics_t::const_iterator i = object.begin(); i != object.end(); ++i) {
146 out << setw(4) << i->first << ' ' << i->second << endl;
147 }
148
149 return out;
150 }

The documentation for this struct was generated from the following file: