ATLAS Offline Software
TwoVectorBranch.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef MUONTESTER_MUONTWOVECTORBRANCH_H
5 #define MUONTESTER_MUONTWOVECTORBRANCH_H
6 
10 
11 #include <TVector2.h>
14 namespace MuonVal {
16 public:
17  TwoVectorBranch(MuonTesterTree& tree, const std::string& vec_name);
18 
20  void push_back(const Amg::Vector2D& vec);
21  void operator+=(const Amg::Vector2D& vec);
22  void set(const Amg::Vector2D& vec, size_t pos);
23 
24  void push_back(const TVector2& vec);
25  void operator+=(const TVector2& vec);
26  void set(const TVector2& vec, size_t pos);
27 
28  void push_back(const float x, const float y);
29  void set(const float x, const float y, size_t pos);
30 
31  size_t size() const;
32 
33  bool fill(const EventContext&) override final;
34  bool init() override final;
35 
36 private:
39 };
40 }
41 #endif
MuonVal::TwoVectorBranch::init
bool init() override final
The init method checks whether the branch name has already registered to the MuonTree and tries then ...
Definition: TwoVectorBranch.cxx:8
MuonVal::TwoVectorBranch::fill
bool fill(const EventContext &) override final
The fill method checks if enough information is provided such that the branch is cleared from the inf...
Definition: TwoVectorBranch.cxx:7
MuonVal::TwoVectorBranch::size
size_t size() const
Definition: TwoVectorBranch.cxx:11
MuonVal::TwoVectorBranch::m_y
VectorBranch< float > & m_y
Definition: TwoVectorBranch.h:38
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
MuonVal::MuonTesterBranch
Definition: MuonTesterBranch.h:21
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
MuonVal::VectorBranch< float >
MuonTesterTree.h
x
#define x
MuonVal::MuonTesterBranch::tree
TTree * tree() override final
Returns the underlying TTree object.
Definition: MuonTesterBranch.cxx:53
MuonVal::TwoVectorBranch::operator+=
void operator+=(const Amg::Vector2D &vec)
Definition: TwoVectorBranch.cxx:23
VectorBranch.h
MuonVal::MuonTesterTree
Definition: MuonTesterTree.h:30
MuonVal::TwoVectorBranch::push_back
void push_back(const Amg::Vector2D &vec)
interface using the Amg::Vector3D
Definition: TwoVectorBranch.cxx:21
MuonVal::TwoVectorBranch::m_x
VectorBranch< float > & m_x
Definition: TwoVectorBranch.h:37
MuonVal::MuonTesterTree::newVector
VectorBranch< T > & newVector(const std::string &name)
Creates new branches and returns their reference.
MuonVal::MuonTesterBranch::name
std::string name() const override final
Returns the name of the branch.
Definition: MuonTesterBranch.cxx:51
MuonVal
Class to store array like branches into the n-tuples.
Definition: MuonTPMetaDataAlg.cxx:25
MuonVal::TwoVectorBranch::set
void set(const Amg::Vector2D &vec, size_t pos)
Definition: TwoVectorBranch.cxx:22
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
MuonVal::MuonTesterBranch::parent
MuonTesterTree & parent()
Returns the reference to the MuonTesterTree parent.
Definition: MuonTesterBranch.cxx:38
y
#define y
GeoPrimitivesHelpers.h
MuonVal::TwoVectorBranch::TwoVectorBranch
TwoVectorBranch(MuonTesterTree &tree, const std::string &vec_name)
Definition: TwoVectorBranch.cxx:10
MuonVal::TwoVectorBranch
Definition: TwoVectorBranch.h:15