21 return StatusCode::SUCCESS;
31 if (!inputContainer.
isValid()) {
32 ATH_MSG_ERROR(
"Could not get pileup TrackCollection " << inputContainer.
name() <<
" from store " << inputContainer.
store());
33 return StatusCode::FAILURE;
35 ATH_MSG_DEBUG(
"Found pileup TrackCollection " << inputContainer.
name() <<
" in store " << inputContainer.
store());
40 if (!outputContainer.
isValid()) {
41 ATH_MSG_ERROR(
"Could not record output TrackCollection " << outputContainer.
name() <<
" to store " << outputContainer.
store());
42 return StatusCode::FAILURE;
44 ATH_MSG_DEBUG(
"Recorded output TrackCollection container " << outputContainer.
name() <<
" in store " << outputContainer.
store());
47 for (
const Trk::Track* track : *inputContainer) {
48 outputContainer->push_back(
new Trk::Track(*track));
52 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
An algorithm that can be simultaneously executed in multiple threads.
virtual StatusCode execute(const EventContext &ctx) const override
virtual StatusCode initialize() override
SG::ReadHandleKey< TrackCollection > m_inputKey
SG::WriteHandleKey< TrackCollection > m_outputKey
CopyTrackCollection(const std::string &name, ISvcLocator *pSvcLocator)
virtual bool isValid() override final
Can the handle be successfully dereferenced?
std::string store() const
Return the name of the store holding the object we are proxying.
const std::string & name() const
Return the StoreGate ID for the referenced object.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
virtual bool isValid() override final
Can the handle be successfully dereferenced?