16#include "AthLinks/ElementLinkBase.h"
37 return StatusCode::SUCCESS;
43 std::vector< std::pair< const SG::IConstAuxStore*, std::string > > stores;
45 for(
const std::string& key :
m_keys ) {
48 stores.emplace_back( store, key );
53 for( ; itr != end; ++itr ) {
56 stores.emplace_back( store, itr.
key() );
63 for(
const auto& storeKey : stores ) {
70 return StatusCode::SUCCESS;
74 const std::string& key ) {
77 if( ! store.size() ) {
78 return StatusCode::SUCCESS;
95 const std::string tname =
97 static const std::string pat1 =
"ElementLink<";
98 static const std::string pat2 =
"std::vector<ElementLink<";
99 if( tname.substr( 0, pat1.size() ) == pat1 ) {
101 }
else if( tname.substr( 0, pat2.size() ) == pat2 ) {
120 void* ptr =
const_cast< void*
>( store.getData( auxid ) );
135 <<
"Invalid pointer received for variable: " << key
136 << reg.getName( auxid );
138 ATH_MSG_DEBUG(
"Static variable " << key << reg.getName( auxid )
145 const size_t eltSize = reg.getEltSize( auxid );
148 const size_t sz_i = store.size();
149 for(
size_t i = 0; i < sz_i; ++i ) {
152 void* eltPtr =
reinterpret_cast< char*
>( ptr ) + i * eltSize;
166 std::vector< ElementLinkBase >& v =
167 *(
reinterpret_cast< std::vector< ElementLinkBase >*
>( eltPtr ) );
168 const size_t sz_j = v.size();
169 for(
size_t j = 0; j < sz_j; ++j ) {
180 return StatusCode::FAILURE;
186 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()
const_iterator end() const
Return an end iterator.
const_iterator find(bit_t bit) const
If bit bit is set, return an iterator pointing to it.
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.
Interface for const operations on an auxiliary store.
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...