ATLAS Offline Software
Loading...
Searching...
No Matches
BPhysMetaDataHelper.cxx File Reference
#include "AthContainers/AuxTypeRegistry.h"
#include "AthContainers/normalizedTypeinfoName.h"
#include "AthContainers/ConstAccessor.h"
#include <iostream>
#include <utility>
#include "xAODBPhys/BPhysMetaDataHelper.h"
Include dependency graph for BPhysMetaDataHelper.cxx:

Go to the source code of this file.

Namespaces

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

Macros

#define GET_VALUE_IMP(TYPE)
#define GET_VALUES_IMP(SYMBOL, TYPE)

Detailed Description

Macro Definition Documentation

◆ GET_VALUE_IMP

#define GET_VALUE_IMP ( TYPE)
Value:
bool BPhysMetaDataHelper::value(const std::string& name, TYPE & val) \
const { \
xAOD::FileMetaData::Accessor< TYPE > acc( m_prefix + name ); \
if ( ! acc.isAvailable( *m_fm ) ) { \
return false; \
} else { \
val = acc( *m_fm ); \
return true; \
} \
}
#define TYPE(CODE, TYP, IOTYP)
SG::Accessor< T, ALLOC > Accessor
Definition AuxElement.h:572

Definition at line 154 of file BPhysMetaDataHelper.cxx.

154#define GET_VALUE_IMP( TYPE ) \
155 bool BPhysMetaDataHelper::value(const std::string& name, TYPE & val) \
156 const { \
157 xAOD::FileMetaData::Accessor< TYPE > acc( m_prefix + name ); \
158 if ( ! acc.isAvailable( *m_fm ) ) { \
159 return false; \
160 } else { \
161 val = acc( *m_fm ); \
162 return true; \
163 } \
164 }

◆ GET_VALUES_IMP

#define GET_VALUES_IMP ( SYMBOL,
TYPE )
Value:
std::map<std::string, TYPE> BPhysMetaDataHelper::values ## SYMBOL() const { \
std::map<std::string, TYPE > metaMap; \
const SG::auxid_set_t& auxids = m_fm->getAuxIDs(); \
for ( SG::auxid_t auxid : auxids ) { \
const std::type_info* ti = reg.getType( auxid ); \
if ( ti != NULL && *ti == typeid( TYPE ) ) { \
SG::ConstAccessor< TYPE > acc( auxid ); \
const std::string name = reg.getName( auxid ); \
metaMap[name] = acc( *m_fm ); \
} \
} \
return metaMap; \
}
Handle mappings between names and auxid_t.
static AuxTypeRegistry & instance()
Return the singleton registry instance.
Helper class to provide constant type-safe access to aux data.
A set of aux data identifiers.
Definition AuxTypes.h:47
size_t auxid_t
Identifier for a particular aux data item.
Definition AuxTypes.h:27

Definition at line 182 of file BPhysMetaDataHelper.cxx.

182#define GET_VALUES_IMP( SYMBOL, TYPE ) \
183 std::map<std::string, TYPE> BPhysMetaDataHelper::values ## SYMBOL() const { \
184 std::map<std::string, TYPE > metaMap; \
185 const SG::auxid_set_t& auxids = m_fm->getAuxIDs(); \
186 for ( SG::auxid_t auxid : auxids ) { \
187 SG::AuxTypeRegistry& reg = SG::AuxTypeRegistry::instance(); \
188 const std::type_info* ti = reg.getType( auxid ); \
189 if ( ti != NULL && *ti == typeid( TYPE ) ) { \
190 SG::ConstAccessor< TYPE > acc( auxid ); \
191 const std::string name = reg.getName( auxid ); \
192 metaMap[name] = acc( *m_fm ); \
193 } \
194 } \
195 return metaMap; \
196 }