Gas mixture = mixture of gas components.
More...
#include <TRT_PAI_gasMixture.h>
|
| void | initMessaging () const |
| | Initialize our message level and MessageSvc.
|
Gas mixture = mixture of gas components.
Definition at line 18 of file TRT_PAI_gasMixture.h.
◆ TRT_PAI_gasMixture()
| TRT_PAI_gasMixture::TRT_PAI_gasMixture |
( |
const std::string & | nm | ) |
|
Construct gas mixture.
- Parameters
-
Definition at line 13 of file TRT_PAI_gasMixture.cxx.
13 :
17{};
AthMessaging()
Default constructor:
◆ addComponent()
Add gas component to gas mixture.
- Parameters
-
| pgc | pointer to gas component to be added |
| frac | fraction of this component in gas |
Definition at line 21 of file TRT_PAI_gasMixture.cxx.
21 {
23 ATH_MSG_ERROR(
"gasMixture::addComponent: cannot add new gasComponent "
24 "- gas already frozen");
25 return;
26 }
27
30 return;
31}
std::vector< TRT_PAI_gasComponent * > m_pcomp
std::vector< double > m_compFracs
◆ freezeGas()
| void TRT_PAI_gasMixture::freezeGas |
( |
| ) |
|
Components can be added to gas mixture before freezeGas is called.
After call, gas is frozen, and no more components can be added.
Definition at line 35 of file TRT_PAI_gasMixture.cxx.
35 {
37
39 double wtot = 0.;
40 for (int j=0; j<nComp; j++) {
43 "A gasComponent has non-positive fraction");
44 return;
45 }
47 }
48
49 if ( std::abs(wtot-1.) > 1e-5 ) {
51 "Gas fractions do not add to unity but " << wtot
52 << ". Re-normalizing!!");
53 }
54
55 for (int j=0; j<nComp; ++j ) {
57 }
58
60
61
62
65 wtot = 0.;
66 for (int j=0; j<nComp; j++) {
67 for(
int i=0;
i<
m_pcomp[j]->getNElementTypes();
i++) {
71 for (
unsigned int k=0;
k<
m_pelem.size();
k++ ) {
75 break;
76 }
77 }
78 if ( w>0. ) {
81 }
82 }
83 }
84 return;
85}
#define ATH_MSG_WARNING(x)
std::vector< double > m_elemWeights
std::vector< TRT_PAI_element * > m_pelem
◆ getCompFraction()
| double TRT_PAI_gasMixture::getCompFraction |
( |
unsigned int | n | ) |
|
◆ getComponent()
Get gas component no.
n of this gas mixture
- Parameters
-
Definition at line 112 of file TRT_PAI_gasMixture.cxx.
112 {
113
117 };
118
120}
◆ getElement()
Get element no.
n in this gas mixture
- Parameters
-
Definition at line 136 of file TRT_PAI_gasMixture.cxx.
136 {
137
139 ATH_MSG_ERROR(
"TRT_PAI_gasMixture::getElement: out of bounds");
141 };
142
144}
◆ getElemWeight()
| double TRT_PAI_gasMixture::getElemWeight |
( |
unsigned int | n | ) |
|
Get weight of element no.
n in this gas mixture
- Parameters
-
Definition at line 148 of file TRT_PAI_gasMixture.cxx.
148 {
149
151 ATH_MSG_ERROR(
"gasMixture::getElemFraction:Error:out of bounds");
152 return 0;
153 };
154
156}
◆ getName()
| const std::string & TRT_PAI_gasMixture::getName |
( |
| ) |
|
|
inline |
◆ getNComponents()
| int TRT_PAI_gasMixture::getNComponents |
( |
| ) |
|
|
inline |
Get number of different gas components in this gas mixture.
Definition at line 43 of file TRT_PAI_gasMixture.h.
◆ getNElements()
| int TRT_PAI_gasMixture::getNElements |
( |
| ) |
|
|
inline |
◆ initMessaging()
| void AthMessaging::initMessaging |
( |
| ) |
const |
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
40{
42
43 if (
m_lvl == MSG::NIL) {
47 }
48}
std::string m_nm
Message source name.
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
std::atomic< MSG::Level > m_lvl
Current logging level.
IMessageSvc * getMessageSvc(bool quiet=false)
◆ msg() [1/2]
| MsgStream & AthMessaging::msg |
( |
| ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 163 of file AthMessaging.h.
164{
166 if (!ms) {
170 }
171
174}
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
void initMessaging() const
Initialize our message level and MessageSvc.
◆ msg() [2/2]
| MsgStream & AthMessaging::msg |
( |
const MSG::Level | lvl | ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 178 of file AthMessaging.h.
179{
return msg() << lvl; }
MsgStream & msg() const
The standard message stream.
◆ msgLvl()
| bool AthMessaging::msgLvl |
( |
const MSG::Level | lvl | ) |
const |
|
inlineinherited |
Test the output level.
- Parameters
-
| lvl | The message level to test against |
- Returns
- boolean Indicating if messages at given level will be printed
- Return values
-
| true | Messages at level "lvl" will be printed |
Definition at line 151 of file AthMessaging.h.
152{
155 return true;
156 } else {
157 return false;
158 }
159}
◆ setLevel()
| void AthMessaging::setLevel |
( |
MSG::Level | lvl | ) |
|
|
inherited |
◆ showStructure()
| void TRT_PAI_gasMixture::showStructure |
( |
| ) |
|
Print out of structure of this gas mixture.
Definition at line 89 of file TRT_PAI_gasMixture.cxx.
89 {
90
92 ATH_MSG_WARNING(
"gasMixture::showStructure: Showing structure of non-frozen gas");
93 }
94
96
99 <<
m_pcomp[
i]->getName() <<
" consisting of: ";
100 for (
int j=0; j<
m_pcomp[
i]->getNElementTypes(); j++) {
101 if ( j>0 )
msg(MSG::INFO) <<
",";
102 msg(MSG::INFO) <<
" " <<
m_pcomp[
i]->getElementMultiplicity(j)
103 <<
" atoms " <<
m_pcomp[
i]->getElement(j)->getName();
104 }
106 }
107 return;
108}
◆ ATLAS_THREAD_SAFE
| std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
|
mutableprivateinherited |
◆ m_compFracs
| std::vector<double> TRT_PAI_gasMixture::m_compFracs |
|
private |
◆ m_elemWeights
| std::vector<double> TRT_PAI_gasMixture::m_elemWeights |
|
private |
◆ m_gasFrozen
| bool TRT_PAI_gasMixture::m_gasFrozen |
|
private |
◆ m_imsg
| std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr } |
|
mutableprivateinherited |
◆ m_lvl
| std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL } |
|
mutableprivateinherited |
◆ m_msg_tls
| boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls |
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
◆ m_name
| std::string TRT_PAI_gasMixture::m_name |
|
private |
◆ m_nm
| std::string AthMessaging::m_nm |
|
privateinherited |
◆ m_pcomp
◆ m_pelem
The documentation for this class was generated from the following files: