ATLAS Offline Software
Loading...
Searching...
No Matches
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>
10
13
14bool 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
25bool DetCondKeyTrans::exists(const std::string& key) const {
26 KeyTrans::const_iterator ik=m_keytrans.find(key);
27 return (ik!=m_keytrans.end());
28}
29
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
46{
47 return m_keytrans;
48}
49
bool exists(const std::string &key) const
const KeyTrans & keyTrans() const
bool getTransform(const std::string &key, HepGeom::Transform3D &result) const
std::map< std::string, HepGeom::Transform3D > KeyTrans