17#include "AthLinks/ElementLinkBase.h"
41 return StatusCode::SUCCESS;
47 std::vector< std::pair< const SG::IConstAuxStore*, std::string > > stores;
49 for(
const std::string& key :
m_keys ) {
50 const SG::IConstAuxStore* store =
nullptr;
52 stores.emplace_back( store, key );
57 for( ; itr != end; ++itr ) {
58 const SG::IConstAuxStore* store =
nullptr;
60 stores.emplace_back( store, itr.
key() );
67 for(
const auto& storeKey : stores ) {
74 return StatusCode::SUCCESS;
78 const std::string& key ) {
81 if( ! store.size() ) {
82 return StatusCode::SUCCESS;
90 static constexpr SG::auxid_t maxPossibleAuxId = std::numeric_limits<SG::auxid_t>::max();
94 if( (
m_typeCache.size() <= auxid) and (auxid < maxPossibleAuxId)) {
98 const std::string tname =
100 static const std::string pat1 =
"ElementLink<";
101 static const std::string pat2 =
"std::vector<ElementLink<";
102 if( tname.substr( 0, pat1.size() ) == pat1 ) {
104 }
else if( tname.substr( 0, pat2.size() ) == pat2 ) {
123 void* ptr =
const_cast< void*
>( store.getData( auxid ) );
138 <<
"Invalid pointer received for variable: " << key
139 << reg.getName( auxid );
141 ATH_MSG_DEBUG(
"Static variable " << key << reg.getName( auxid )
148 const size_t eltSize = reg.getEltSize( auxid );
151 const size_t sz_i = store.size();
152 for(
size_t i = 0; i < sz_i; ++i ) {
155 void* eltPtr =
reinterpret_cast< char*
>( ptr ) + i * eltSize;
169 std::vector< ElementLinkBase >& v =
170 *(
reinterpret_cast< std::vector< ElementLinkBase >*
>( eltPtr ) );
171 const size_t sz_j = v.size();
172 for(
size_t j = 0; j < sz_j; ++j ) {
183 return StatusCode::FAILURE;
189 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
Handle mappings between names and auxid_t.
Helpers for checking error return status codes and reporting errors.
#define REPORT_MESSAGE(LVL)
Report a message.
Interface providing I/O for a generic auxiliary store.
Interface for const operations on an auxiliary store.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
ServiceHandle< StoreGateSvc > & evtStore()
Base class for ElementLinks to vectors of pointers.
sgkey_t persKey() const
Return the SG key that we reference, as a hash.
bool toTransient(IProxyDict *sg=0)
Finish initialization after link has been read.
Handle mappings between names and auxid_t.
static AuxTypeRegistry & instance()
Return the singleton registry instance.
a const_iterator facade to DataHandle.
Interface providing I/O for a generic auxiliary store.
virtual const SG::auxid_set_t & getDynamicAuxIDs() const =0
Get the list of all dynamically created variables.
A set of aux data identifiers.
const std::string & key() const
Get the key string with which the current object was stored.
bool isELVec
True of the type is an ElementLink vector.
bool isSet
Flag for whether this type was already set up.
bool isEL
True if the type is an ElementLink.
virtual StatusCode execute()
Function executing the algorithm.
std::vector< std::string > m_keys
StoreGate keys of the auxiliary objects to be processed.
virtual StatusCode initialize()
Function initialising the algorithm.
std::vector< AuxIDType > m_typeCache
Cached types of the auxiliary IDs.
ElementLinkResetAlg(const std::string &name, ISvcLocator *svcLoc)
Regular Algorithm constructor.
StatusCode reset(const SG::IConstAuxStore &store, const std::string &key)
Function reseting all the ElementLinks in one specific container.
std::string normalizedTypeinfoName(const std::type_info &info)
Convert a type_info to a normalized string representation (matching the names used in the root dictio...
size_t auxid_t
Identifier for a particular aux data item.
Convert a type_info to a normalized string representation (matching the names used in the root dictio...