ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonValidation
MuonTesterTree
MuonTesterTree
MatrixBranch.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
#ifndef MUONTESTER_MATRIXBRANCH_H
5
#define MUONTESTER_MATRIXBRANCH_H
6
#include <
MuonTesterTree/VectorBranch.h
>
7
8
class
TTree;
9
10
namespace
MuonVal
{
11
class
MuonTesterTree
;
12
template
<
class
T>
class
MatrixBranch
:
public
VectorBranch
<std::vector<T>> {
13
public
:
15
MatrixBranch
(TTree*
tree
,
const
std::string&
name
);
16
MatrixBranch
(
MuonTesterTree
&
tree
,
const
std::string&
name
);
17
19
MatrixBranch
(TTree*
tree
,
const
std::string& b_name,
const
T& def);
20
MatrixBranch
(
MuonTesterTree
&
tree
,
const
std::string& b_name,
const
T& def);
21
22
23
virtual
~MatrixBranch
() =
default
;
24
25
26
28
using
VectorBranch
<std::vector<T>>
::get
;
29
using
VectorBranch
<std::vector<T>>::operator[];
30
32
inline
T&
get
(
size_t
i,
size_t
j);
33
35
using
VectorBranch
<std::vector<T>>
::push_back
;
36
inline
void
push_back
(
size_t
i,
const
T& value);
37
39
inline
size_t
nrows
()
const
;
41
inline
size_t
ncols
(
size_t
row)
const
;
42
44
inline
const
T&
getDefault
()
const
;
45
void
setDefault
(
const
T& def);
46
47
private
:
48
T
m_default
{};
49
};
50
}
51
#include <
MuonTesterTree/MatrixBranch.icc
>
52
#endif
MatrixBranch.icc
VectorBranch.h
MuonVal::MatrixBranch::MatrixBranch
MatrixBranch(MuonTesterTree &tree, const std::string &name)
MuonVal::MatrixBranch::MatrixBranch
MatrixBranch(MuonTesterTree &tree, const std::string &b_name, const T &def)
MuonVal::MatrixBranch::nrows
size_t nrows() const
Size of the outer vector.
MuonVal::MatrixBranch::setDefault
void setDefault(const T &def)
MuonVal::MatrixBranch< float >::m_default
float m_default
Definition
MatrixBranch.h:48
MuonVal::MatrixBranch::~MatrixBranch
virtual ~MatrixBranch()=default
MuonVal::MatrixBranch::getDefault
const T & getDefault() const
Get the default value to fill the empty fields in the vector.
MuonVal::MatrixBranch< float >::get
float & get(size_t i, size_t j)
MuonVal::MatrixBranch::MatrixBranch
MatrixBranch(TTree *tree, const std::string &name)
Standard constructor.
MuonVal::MatrixBranch::ncols
size_t ncols(size_t row) const
Size of the i-th inner vector.
MuonVal::MatrixBranch< float >::push_back
void push_back(size_t i, const float &value)
MuonVal::MatrixBranch::MatrixBranch
MatrixBranch(TTree *tree, const std::string &b_name, const T &def)
Constructor with default value extending the array.
MuonVal::MatrixBranch< float >::name
std::string name() const override final
Definition
MuonTesterBranch.cxx:51
MuonVal::MatrixBranch< float >::tree
TTree * tree() override final
Definition
MuonTesterBranch.cxx:53
MuonVal::MuonTesterTree
Definition
MuonTesterTree.h:38
MuonVal::VectorBranch< std::vector< T > >::VectorBranch
VectorBranch(TTree *tree, const std::string &name)
MuonVal
Class to store array like branches into the n-tuples.
Definition
HitValAlg.cxx:19
Generated on
for ATLAS Offline Software by
1.17.0