25 return StatusCode::SUCCESS;
35 if (!inputContainer.
isValid()) {
36 ATH_MSG_ERROR(
"Could not get pileup SCT_ClusterContainer " << inputContainer.
name() <<
" from store " << inputContainer.
store());
37 return StatusCode::FAILURE;
39 ATH_MSG_DEBUG(
"Found pileup SCT_ClusterContainer " << inputContainer.
name() <<
" in store " << inputContainer.
store());
44 if (!outputContainer.
isValid()) {
45 ATH_MSG_ERROR(
"Could not record output SCT_ClusterContainer " << outputContainer.
name() <<
" to store " << outputContainer.
store());
46 return StatusCode::FAILURE;
48 ATH_MSG_DEBUG(
"Recorded output SCT_ClusterContainer container " << outputContainer.
name() <<
" in store " << outputContainer.
store());
50 for(
const InDet::SCT_ClusterCollection* col : *inputContainer){
51 InDet::SCT_ClusterCollection* newCol=
new InDet::SCT_ClusterCollection(col->identifyHash());
52 newCol->setIdentifier(col->identify());
54 newCol->push_back(std::make_unique<InDet::SCT_Cluster>(*clus));
56 ATH_CHECK(outputContainer->addCollection(newCol,newCol->identifyHash()));
58 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
This is an Identifier helper class for the SCT subdetector.
const ServiceHandle< StoreGateSvc > & detStore() const
An algorithm that can be simultaneously executed in multiple threads.
const SCT_ID * m_idHelper
virtual StatusCode execute(const EventContext &ctx) const override
virtual StatusCode initialize() override
SG::WriteHandleKey< InDet::SCT_ClusterContainer > m_outputKey
SG::ReadHandleKey< InDet::SCT_ClusterContainer > m_inputKey
CopySCT_ClusterContainer(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?