ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
DetectorDescription
DetDescrCond
DetDescrConditions
src
DetCondKeyTrans.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// DetCondKeyTrans.cxx - set of HepGeom::Transform3Ds keyed by string
6
// Richard Hawkings, started 23/6/05
7
8
#include <iostream>
9
#include "
DetDescrConditions/DetCondKeyTrans.h
"
10
11
DetCondKeyTrans::DetCondKeyTrans
() :
12
m_keytrans
() {}
13
14
bool
DetCondKeyTrans::getTransform
(
const
std::string& key,
15
HepGeom::Transform3D& result)
const
{
16
KeyTrans::const_iterator ik=
m_keytrans
.find(key);
17
if
(ik!=
m_keytrans
.end()) {
18
result=(ik->second);
19
return
true
;
20
}
else
{
21
return
false
;
22
}
23
}
24
25
bool
DetCondKeyTrans::exists
(
const
std::string& key)
const
{
26
KeyTrans::const_iterator ik=
m_keytrans
.find(key);
27
return
(ik!=
m_keytrans
.end());
28
}
29
30
void
DetCondKeyTrans::print
()
const
{
31
for
(KeyTrans::const_iterator ik=
m_keytrans
.begin(); ik!=
m_keytrans
.end();
32
++ik) {
33
CLHEP::Hep3Vector trans=ik->second.getTranslation();
34
CLHEP::HepRotation rot=ik->second.getRotation();
35
std::cout <<
"Dump DetCondKeyTrans object:"
<< std::endl;
36
std::cout <<
"Key "
<< ik->first <<
" transl ["
<< trans.x()
37
<<
","
<< trans.y() <<
","
<< trans.z() <<
"] rotation ("
38
<< rot.phi() <<
","
<< rot.theta() <<
","
<< rot.psi() <<
")"
39
<< std::endl;
40
}
41
}
42
43
44
const
DetCondKeyTrans::KeyTrans
&
45
DetCondKeyTrans::keyTrans
()
const
46
{
47
return
m_keytrans
;
48
}
49
DetCondKeyTrans.h
DetCondKeyTrans::exists
bool exists(const std::string &key) const
Definition
DetCondKeyTrans.cxx:25
DetCondKeyTrans::keyTrans
const KeyTrans & keyTrans() const
Definition
DetCondKeyTrans.cxx:45
DetCondKeyTrans::m_keytrans
KeyTrans m_keytrans
Definition
DetCondKeyTrans.h:51
DetCondKeyTrans::getTransform
bool getTransform(const std::string &key, HepGeom::Transform3D &result) const
Definition
DetCondKeyTrans.cxx:14
DetCondKeyTrans::KeyTrans
std::map< std::string, HepGeom::Transform3D > KeyTrans
Definition
DetCondKeyTrans.h:46
DetCondKeyTrans::print
void print() const
Definition
DetCondKeyTrans.cxx:30
DetCondKeyTrans::DetCondKeyTrans
DetCondKeyTrans()
Definition
DetCondKeyTrans.cxx:11
Generated on
for ATLAS Offline Software by
1.17.0