ATLAS Offline Software
Loading...
Searching...
No Matches
xAODHelpers.h File Reference
Include dependency graph for xAODHelpers.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  xAOD::Helpers::_importHelper

Namespaces

namespace  xAOD
 ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
namespace  xAOD::Helpers

Macros

#define GET_VAL(FUNCNAME, VALTYPE, PERSVALTYPE)
#define SET_VAL(FUNCNAME, VALTYPE, PERSVALTYPE)
 Access to get a variable of the different types.
#define DECO_VAL(FUNCNAME, VALTYPE, PERSVALTYPE)
 Set a variable of the different types.

Macro Definition Documentation

◆ DECO_VAL

#define DECO_VAL ( FUNCNAME,
VALTYPE,
PERSVALTYPE )
Value:
inline bool FUNCNAME( const SG::AuxElement& auxEle, const std::string& varName, VALTYPE val ) { \
if ( deco.isAvailable(auxEle) && !(deco.isAvailableWritable(auxEle)) ) { \
return false; \
} \
deco(auxEle) = static_cast<PERSVALTYPE>(val); \
return true; \
}
Base class for elements of a container that can have aux data.
Definition AuxElement.h:484
SG::Decorator< T, ALLOC > Decorator
Definition AuxElement.h:576

Set a variable of the different types.

Definition at line 77 of file xAODHelpers.h.

77#define DECO_VAL( FUNCNAME, VALTYPE, PERSVALTYPE ) \
78 inline bool FUNCNAME( const SG::AuxElement& auxEle, const std::string& varName, VALTYPE val ) { \
79 SG::AuxElement::Decorator<PERSVALTYPE> deco(varName); \
80 if ( deco.isAvailable(auxEle) && !(deco.isAvailableWritable(auxEle)) ) { \
81 return false; \
82 } \
83 deco(auxEle) = static_cast<PERSVALTYPE>(val); \
84 return true; \
85 }

◆ GET_VAL

#define GET_VAL ( FUNCNAME,
VALTYPE,
PERSVALTYPE )
Value:
inline bool FUNCNAME( const SG::AuxElement& auxEle, const std::string& varName ) { \
return static_cast<VALTYPE>( acc(auxEle) ); \
}
SG::ConstAccessor< T, ALLOC > ConstAccessor
Definition AuxElement.h:570

Definition at line 41 of file xAODHelpers.h.

41#define GET_VAL( FUNCNAME, VALTYPE, PERSVALTYPE ) \
42 inline bool FUNCNAME( const SG::AuxElement& auxEle, const std::string& varName ) { \
43 SG::AuxElement::ConstAccessor<PERSVALTYPE> acc(varName); \
44 return static_cast<VALTYPE>( acc(auxEle) ); \
45 }

◆ SET_VAL

#define SET_VAL ( FUNCNAME,
VALTYPE,
PERSVALTYPE )
Value:
inline bool FUNCNAME( SG::AuxElement& auxEle, const std::string& varName, VALTYPE val ) { \
if ( acc.isAvailable(auxEle) && !(acc.isAvailableWritable(auxEle)) ) { \
return false; \
} \
acc(auxEle) = static_cast<PERSVALTYPE>(val); \
return true; \
}
SG::Accessor< T, ALLOC > Accessor
Definition AuxElement.h:573

Access to get a variable of the different types.

Definition at line 57 of file xAODHelpers.h.

57#define SET_VAL( FUNCNAME, VALTYPE, PERSVALTYPE ) \
58 inline bool FUNCNAME( SG::AuxElement& auxEle, const std::string& varName, VALTYPE val ) { \
59 SG::AuxElement::Accessor<PERSVALTYPE> acc(varName); \
60 if ( acc.isAvailable(auxEle) && !(acc.isAvailableWritable(auxEle)) ) { \
61 return false; \
62 } \
63 acc(auxEle) = static_cast<PERSVALTYPE>(val); \
64 return true; \
65 }