ATLAS Offline Software
Loading...
Searching...
No Matches
BPhysHelper.cxx File Reference
Include dependency graph for BPhysHelper.cxx:

Go to the source code of this file.

Macros

#define GET_PV(name)
#define SET_PV(name, pv, vertexContainer)
#define GET_FLOAT(name)
#define SET_FLOAT(name, val)
#define GET_INT(name)
#define SET_INT(name, val)

Typedefs

typedef ElementLink< xAOD::VertexContainerVertexLink
using VertexLinkVector = std::vector<VertexLink>
using MuonLink = ElementLink<xAOD::MuonContainer>
using MuonLinkVector = std::vector<MuonLink>
using ElectronLink = ElementLink<xAOD::ElectronContainer>
using ElectronLinkVector = std::vector<ElectronLink>

Detailed Description

Macro Definition Documentation

◆ GET_FLOAT

#define GET_FLOAT ( name)
Value:
{ \
static const SG::AuxElement::Accessor<float> floatAcc(name); \
if(!floatAcc.isAvailable(*m_b)) return -9999999.; \
return floatAcc(*m_b); \
}
SG::Accessor< T, ALLOC > Accessor
Definition AuxElement.h:572

Definition at line 71 of file BPhysHelper.cxx.

71#define GET_FLOAT(name) \
72{ \
73 static const SG::AuxElement::Accessor<float> floatAcc(name); \
74 if(!floatAcc.isAvailable(*m_b)) return -9999999.; \
75 return floatAcc(*m_b); \
76}

◆ GET_INT

#define GET_INT ( name)
Value:
{ \
static const SG::AuxElement::Accessor<int> intAcc(name); \
if(!intAcc.isAvailable(*m_b)) return -9999999; \
return intAcc(*m_b); \
}

Definition at line 85 of file BPhysHelper.cxx.

85#define GET_INT(name) \
86{ \
87 static const SG::AuxElement::Accessor<int> intAcc(name); \
88 if(!intAcc.isAvailable(*m_b)) return -9999999; \
89 return intAcc(*m_b); \
90}

◆ GET_PV

#define GET_PV ( name)
Value:
{ \
static const SG::AuxElement::Accessor<VertexLink> pvLinkAcc(name); \
if(!pvLinkAcc.isAvailable(*m_b)) { \
return 0; \
} \
const VertexLink& pvLink = pvLinkAcc(*m_b); \
if(!pvLink.isValid()) { \
return 0; \
} \
return *pvLink; \
}
ElementLink< xAOD::VertexContainer > VertexLink

Some useful macros

Definition at line 45 of file BPhysHelper.cxx.

45#define GET_PV( name ) \
46{ \
47 static const SG::AuxElement::Accessor<VertexLink> pvLinkAcc(name); \
48 if(!pvLinkAcc.isAvailable(*m_b)) { \
49 return 0; \
50 } \
51 const VertexLink& pvLink = pvLinkAcc(*m_b); \
52 if(!pvLink.isValid()) { \
53 return 0; \
54 } \
55 return *pvLink; \
56}

◆ SET_FLOAT

#define SET_FLOAT ( name,
val )
Value:
{ \
static const SG::AuxElement::Decorator<float> floatDec(name); \
floatDec(*m_b) = val; \
return true; \
}
SG::Decorator< T, ALLOC > Decorator
Definition AuxElement.h:575

Definition at line 78 of file BPhysHelper.cxx.

78#define SET_FLOAT( name, val) \
79{ \
80 static const SG::AuxElement::Decorator<float> floatDec(name); \
81 floatDec(*m_b) = val; \
82 return true; \
83}

◆ SET_INT

#define SET_INT ( name,
val )
Value:
{ \
static const SG::AuxElement::Decorator<int> intDec(name); \
intDec(*m_b) = val; \
return true; \
}

Definition at line 92 of file BPhysHelper.cxx.

92#define SET_INT( name, val) \
93{ \
94 static const SG::AuxElement::Decorator<int> intDec(name); \
95 intDec(*m_b) = val; \
96 return true; \
97}

◆ SET_PV

#define SET_PV ( name,
pv,
vertexContainer )
Value:
{ \
static const SG::AuxElement::Decorator<VertexLink> pvLinkDecor(name); \
VertexLink vertexLink; \
if(pv) { \
vertexLink.setElement(pv); \
vertexLink.setStorableObject(*vertexContainer); \
if( !vertexLink.isValid() ) \
return false;} \
pvLinkDecor(*m_b) = vertexLink; \
return true; \
}

Definition at line 58 of file BPhysHelper.cxx.

58#define SET_PV( name, pv, vertexContainer ) \
59{ \
60 static const SG::AuxElement::Decorator<VertexLink> pvLinkDecor(name); \
61 VertexLink vertexLink; \
62 if(pv) { \
63 vertexLink.setElement(pv); \
64 vertexLink.setStorableObject(*vertexContainer); \
65 if( !vertexLink.isValid() ) \
66 return false;} \
67 pvLinkDecor(*m_b) = vertexLink; \
68 return true; \
69}

Typedef Documentation

◆ ElectronLink

Definition at line 23 of file BPhysHelper.cxx.

◆ ElectronLinkVector

using ElectronLinkVector = std::vector<ElectronLink>

Definition at line 24 of file BPhysHelper.cxx.

◆ MuonLink

Definition at line 21 of file BPhysHelper.cxx.

◆ MuonLinkVector

using MuonLinkVector = std::vector<MuonLink>

Definition at line 22 of file BPhysHelper.cxx.

◆ VertexLink

Some useful typedefs

Definition at line 19 of file BPhysHelper.cxx.

◆ VertexLinkVector

using VertexLinkVector = std::vector<VertexLink>

Definition at line 20 of file BPhysHelper.cxx.