ATLAS Offline Software
Classes | Public Types | Public Member Functions | Private Attributes | Friends | List of all members
AlignableTransform Class Reference

#include <AlignableTransform.h>

Collaboration diagram for AlignableTransform:

Classes

class  AlignTransMember
 

Public Types

typedef std::vector< AlignTransMember >::const_iterator AlignTransMem_citr
 
typedef boost::iterator_range< AlignTransMem_citrAlignTransMem_crange
 
typedef std::vector< AlignTransMember >::iterator AlignTransMem_itr
 
typedef boost::iterator_range< AlignTransMem_itrAlignTransMem_range
 

Public Member Functions

 AlignableTransform ()
 
 AlignableTransform (const std::string &tag)
 
virtual ~AlignableTransform ()
 
AlignTransMem_citr begin () const
 
AlignTransMem_citr end () const
 
AlignTransMem_crange range () const
 
AlignTransMem_itr mbegin ()
 
AlignTransMem_itr mend ()
 
AlignTransMem_range mrange ()
 
AlignTransMem_citr findIdent (const Identifier &ident) const
 
AlignTransMem_itr findIdent (const Identifier &ident)
 
const std::string & tag () const
 
size_t size () const
 
void add (const Identifier &ident, const HepGeom::Transform3D &trans)
 
bool update (const Identifier &ident, const HepGeom::Transform3D &trans)
 
bool tweak (const Identifier &ident, const HepGeom::Transform3D &trans)
 
void print () const
 
void print2 () const
 
void sortv ()
 

Private Attributes

std::string m_tag
 
std::vector< AlignTransMemberm_vec
 

Friends

class AlignableTransformCnv_p1
 

Detailed Description

Definition at line 24 of file AlignableTransform.h.

Member Typedef Documentation

◆ AlignTransMem_citr

typedef std::vector<AlignTransMember>::const_iterator AlignableTransform::AlignTransMem_citr

Definition at line 46 of file AlignableTransform.h.

◆ AlignTransMem_crange

Definition at line 47 of file AlignableTransform.h.

◆ AlignTransMem_itr

Definition at line 51 of file AlignableTransform.h.

◆ AlignTransMem_range

Definition at line 52 of file AlignableTransform.h.

Constructor & Destructor Documentation

◆ AlignableTransform() [1/2]

AlignableTransform::AlignableTransform ( )
inline

Definition at line 98 of file AlignableTransform.h.

99  : m_tag ("null")
100 {}

◆ AlignableTransform() [2/2]

AlignableTransform::AlignableTransform ( const std::string &  tag)

Definition at line 12 of file AlignableTransform.cxx.

12  :
13  m_tag(tag), m_vec()
14 {}

◆ ~AlignableTransform()

AlignableTransform::~AlignableTransform ( )
inlinevirtual

Definition at line 101 of file AlignableTransform.h.

101 {}

Member Function Documentation

◆ add()

void AlignableTransform::add ( const Identifier ident,
const HepGeom::Transform3D &  trans 
)

Definition at line 16 of file AlignableTransform.cxx.

18 {
19  m_vec.emplace_back(ident,trans);
20 }

◆ begin()

AlignableTransform::AlignTransMem_citr AlignableTransform::begin ( ) const
inline

Definition at line 104 of file AlignableTransform.h.

104 { return m_vec.begin();}

◆ end()

AlignableTransform::AlignTransMem_citr AlignableTransform::end ( ) const
inline

Definition at line 106 of file AlignableTransform.h.

106 { return m_vec.end();}

◆ findIdent() [1/2]

AlignableTransform::AlignTransMem_itr AlignableTransform::findIdent ( const Identifier ident)
inline

Definition at line 127 of file AlignableTransform.h.

127  {
129  AlignableTransform::AlignTransMem_itr rc=std::lower_bound(m_vec.begin(),m_vec.end(),obj);
130  if (rc!=m_vec.end() && rc->identify()!=ident) rc=m_vec.end();
131  return rc;
132 }

◆ findIdent() [2/2]

AlignableTransform::AlignTransMem_citr AlignableTransform::findIdent ( const Identifier ident) const
inline

Definition at line 118 of file AlignableTransform.h.

118  {
120  AlignableTransform::AlignTransMem_citr rc=std::lower_bound(m_vec.begin(),m_vec.end(),obj);
121  if (rc!=m_vec.end() && rc->identify()!=ident) rc=m_vec.end();
122  return rc;
123 }

◆ mbegin()

AlignableTransform::AlignTransMem_itr AlignableTransform::mbegin ( )
inline

Definition at line 111 of file AlignableTransform.h.

111 { return m_vec.begin();}

◆ mend()

AlignableTransform::AlignTransMem_itr AlignableTransform::mend ( )
inline

Definition at line 113 of file AlignableTransform.h.

113 { return m_vec.end();}

◆ mrange()

AlignableTransform::AlignTransMem_range AlignableTransform::mrange ( )
inline

Definition at line 115 of file AlignableTransform.h.

115 { return AlignTransMem_range(mbegin(), mend()); }

◆ print()

void AlignableTransform::print ( ) const

Definition at line 22 of file AlignableTransform.cxx.

22  {
23  std::cout << "AlignableTransform::print tagname:" << m_tag <<
24  " vector size " << m_vec.size() << std::endl;
25 }

◆ print2()

void AlignableTransform::print2 ( ) const

Definition at line 27 of file AlignableTransform.cxx.

27  {
28  print();
29  int i=0;
30  CLHEP::Hep3Vector trans;
31  for (AlignTransMem_citr cit=begin(); cit!=end(); ++cit) {
32  trans=(cit->transform()).getTranslation();
33  std::cout << "Member " << i++ << " transl [" << trans.x()*1.E3 << "," <<
34  trans.y()*1.E3 << "," << trans.z()*1.E3 << "]" << " ID: " <<
35  cit->identify().getString() << std::endl;
36  }
37 }

◆ range()

AlignableTransform::AlignTransMem_crange AlignableTransform::range ( ) const
inline

Definition at line 108 of file AlignableTransform.h.

108 { return AlignTransMem_crange(begin(), end()); }

◆ size()

size_t AlignableTransform::size ( ) const
inline

Definition at line 136 of file AlignableTransform.h.

136 {return m_vec.size();}

◆ sortv()

void AlignableTransform::sortv ( )
inline

Definition at line 138 of file AlignableTransform.h.

138  {
139  sort(m_vec.begin(),m_vec.end()); }

◆ tag()

const std::string & AlignableTransform::tag ( ) const
inline

Definition at line 134 of file AlignableTransform.h.

134 {return m_tag;}

◆ tweak()

bool AlignableTransform::tweak ( const Identifier ident,
const HepGeom::Transform3D &  trans 
)

Definition at line 48 of file AlignableTransform.cxx.

50 {
52  if (itr==m_vec.end()) return false;
53  HepGeom::Transform3D newtrans=trans*(itr->transform());
54  itr->setTransform(newtrans);
55  return true;
56 }

◆ update()

bool AlignableTransform::update ( const Identifier ident,
const HepGeom::Transform3D &  trans 
)

Definition at line 39 of file AlignableTransform.cxx.

41 {
43  if (itr==m_vec.end()) return false;
44  itr->setTransform(trans);
45  return true;
46 }

Friends And Related Function Documentation

◆ AlignableTransformCnv_p1

friend class AlignableTransformCnv_p1
friend

Definition at line 75 of file AlignableTransform.h.

Member Data Documentation

◆ m_tag

std::string AlignableTransform::m_tag
private

Definition at line 76 of file AlignableTransform.h.

◆ m_vec

std::vector<AlignTransMember> AlignableTransform::m_vec
private

Definition at line 77 of file AlignableTransform.h.


The documentation for this class was generated from the following files:
AlignableTransform::AlignTransMem_citr
std::vector< AlignTransMember >::const_iterator AlignTransMem_citr
Definition: AlignableTransform.h:46
std::sort
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:554
AlignableTransform::tag
const std::string & tag() const
Definition: AlignableTransform.h:134
AlignableTransform::m_tag
std::string m_tag
Definition: AlignableTransform.h:76
lumiFormat.i
int i
Definition: lumiFormat.py:85
AlignableTransform::end
AlignTransMem_citr end() const
Definition: AlignableTransform.h:106
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
AlignableTransform::print
void print() const
Definition: AlignableTransform.cxx:22
AlignableTransform::AlignTransMem_itr
std::vector< AlignTransMember >::iterator AlignTransMem_itr
Definition: AlignableTransform.h:51
TRT::Hit::ident
@ ident
Definition: HitInfo.h:77
AlignableTransform::findIdent
AlignTransMem_citr findIdent(const Identifier &ident) const
Definition: AlignableTransform.h:118
AlignableTransform::AlignTransMember
Definition: AlignableTransform.h:32
AlignableTransform::AlignTransMem_crange
boost::iterator_range< AlignTransMem_citr > AlignTransMem_crange
Definition: AlignableTransform.h:47
AlignableTransform::mend
AlignTransMem_itr mend()
Definition: AlignableTransform.h:113
AlignableTransform::AlignTransMem_range
boost::iterator_range< AlignTransMem_itr > AlignTransMem_range
Definition: AlignableTransform.h:52
AlignableTransform::begin
AlignTransMem_citr begin() const
Definition: AlignableTransform.h:104
python.PyAthena.obj
obj
Definition: PyAthena.py:132
python.trfValidateRootFile.rc
rc
Definition: trfValidateRootFile.py:349
AlignableTransform::m_vec
std::vector< AlignTransMember > m_vec
Definition: AlignableTransform.h:77
AlignableTransform::mbegin
AlignTransMem_itr mbegin()
Definition: AlignableTransform.h:111