ATLAS Offline Software
MatrixNtupleBranch.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRK_MATRIXNTUPLEBRANCH_H
6 #define TRK_MATRIXNTUPLEBRANCH_H
7 
8 #include <string>
9 class TTree;
10 
12 #include "CLHEP/Geometry/Transform3D.h"
13 
14 namespace Trk {
15 
34 
36  bool initForWrite(TTree& tree, const std::string& varname, int ncol, int nrow, const std::string& prefix = "" );
37 
39  bool initForRead(TTree& tree, const std::string& varname, int ncol, int nrow, const std::string& prefix = "" );
40 
42  bool fill( const Amg::MatrixX& matrix );
43 
45  bool fill( const HepGeom::Rotate3D& matrix );
46 
48  static const int COLMAX = 10;
49  static const int ROWMAX = 10;
50  int m_nrows{-1};
51  int m_ncols{-1};
52  float m_matrix[COLMAX][ROWMAX]{};
53  };
54 
55 }
56 
57 #endif
Trk::MatrixNtupleBranch::COLMAX
static const int COLMAX
data
Definition: MatrixNtupleBranch.h:48
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:29
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::MatrixNtupleBranch::m_ncols
int m_ncols
Definition: MatrixNtupleBranch.h:51
Trk::MatrixNtupleBranch::ROWMAX
static const int ROWMAX
Definition: MatrixNtupleBranch.h:49
Trk::MatrixNtupleBranch::m_matrix
float m_matrix[COLMAX][ROWMAX]
Definition: MatrixNtupleBranch.h:52
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
Trk::MatrixNtupleBranch
This class provides a simple interface to write Matricis to a root tree The size of the Matrix cannot...
Definition: MatrixNtupleBranch.h:33
EventPrimitives.h
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
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
python.testIfMatch.matrix
matrix
Definition: testIfMatch.py:66
LArG4AODNtuplePlotter.varname
def varname(hname)
Definition: LArG4AODNtuplePlotter.py:37
Trk::MatrixNtupleBranch::m_nrows
int m_nrows
Definition: MatrixNtupleBranch.h:50
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