30 std::vector<DataObjectWriteHandle<int>>
m_id_vec;
34 for (
int i = 0; i < 100; i++ ) {
m_id_vec.emplace_back(
"/Event/Test/Ids" + std::to_string( i ),
this ); }
40 auto i = std::make_unique<AnyDataWrapper<int>>( 0 );
41 auto j = std::make_unique<AnyDataWrapper<std::vector<int>>>( std::vector<int>{ 0, 1, 2, 3 } );
45 .
orThrow(
"failed to register " +
m_loc.value() +
"/One" );
48 .
orThrow(
"failed to register " +
m_loc.value() +
"/Two" );
50 m_ids.put( std::vector<int>( { 42, 84 } ) );
52 for (
int i = 0; i < 100; ++i )
m_id_vec[i].put( std::move( i ) );
93 const auto& ids =
m_ids.get();
94 info() <<
"AnyDataHandler holds:";
95 for (
const auto& i : *ids )
info() << i <<
" ";
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
#define DECLARE_COMPONENT_WITH_ID(type, id)
#define DECLARE_COMPONENT(type)
StatusCode execute() override
Gaudi::Property< std::string > m_location
DataObjectReadHandle< std::vector< int > > m_ids
Gaudi::Property< std::string > m_loc
std::vector< DataObjectWriteHandle< int > > m_id_vec
DataObjectWriteHandle< std::vector< int > > m_ids
StatusCode execute() override
AnyDataPutAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
MSG::Level msgLevel() const
A DataObject is the base class of any identifiable object on any data store.
SmartIF< IDataProviderSvc > & eventSvc() const
The standard event data service.
Algorithm(std::string name, ISvcLocator *svcloc, std::string version=PACKAGE_VERSION)
Constructor.
const std::string & name() const override
The identifying name of the algorithm object.
Implementation of property with value of concrete type.
virtual StatusCode retrieveObject(IRegistry *pDirectory, std::string_view path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.
StatusCode registerObject(std::string_view fullPath, DataObject *pObject)
Register object with the data store.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
This class is used for returning status codes from appropriate routines.
const StatusCode & ignore() const
Allow discarding a StatusCode without warning.
const StatusCode & orThrow(std::string_view message, std::string_view tag) const
Throw a GaudiException in case of failures.
constexpr static const auto SUCCESS
constexpr static const auto FAILURE
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.