26#include "AthLinks/DataLink.h"
27#include "AthLinks/ElementLink.h"
58 return StatusCode::SUCCESS;
84 dobj = std::make_unique<MyDataObj>(1);
91 dobj = std::make_unique<MyDataObj>(2));
97 dobj3 = std::make_unique<MyDataObj>(3);
108 ATH_CHECK(
h.record (std::make_unique<MyDataObj> (i+100)) );
119 cobj->push_back (std::make_unique<MyContObj> (11.3, 132));
120 cobj->push_back (std::make_unique<MyContObj> (41.7, 291));
124 vFloat = std::make_unique<std::vector<float> >();
125 vFloat->push_back(1.0);
126 vFloat->push_back(2.0);
127 vFloat->push_back(3.0);
130 ATH_CHECK( m.record (std::make_unique<MapStringFloat>()) );
195 dobj2 = std::make_unique<MyDataObj> (2);
211 (void)dobjLink3.
cptr();
219 VecElemLink thirdElementLink(*vFloat, 2);
224 float& anElement = vFloat->operator[](0);
229 aLink.toContainedElement(*vFloat, anElement);
236 pLinkList = std::make_unique<std::list<VecElemLink> >();
237 pLinkList->push_back(aLink);
238 pLinkList->push_back(thirdElementLink);
245 linkVector = std::make_unique<std::vector<MapElemLink> >();
246 linkVector->push_back(MapElemLink(*m,
"uno"));
248 mLink.toContainedElement(*m, (*m)[
"due"]);
249 linkVector->push_back(mLink);
256 if ( (
evtStore()->symLink(dobj.
cptr(), pDO)).isFailure() ) {
262 if ( (
evtStore()->symLink(dobj3.cptr(), pDO)).isFailure() ) {
270 ATH_MSG_INFO (
" StoreGate structure before returning from execute \n"
273 return StatusCode::SUCCESS;
282 return StatusCode::FAILURE;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
Helpers for checking error return status codes and reporting errors.
An STL vector of pointers that by default owns its pointed-to elements.
Handle class for recording to StoreGate.
Testing reentrant algorithms.
ServiceHandle< StoreGateSvc > & evtStore()
Header file for AthHistogramAlgorithm.
Object reference supporting deferred reading from StoreGate.
void toStorableObject(const_reference data, IProxyDict *sg=0)
Set the link to an object given by a reference.
const_pointer cptr() const
Dereference the link.
ElementLink implementation for ROOT usage.
Property holding a SG store/key/clid from which a WriteHandle is made.
const_pointer_type cptr() const
Dereference the pointer.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
virtual StatusCode execute(const EventContext &ctx) const override final
SG::WriteHandleKey< DataVector< MyContObj > > m_cobjKey
SG::WriteHandleKeyArray< MyDataObj > m_dobjKeyArray
SG::WriteHandleKey< std::vector< ElementLink< MapStringFloat > > > m_linkVectorKey
SG::WriteHandleKey< std::vector< float > > m_vFloatKey
SG::WriteHandleKey< TestDataObject > m_testObjectKey
SG::WriteHandleKey< std::list< ElementLink< std::vector< float > > > > m_pLinkListKey
SG::DataObjectSharedPtr< TestDataObject > m_testObject
SG::WriteHandleKey< MyDataObj > m_dobjKey2
virtual StatusCode initialize() override final
SG::WriteHandleKey< MyDataObj > m_dobjKey3
SG::WriteHandleKey< MyDataObj > m_dobjKey
StatusCode onError() const
SG::WriteHandleKey< MapStringFloat > m_mKey
static void hideErrorLocus(bool flag=true)
If set to true, hide the source file and line number in the output.
Helper to check that an exception is thrown.
#define EXPECT_EXCEPTION(EXC, CODE)
Helper to check that an exception is thrown.
CxxUtils::RefCountedPtr< T > DataObjectSharedPtr
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())