ATLAS Offline Software
Loading...
Searching...
No Matches
MuonTesterBranch.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_MUONTESTERBRANCH_H
5#define MUONTESTER_MUONTESTERBRANCH_H
6
9//
10#include <string>
11#include <vector>
12//
13class TTree;
14
19namespace MuonVal {
20class MuonTesterTree;
21class MuonTesterBranch : public AthMessaging, virtual public IMuonTesterBranch {
22public:
23 MuonTesterBranch(MuonTesterTree& tree, const std::string& br_name);
25 MuonTesterBranch(TTree* tree, const std::string& br_name);
26
28 void operator=(const MuonTesterBranch&) = delete;
29 virtual ~MuonTesterBranch();
30
31 std::string name() const override final;
35 bool initialized() const;
37 TTree* tree() override final;
38 const TTree* tree() const override final;
40 std::vector<DataDependency> data_dependencies() override final;
41
42 static std::string eraseWhiteSpaces(const std::string& In);
43
46 template <class T> bool addToTree(T& variable);
48 template<class Key> bool declare_dependency(Key& key);
49
51 // Does not work if the TTree pointer is given during construction
53
54
55
56
58 TTree* m_tree{nullptr};
60 std::string m_name{};
61 bool m_init{false};
62 std::vector<DataDependency> m_dependencies{};
63};
64}
66#endif
#define protected
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
Most basic interface class used by the MuonTester tree.
SG::VarHandleKey * DataDependency
bool addToTree(T &variable)
Connects the Memory buffer with the TTree.
MuonTesterBranch(const MuonTesterBranch &)=delete
void operator=(const MuonTesterBranch &)=delete
bool initialized() const
Returns whether the object has been initialized or not The outcome of the variable is bound to a succ...
MuonTesterBranch(MuonTesterTree &tree, const std::string &br_name)
static std::string eraseWhiteSpaces(const std::string &In)
MuonTesterTree & parent()
Returns the reference to the MuonTesterTree parent.
std::vector< DataDependency > m_dependencies
bool declare_dependency(Key &key)
Declares the ReadHandle/ ReadCondHandleKey as data dependency of the algorithm.
std::string name() const override final
Returns the name of the branch.
std::vector< DataDependency > data_dependencies() override final
Returns the data dependencies needed by the MuonTesterBranch.
TTree * tree() override final
Returns the underlying TTree object.
Class to store array like branches into the n-tuples.
Definition HitValAlg.cxx:19
STL namespace.
#define private