ATLAS Offline Software
Loading...
Searching...
No Matches
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
9
10#include <algorithm>
11#include <iostream>
12#include <memory>
13#include <string>
14#include <vector>
15
16class TTree;
17
18namespace MuonVal {
21public:
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
53public:
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
66public:
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
Property holding a SG store/key/clid from which a ReadHandle is made.
virtual ~IAuxElementDecorationBranch()=default
virtual void push_back(const SG::AuxElement *ele)=0
Reads out a generic auxillary element and add its information to the output vector.
virtual void operator+=(const SG::AuxElement &ele)=0
virtual void push_back(const SG::AuxElement &ele)=0
virtual void operator+=(const SG::AuxElement *ele)=0
Most basic interface class used by the MuonTester tree.
virtual std::string name() const =0
Returns the name of the branch.
virtual TTree * tree()=0
Returns the pointer to the underlying TTree object.
virtual bool init()=0
The init method checks whether the branch name has already registered to the MuonTree and tries then ...
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...
SG::VarHandleKey * DataDependency
virtual ~IMuonTesterBranch()=default
virtual const TTree * tree() const =0
virtual std::vector< DataDependency > data_dependencies()=0
Returns a vector of all Event data dependencies needed by the Branch to work.
virtual void push_back(const xAOD::IParticle &p)=0
virtual void push_back(const xAOD::IParticle *p)=0
Similar to the IAuxElementDecoration branch but only accepting IParticles.
virtual void operator+=(const xAOD::IParticle *p)=0
virtual void operator+=(const xAOD::IParticle &p)=0
virtual ~IParticleDecorationBranch()=default
Base class for elements of a container that can have aux data.
Definition AuxElement.h:483
A property holding a SG store/key/clid from which a VarHandle is made.
Class providing the definition of the 4-vector interface.
Class to store array like branches into the n-tuples.
Definition HitValAlg.cxx:19