ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
Trk::TransformNtupleBranch Struct Reference

This class provides a simple interface to write Transforms to a root tree. More...

#include <TransformNtupleBranch.h>

Collaboration diagram for Trk::TransformNtupleBranch:

Public Member Functions

void initForWrite (TTree &tree, const std::string &prefix="")
 initialize class for writing More...
 
void initForRead (TTree &tree, const std::string &prefix="")
 initialize class for reading More...
 
void fill (const Amg::Transform3D &transform)
 fill a transform More...
 
void fill (const HepGeom::Transform3D &transform)
 fill a transform More...
 

Public Attributes

MatrixNtupleBranch m_rotation
 data More...
 
VectorNtupleBranch m_translation
 

Detailed Description

This class provides a simple interface to write Transforms to a root tree.

Usage:

TTree* myTree = new TTree("data","data"); TransformNtupleBranch branch; branch.initForWrite(*myTree,"");

for(int i=0;i<n;++i){ branch.fill( ); myTree->Fill(); }

Definition at line 34 of file TransformNtupleBranch.h.

Member Function Documentation

◆ fill() [1/2]

void Trk::TransformNtupleBranch::fill ( const Amg::Transform3D transform)

fill a transform

Definition at line 24 of file TransformNtupleBranch.cxx.

24  {
25  Amg::Vector3D translation = transform.translation();
27 
29  m_translation.fill(translation);
30  }

◆ fill() [2/2]

void Trk::TransformNtupleBranch::fill ( const HepGeom::Transform3D &  transform)

fill a transform

Definition at line 32 of file TransformNtupleBranch.cxx.

32  {
33  m_rotation.fill(transform.getRotation());
34  m_translation.fill(transform.getTranslation());
35  }

◆ initForRead()

void Trk::TransformNtupleBranch::initForRead ( TTree &  tree,
const std::string &  prefix = "" 
)

initialize class for reading

Definition at line 17 of file TransformNtupleBranch.cxx.

17  {
18  m_rotation.initForRead(tree,"rot",3,3,prefix);
20  }

◆ initForWrite()

void Trk::TransformNtupleBranch::initForWrite ( TTree &  tree,
const std::string &  prefix = "" 
)

initialize class for writing

Definition at line 12 of file TransformNtupleBranch.cxx.

12  {
15  }

Member Data Documentation

◆ m_rotation

MatrixNtupleBranch Trk::TransformNtupleBranch::m_rotation

data

Definition at line 49 of file TransformNtupleBranch.h.

◆ m_translation

VectorNtupleBranch Trk::TransformNtupleBranch::m_translation

Definition at line 50 of file TransformNtupleBranch.h.


The documentation for this struct was generated from the following files:
Trk::TransformNtupleBranch::m_rotation
MatrixNtupleBranch m_rotation
data
Definition: TransformNtupleBranch.h:49
Trk::MatrixNtupleBranch::fill
bool fill(const Amg::MatrixX &matrix)
fill a vector
Definition: MatrixNtupleBranch.cxx:44
tree
TChain * tree
Definition: tile_monitor.h:30
Trk::VectorNtupleBranch::initForRead
bool initForRead(TTree &tree, const std::string &varname, int nrow, const std::string &prefix="")
initialize class for reading
Definition: VectorNtupleBranch.cxx:22
Trk::VectorNtupleBranch::initForWrite
bool initForWrite(TTree &tree, const std::string &varname, int nrow, const std::string &prefix="")
initialize class for writing
Definition: VectorNtupleBranch.cxx:10
Trk::VectorNtupleBranch::fill
bool fill(const Amg::VectorX &matrix)
fill a vector
Definition: VectorNtupleBranch.cxx:34
xAOD::rotation
rotation
Definition: TrackSurface_v1.cxx:15
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
Trk::TransformNtupleBranch::m_translation
VectorNtupleBranch m_translation
Definition: TransformNtupleBranch.h:50
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::MatrixNtupleBranch::initForWrite
bool initForWrite(TTree &tree, const std::string &varname, int ncol, int nrow, const std::string &prefix="")
initialize class for writing
Definition: MatrixNtupleBranch.cxx:10
Amg::RotationMatrix3D
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
Definition: GeoPrimitives.h:49
Trk::MatrixNtupleBranch::initForRead
bool initForRead(TTree &tree, const std::string &varname, int ncol, int nrow, const std::string &prefix="")
initialize class for reading
Definition: MatrixNtupleBranch.cxx:27