ATLAS Offline Software
Loading...
Searching...
No Matches
DetCondKeyTrans Class Reference

Class to hold set of HepGeom::Transform3D keyed by string value for storage in the conditions DB typically for holding top-level transforms for GeoModel/G4. More...

#include <DetCondKeyTrans.h>

Collaboration diagram for DetCondKeyTrans:

Public Types

typedef std::map< std::string, HepGeom::Transform3D > KeyTrans

Public Member Functions

 DetCondKeyTrans ()
virtual ~DetCondKeyTrans ()
void setTransform (const std::string &key, const HepGeom::Transform3D &trans)
bool getTransform (const std::string &key, HepGeom::Transform3D &result) const
bool exists (const std::string &key) const
void print () const
const KeyTranskeyTrans () const

Private Attributes

KeyTrans m_keytrans

Detailed Description

Class to hold set of HepGeom::Transform3D keyed by string value for storage in the conditions DB typically for holding top-level transforms for GeoModel/G4.

This class can be persistified (converters in DetDescrCondAthenaPool)

Author
Richard Hawkings, started 23/6/05

Definition at line 27 of file DetCondKeyTrans.h.

Member Typedef Documentation

◆ KeyTrans

typedef std::map<std::string,HepGeom::Transform3D> DetCondKeyTrans::KeyTrans

Definition at line 46 of file DetCondKeyTrans.h.

Constructor & Destructor Documentation

◆ DetCondKeyTrans()

DetCondKeyTrans::DetCondKeyTrans ( )

Definition at line 11 of file DetCondKeyTrans.cxx.

11 :
12 m_keytrans() {}

◆ ~DetCondKeyTrans()

DetCondKeyTrans::~DetCondKeyTrans ( )
inlinevirtual

Definition at line 62 of file DetCondKeyTrans.h.

62{}

Member Function Documentation

◆ exists()

bool DetCondKeyTrans::exists ( const std::string & key) const

Definition at line 25 of file DetCondKeyTrans.cxx.

25 {
26 KeyTrans::const_iterator ik=m_keytrans.find(key);
27 return (ik!=m_keytrans.end());
28}

◆ getTransform()

bool DetCondKeyTrans::getTransform ( const std::string & key,
HepGeom::Transform3D & result ) const

Definition at line 14 of file DetCondKeyTrans.cxx.

15 {
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}

◆ keyTrans()

const DetCondKeyTrans::KeyTrans & DetCondKeyTrans::keyTrans ( ) const

Definition at line 45 of file DetCondKeyTrans.cxx.

46{
47 return m_keytrans;
48}

◆ print()

void DetCondKeyTrans::print ( ) const

Definition at line 30 of file DetCondKeyTrans.cxx.

30 {
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}

◆ setTransform()

void DetCondKeyTrans::setTransform ( const std::string & key,
const HepGeom::Transform3D & trans )
inline

Definition at line 64 of file DetCondKeyTrans.h.

Member Data Documentation

◆ m_keytrans

KeyTrans DetCondKeyTrans::m_keytrans
private

Definition at line 51 of file DetCondKeyTrans.h.


The documentation for this class was generated from the following files: