ATLAS Offline Software
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 //
13 class TTree;
14 
19 namespace MuonVal {
20 class MuonTesterTree;
21 class MuonTesterBranch : public AthMessaging, virtual public IMuonTesterBranch {
22 public:
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 
44 protected:
46  template <class T> bool addToTree(T& variable);
49 
51  // Does not work if the TTree pointer is given during construction
53 
54 
55 
56 
57 private:
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
AthenaPoolExample_ReadWrite.Key
Key
Definition: AthenaPoolExample_ReadWrite.py:53
MuonVal::MuonTesterBranch
Definition: MuonTesterBranch.h:21
MuonVal::MuonTesterBranch::m_dependencies
std::vector< DataDependency > m_dependencies
Definition: MuonTesterBranch.h:62
MuonVal::MuonTesterBranch::m_tree
TTree * m_tree
Definition: MuonTesterBranch.h:58
taskman.template
dictionary template
Definition: taskman.py:317
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
MuonVal::MuonTesterBranch::MuonTesterBranch
MuonTesterBranch(MuonTesterTree &tree, const std::string &br_name)
Definition: MuonTesterBranch.cxx:33
MuonVal::MuonTesterBranch::MuonTesterBranch
MuonTesterBranch(const MuonTesterBranch &)=delete
MuonVal::MuonTesterBranch::tree
TTree * tree() override final
Returns the underlying TTree object.
Definition: MuonTesterBranch.cxx:53
protected
#define protected
Definition: DetDescrConditionsDict_dict_fixes.cxx:14
MuonVal::MuonTesterBranch::m_parent
MuonTesterTree * m_parent
Definition: MuonTesterBranch.h:59
MuonVal::MuonTesterBranch::declare_dependency
bool declare_dependency(Key &key)
Declares the ReadHandle/ ReadCondHandleKey as data dependency of the algorithm.
IMuonTesterBranch.h
MuonVal::MuonTesterBranch::eraseWhiteSpaces
static std::string eraseWhiteSpaces(const std::string &In)
Definition: MuonTesterBranch.cxx:56
MuonVal::MuonTesterBranch::operator=
void operator=(const MuonTesterBranch &)=delete
MuonVal::MuonTesterTree
Definition: MuonTesterTree.h:30
vector
Definition: MultiHisto.h:13
MuonTesterBranch.icc
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
python.selection.variable
variable
Definition: selection.py:33
MuonVal::MuonTesterBranch::addToTree
bool addToTree(T &variable)
Connects the Memory buffer with the TTree.
MuonVal::MuonTesterBranch::m_init
bool m_init
Definition: MuonTesterBranch.h:61
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
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
MuonVal::MuonTesterBranch::~MuonTesterBranch
virtual ~MuonTesterBranch()
Definition: MuonTesterBranch.cxx:44
SG::VarHandleKey
A property holding a SG store/key/clid from which a VarHandle is made.
Definition: StoreGate/StoreGate/VarHandleKey.h:62
MuonVal::MuonTesterBranch::parent
MuonTesterTree & parent()
Returns the reference to the MuonTesterTree parent.
Definition: MuonTesterBranch.cxx:38
MuonVal::MuonTesterBranch::m_name
std::string m_name
Definition: MuonTesterBranch.h:60
MuonVal::MuonTesterBranch::initialized
bool initialized() const
Returns whether the object has been initialized or not The outcome of the variable is bound to a succ...
Definition: MuonTesterBranch.cxx:52
AthMessaging.h
MuonVal::IMuonTesterBranch
Most basic interface class used by the MuonTester tree.
Definition: IMuonTesterBranch.h:20
MuonVal::MuonTesterBranch::data_dependencies
std::vector< DataDependency > data_dependencies() override final
Returns the data dependencies needed by the MuonTesterBranch.
Definition: MuonTesterBranch.cxx:61
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37