ATLAS Offline Software
Loading...
Searching...
No Matches
VectorNtupleBranch.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_VECTORNTUPLEBRANCH_H
6#define TRK_VECTORNTUPLEBRANCH_H
7
8#include <string>
9class TTree;
10
12#include "CLHEP/Geometry/Vector3D.h"
13#include "CLHEP/Geometry/Point3D.h"
14#include "CLHEP/Matrix/Vector.h"
15
16namespace Trk {
17
35
37 bool initForWrite(TTree& tree, const std::string& varname, int nrow, const std::string& prefix = "" );
38
40 bool initForRead(TTree& tree, const std::string& varname, int nrow, const std::string& prefix = "" );
41
43 bool fill( const Amg::VectorX& matrix );
44
46 bool fill( const CLHEP::HepVector& vec );
47
49 bool fill( const CLHEP::Hep3Vector& vec );
50
52 bool fill( const HepGeom::Point3D<double>& vec );
53
55 bool fill( const HepGeom::Vector3D<double>& vec );
56
58 static const int ROWMAX = 10;
59 int m_nrows {-1};
60 float m_vector[ROWMAX]{};
61 };
62
63}
64
65#endif
std::vector< size_t > vec
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
Ensure that the ATLAS eigen extensions are properly loaded.
This class provides a simple interface to write Vectors to a root tree The size of the vectors cannot...
static const int ROWMAX
maximum size of the vector
bool initForWrite(TTree &tree, const std::string &varname, int nrow, const std::string &prefix="")
initialize class for writing
bool fill(const Amg::VectorX &matrix)
fill a vector
bool initForRead(TTree &tree, const std::string &varname, int nrow, const std::string &prefix="")
initialize class for reading
TChain * tree