ATLAS Offline Software
IMuonTesterBranch.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_IMUONTESTERBRANCH_H
5 #define MUONTESTER_IMUONTESTERBRANCH_H
6 
8 #include <xAODBase/IParticle.h>
9 
10 #include <algorithm>
11 #include <iostream>
12 #include <memory>
13 #include <string>
14 #include <vector>
15 
16 class TTree;
17 
18 namespace MuonVal {
21 public:
22  virtual ~IMuonTesterBranch() = default;
29  virtual bool fill(const EventContext& ctx) = 0;
35  virtual bool init() = 0;
37  virtual std::string name() const = 0;
38 
41  virtual std::vector<DataDependency> data_dependencies() = 0;
42 
44  virtual TTree* tree() = 0;
45  virtual const TTree* tree() const = 0;
46 
47 };
48 
49 // Extension of the interface in case someone wants to store information directly associated
50 // with the particles
51 // Particles are usually saved in vectors
53 public:
57  virtual void push_back(const SG::AuxElement* ele) = 0;
58  virtual void push_back(const SG::AuxElement& ele) = 0;
59 
60  virtual void operator+=(const SG::AuxElement& ele) = 0;
61  virtual void operator+=(const SG::AuxElement* ele) = 0;
62  virtual ~IAuxElementDecorationBranch() = default;
63 };
64 
66 public:
69  virtual void push_back(const xAOD::IParticle* p) = 0;
70  virtual void push_back(const xAOD::IParticle& p) = 0;
71  virtual void operator+=(const xAOD::IParticle* p) = 0;
72  virtual void operator+=(const xAOD::IParticle& p) = 0;
73  virtual ~IParticleDecorationBranch() = default;
74 };
75 }
76 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
MuonVal::IMuonTesterBranch::tree
virtual TTree * tree()=0
Returns the pointer to the underlying TTree object.
MuonVal::IAuxElementDecorationBranch::push_back
virtual void push_back(const SG::AuxElement *ele)=0
Reads out a generic auxillary element and add its information to the output vector.
IParticle.h
MuonVal::IAuxElementDecorationBranch::~IAuxElementDecorationBranch
virtual ~IAuxElementDecorationBranch()=default
MuonVal::IMuonTesterBranch::~IMuonTesterBranch
virtual ~IMuonTesterBranch()=default
MuonVal::IParticleDecorationBranch::~IParticleDecorationBranch
virtual ~IParticleDecorationBranch()=default
SG::AuxElement
Base class for elements of a container that can have aux data.
Definition: AuxElement.h:483
MuonVal::IParticleDecorationBranch
Definition: IMuonTesterBranch.h:65
MuonVal::IParticleDecorationBranch::push_back
virtual void push_back(const xAOD::IParticle *p)=0
Similar to the IAuxElementDecoration branch but only accepting IParticles.
MuonVal::IAuxElementDecorationBranch
Definition: IMuonTesterBranch.h:52
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
MuonVal::IAuxElementDecorationBranch::operator+=
virtual void operator+=(const SG::AuxElement &ele)=0
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
MuonVal::IAuxElementDecorationBranch::operator+=
virtual void operator+=(const SG::AuxElement *ele)=0
MuonVal::IMuonTesterBranch::fill
virtual bool fill(const EventContext &ctx)=0
The fill method checks if enough information is provided such that the branch is cleared from the inf...
MuonVal::IAuxElementDecorationBranch::push_back
virtual void push_back(const SG::AuxElement &ele)=0
MuonVal::IMuonTesterBranch::init
virtual bool init()=0
The init method checks whether the branch name has already registered to the MuonTree and tries then ...
MuonVal
Class to store array like branches into the n-tuples.
Definition: MuonTPMetaDataAlg.cxx:25
MuonVal::IParticleDecorationBranch::push_back
virtual void push_back(const xAOD::IParticle &p)=0
MuonVal::IParticleDecorationBranch::operator+=
virtual void operator+=(const xAOD::IParticle &p)=0
SG::VarHandleKey
A property holding a SG store/key/clid from which a VarHandle is made.
Definition: StoreGate/StoreGate/VarHandleKey.h:62
MuonVal::IMuonTesterBranch::name
virtual std::string name() const =0
Returns the name of the branch.
MuonVal::IParticleDecorationBranch::operator+=
virtual void operator+=(const xAOD::IParticle *p)=0
MuonVal::IMuonTesterBranch
Most basic interface class used by the MuonTester tree.
Definition: IMuonTesterBranch.h:20
MuonVal::IMuonTesterBranch::data_dependencies
virtual std::vector< DataDependency > data_dependencies()=0
Returns a vector of all Event data dependencies needed by the Branch to work.
MuonVal::IMuonTesterBranch::tree
virtual const TTree * tree() const =0