|
ATLAS Offline Software
|
Go to the documentation of this file.
20 RedoTruthLinksAlg::RedoTruthLinksAlg(
const string&
name, ISvcLocator* svcLoc )
36 return StatusCode::SUCCESS;
43 ATH_CHECK(truthLinkVec.
record(std::make_unique<xAODTruthParticleLinkVector>()));
48 if (!xTruthEventContainer.
isValid()) {
49 ATH_MSG_ERROR(
"Could not retrieve xAOD::TruthEventContainer with key:" <<
51 return StatusCode::FAILURE;
53 ATH_MSG_DEBUG(
"Retrieved for reading xAOD::TruthEventContainer key: " <<
58 for (
const auto&
par :
evt->truthParticleLinks()) {
59 if ( !
par.isValid() ) {
73 return StatusCode::SUCCESS;
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
virtual StatusCode initialize()
Function initialising the algorithm.
void stable_sort(std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, std::reverse_iterator< DataModel_detail::iterator< DVL > > end, Compare comp)
Specialization of stable_sort for DataVector/List.
Handle class for recording to StoreGate.
a link optimized in size for a GenParticle in a McEventCollection
SG::WriteHandleKey< xAODTruthParticleLinkVector > m_truthLinkContainerKey
The key for the output xAOD truth containers.
::StatusCode StatusCode
StatusCode definition for legacy code.
Class describing a signal truth event in the MC record.
virtual StatusCode execute()
Function executing the algorithm.
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?
Helpers for checking error return status codes and reporting errors.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
std::pair< HepMcParticleLink, ElementLink< xAOD::TruthParticleContainer > > xAODTruthParticleLink
Handle class for reading from StoreGate.
SG::ReadHandleKey< xAOD::TruthEventContainer > m_linksOnlyTruthEventContainerKey
size_type size() const noexcept
Returns the number of elements in the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.