17#include "Gaudi/Property.h"
38 ISvcLocator* pSvcLocator ) :
48 "Output location of 'Data' objects" );
52 "Number of 'Data' objects to be stored each event" );
56 "Size of each 'Data' objects to be stored each event" );
60 "Switch to use or not an arena (memory pool) to allocate "
76 msg().setLevel( msgLevel() );
79 return StatusCode::SUCCESS;
85 return StatusCode::SUCCESS;
94 return StatusCode::FAILURE;
97 return StatusCode::SUCCESS;
114 for ( std::size_t iObj = 0; iObj !=
m_nObjs; ++iObj ) {
115 std::ostringstream outName;
127 dv->push_back(
data );
129 if ( !
evtStore()->record(dv, outName.str()).isSuccess() ) {
130 ATH_MSG_ERROR (
"Could not store data at [" << outName.str() <<
"] !!" );
135 if ( !
evtStore()->setConst(dv).isSuccess() ) {
136 ATH_MSG_WARNING(
"Could not setConst data at [" << outName.str() <<
"] !!");
141 for ( std::size_t i = 0; i !=
static_cast<std::size_t
>(
m_dataSize); ++i ) {
142 data->m_data.push_back( i );
146 return allGood ? StatusCode::SUCCESS : StatusCode::FAILURE;
#define ATH_MSG_WARNING(x)
char data[hepevt_bytes_allocation_ATLAS]
DataPool< SgTests::PayLoad > PayLoadPool_t
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
ServiceHandle< StoreGateSvc > & evtStore()
a typed memory pool that saves time spent allocation small object.
std::string m_dataName
Name of the input data.
virtual StatusCode execute()
std::size_t m_dataSize
Size of the payload objects.
StatusCode createData()
Create data.
bool m_useDataPool
switch to use or not an arena (memory pool) to allocate payload
virtual StatusCode finalize()
virtual StatusCode initialize()
std::size_t m_nObjs
Number of payload objects.
SgStressProducer()
Default constructor:
virtual ~SgStressProducer()
Destructor:
@ OWN_ELEMENTS
this data object owns its elements
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
is a very simple class to exercize the basic features of the StoreGateSvc class: publishing and retri...