ATLAS Offline Software
|
This class provides a simple interface to write Vectors to a root tree The size of the vectors cannot exceed ROWMAX. More...
#include <VectorNtupleBranch.h>
Public Member Functions | |
bool | initForWrite (TTree &tree, const std::string &varname, int nrow, const std::string &prefix="") |
initialize class for writing More... | |
bool | initForRead (TTree &tree, const std::string &varname, int nrow, const std::string &prefix="") |
initialize class for reading More... | |
bool | fill (const Amg::VectorX &matrix) |
fill a vector More... | |
bool | fill (const CLHEP::HepVector &vec) |
fill a vector More... | |
bool | fill (const CLHEP::Hep3Vector &vec) |
fill a vector More... | |
bool | fill (const HepGeom::Point3D< double > &vec) |
fill a vector More... | |
bool | fill (const HepGeom::Vector3D< double > &vec) |
fill a vector More... | |
Public Attributes | |
int | m_nrows {-1} |
float | m_vector [ROWMAX] {} |
Static Public Attributes | |
static const int | ROWMAX = 10 |
maximum size of the vector More... | |
This class provides a simple interface to write Vectors to a root tree The size of the vectors cannot exceed ROWMAX.
The class requires all vectors to have the same size
Usage:
TTree* myTree = new TTree("data","data"); VectorNtupleBranch branch; branch.initForWrite(*myTree,"vec",3,"");
for(int i=0;i<n;++i){ branch.fill( ); myTree->Fill(); }
Definition at line 34 of file VectorNtupleBranch.h.
bool Trk::VectorNtupleBranch::fill | ( | const Amg::VectorX & | matrix | ) |
bool Trk::VectorNtupleBranch::fill | ( | const CLHEP::Hep3Vector & | vec | ) |
bool Trk::VectorNtupleBranch::fill | ( | const CLHEP::HepVector & | vec | ) |
bool Trk::VectorNtupleBranch::fill | ( | const HepGeom::Point3D< double > & | vec | ) |
bool Trk::VectorNtupleBranch::fill | ( | const HepGeom::Vector3D< double > & | vec | ) |
bool Trk::VectorNtupleBranch::initForRead | ( | TTree & | tree, |
const std::string & | varname, | ||
int | nrow, | ||
const std::string & | prefix = "" |
||
) |
initialize class for reading
Definition at line 22 of file VectorNtupleBranch.cxx.
bool Trk::VectorNtupleBranch::initForWrite | ( | TTree & | tree, |
const std::string & | varname, | ||
int | nrow, | ||
const std::string & | prefix = "" |
||
) |
initialize class for writing
Definition at line 10 of file VectorNtupleBranch.cxx.
int Trk::VectorNtupleBranch::m_nrows {-1} |
Definition at line 59 of file VectorNtupleBranch.h.
float Trk::VectorNtupleBranch::m_vector[ROWMAX] {} |
Definition at line 60 of file VectorNtupleBranch.h.
|
static |
maximum size of the vector
Definition at line 58 of file VectorNtupleBranch.h.