ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonValidation
MuonTesterTree
MuonTesterTree
GenericDecorBranch.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
#ifndef MUONTESTER_GENERICDECORBRANCH_H
5
#define MUONTESTER_GENERICDECORBRANCH_H
6
#include <
MuonTesterTree/VectorBranch.h
>
7
#include <functional>
8
9
namespace
MuonVal
{
10
template
<
class
AuxType,
class
dType>
11
class
GenericAuxEleBranch
:
public
VectorBranch
<dType>,
virtual
public
IAuxElementDecorationBranch
{
12
public
:
15
using
Filler_t
= std::function<dType(
const
AuxType& )>;
16
21
GenericAuxEleBranch
(TTree* t,
const
std::string& branchName,
Filler_t
fillFunc);
26
GenericAuxEleBranch
(
MuonTesterTree
& t,
const
std::string& var_name,
Filler_t
fillFunc);
27
28
29
void
push_back
(
const
SG::AuxElement
* p)
override
;
30
void
push_back
(
const
SG::AuxElement
& p)
override
;
31
void
operator+=
(
const
SG::AuxElement
* p)
override
;
32
void
operator+=
(
const
SG::AuxElement
& p)
override
;
33
34
using
VectorBranch
<dType>
::push_back
;
35
36
virtual
~GenericAuxEleBranch
() =
default
;
37
private
:
38
Filler_t
m_fillFunc
;
39
};
40
41
template
<
class
PartType,
class
dType>
42
class
GenericPartDecorBranch
:
public
GenericAuxEleBranch
<PartType, dType>,
43
virtual
public
IParticleDecorationBranch
{
44
public
:
45
using
GenericAuxEleBranch
<PartType, dType>
::GenericAuxEleBranch
;
46
47
using
GenericAuxEleBranch
<PartType, dType>
::push_back
;
48
using
GenericAuxEleBranch
<PartType, dType>::operator+=;
49
50
void
push_back
(
const
xAOD::IParticle
* p)
override
;
51
void
push_back
(
const
xAOD::IParticle
& p)
override
;
52
void
operator+=
(
const
xAOD::IParticle
* p)
override
;
53
void
operator+=
(
const
xAOD::IParticle
& p)
override
;
54
};
55
}
56
57
#include "
MuonTesterTree/GenericDecorBranch.icc
"
58
#endif
GenericDecorBranch.icc
VectorBranch.h
MuonVal::GenericAuxEleBranch::operator+=
void operator+=(const SG::AuxElement &p) override
MuonVal::GenericAuxEleBranch::GenericAuxEleBranch
GenericAuxEleBranch(MuonTesterTree &t, const std::string &var_name, Filler_t fillFunc)
Constructor taking the raw pointer to the underlying TTree object.
MuonVal::GenericAuxEleBranch::push_back
void push_back(const SG::AuxElement &p) override
MuonVal::GenericAuxEleBranch::m_fillFunc
Filler_t m_fillFunc
Definition
GenericDecorBranch.h:38
MuonVal::GenericAuxEleBranch::push_back
void push_back(const SG::AuxElement *p) override
Reads out a generic auxillary element and add its information to the output vector.
MuonVal::GenericAuxEleBranch::operator+=
void operator+=(const SG::AuxElement *p) override
MuonVal::GenericAuxEleBranch::Filler_t
std::function< dType(const AuxType &)> Filler_t
Defined the function signature to extract the information from the AuxElement.
Definition
GenericDecorBranch.h:15
MuonVal::GenericAuxEleBranch::GenericAuxEleBranch
GenericAuxEleBranch(TTree *t, const std::string &branchName, Filler_t fillFunc)
Constructor taking the raw pointer to the underlying TTree object.
MuonVal::GenericAuxEleBranch::~GenericAuxEleBranch
virtual ~GenericAuxEleBranch()=default
MuonVal::GenericPartDecorBranch
Definition
GenericDecorBranch.h:43
MuonVal::GenericPartDecorBranch::push_back
void push_back(const xAOD::IParticle &p) override
MuonVal::GenericPartDecorBranch::push_back
void push_back(const xAOD::IParticle *p) override
Similar to the IAuxElementDecoration branch but only accepting IParticles.
MuonVal::GenericPartDecorBranch::operator+=
void operator+=(const xAOD::IParticle *p) override
MuonVal::GenericPartDecorBranch::operator+=
void operator+=(const xAOD::IParticle &p) override
MuonVal::IAuxElementDecorationBranch
Definition
IMuonTesterBranch.h:52
MuonVal::IParticleDecorationBranch
Definition
IMuonTesterBranch.h:65
MuonVal::MuonTesterTree
Definition
MuonTesterTree.h:38
MuonVal::VectorBranch< dType >::VectorBranch
VectorBranch(TTree *tree, const std::string &name)
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition
Event/xAOD/xAODBase/xAODBase/IParticle.h:41
MuonVal
Class to store array like branches into the n-tuples.
Definition
HitValAlg.cxx:19
SG::AuxElement
AuxElement(SG::AuxVectorData *container, size_t index)
Base class for elements of a container that can have aux data.
Generated on
for ATLAS Offline Software by
1.17.0