Go to the source code of this file.
|
| #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.
|
◆ 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.
SG::Decorator< T, ALLOC > Decorator
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 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
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 }