ATLAS Offline Software
|
This class provides a simple interface to write Matricis to a root tree The size of the Matrix cannot exceed COLMAX x ROWMAX. More...
#include <MatrixNtupleBranch.h>
Public Member Functions | |
bool | initForWrite (TTree &tree, const std::string &varname, int ncol, int nrow, const std::string &prefix="") |
initialize class for writing More... | |
bool | initForRead (TTree &tree, const std::string &varname, int ncol, int nrow, const std::string &prefix="") |
initialize class for reading More... | |
bool | fill (const Amg::MatrixX &matrix) |
fill a vector More... | |
bool | fill (const HepGeom::Rotate3D &matrix) |
fill a vector More... | |
Public Attributes | |
int | m_nrows {-1} |
int | m_ncols {-1} |
float | m_matrix [COLMAX][ROWMAX] {} |
Static Public Attributes | |
static const int | COLMAX = 10 |
data More... | |
static const int | ROWMAX = 10 |
This class provides a simple interface to write Matricis to a root tree The size of the Matrix cannot exceed COLMAX x ROWMAX.
The class requires all matrices to have the same size
Usage:
TTree* myTree = new TTree("data","data"); MatrixNtupleBranch branch; branch.initForWrite(*myTree,"vec",3,"");
for(int i=0;i<n;++i){ branch.fill( ); myTree->Fill(); }
Definition at line 33 of file MatrixNtupleBranch.h.
bool Trk::MatrixNtupleBranch::fill | ( | const Amg::MatrixX & | matrix | ) |
bool Trk::MatrixNtupleBranch::fill | ( | const HepGeom::Rotate3D & | matrix | ) |
fill a vector
Definition at line 57 of file MatrixNtupleBranch.cxx.
bool Trk::MatrixNtupleBranch::initForRead | ( | TTree & | tree, |
const std::string & | varname, | ||
int | ncol, | ||
int | nrow, | ||
const std::string & | prefix = "" |
||
) |
bool Trk::MatrixNtupleBranch::initForWrite | ( | TTree & | tree, |
const std::string & | varname, | ||
int | ncol, | ||
int | nrow, | ||
const std::string & | prefix = "" |
||
) |
|
static |
data
Definition at line 48 of file MatrixNtupleBranch.h.
Definition at line 52 of file MatrixNtupleBranch.h.
int Trk::MatrixNtupleBranch::m_ncols {-1} |
Definition at line 51 of file MatrixNtupleBranch.h.
int Trk::MatrixNtupleBranch::m_nrows {-1} |
Definition at line 50 of file MatrixNtupleBranch.h.
|
static |
Definition at line 49 of file MatrixNtupleBranch.h.