|
ATLAS Offline Software
|
Go to the documentation of this file.
23 return StatusCode::SUCCESS;
35 ATH_MSG_ERROR(
"Could not get background Truth particle container " << bkgContainer.
name() <<
" from store " << bkgContainer.
store());
36 return StatusCode::FAILURE;
38 ATH_MSG_DEBUG(
"Found background Truth particle container " << bkgContainer.
name() <<
" in store " << bkgContainer.
store());
42 ATH_CHECK(outputContainer.
record(std::make_unique<xAOD::TruthParticleContainer>(), std::make_unique<xAOD::TruthParticleAuxContainer>()));
43 if (!outputContainer.
isValid()) {
44 ATH_MSG_ERROR(
"Could not record output Truth particle container " << outputContainer.
name() <<
" to store " << outputContainer.
store());
45 return StatusCode::FAILURE;
47 ATH_MSG_DEBUG(
"Recorded output Truth particle container " << outputContainer.
name() <<
" in store " << outputContainer.
store());
53 outputContainer->
push_back(xTruthParticle);
54 *xTruthParticle = *bkgTruthParticle;
58 return StatusCode::SUCCESS;
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
virtual StatusCode execute(const EventContext &ctx) const override
const_pointer_type cptr()
Dereference the pointer.
SG::WriteHandleKey< xAOD::TruthParticleContainer > m_outputKey
const std::string & name() const
Return the StoreGate ID for the referenced object.
virtual StatusCode initialize() override
#define ATH_MSG_VERBOSE(x)
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_bkgInputKey
An algorithm that can be simultaneously executed in multiple threads.
::StatusCode StatusCode
StatusCode definition for legacy code.
Class describing a truth particle in the MC record.
std::string store() const
Return the name of the store holding the object we are proxying.
TruthParticle_v1 TruthParticle
Typedef to implementation.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
virtual bool isValid() override final
Can the handle be successfully dereferenced?
value_type push_back(value_type pElem)
Add an element to the end of the collection.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
size_type size() const noexcept
Returns the number of elements in the collection.
CopyPileupParticleTruthInfo(const std::string &name, ISvcLocator *pSvcLocator)