 |
ATLAS Offline Software
|
Go to the documentation of this file.
18 return StatusCode::FAILURE;
23 return StatusCode::FAILURE;
34 return StatusCode::SUCCESS;
48 ATH_MSG_ERROR(
"Could not get background InDetSimDataCollection container " << bkgContainer.
name() <<
" from store " << bkgContainer.
store());
49 return StatusCode::FAILURE;
51 bkgContainerPtr = bkgContainer.
cptr();
53 ATH_MSG_DEBUG(
"Found background InDetSimDataCollection container " << bkgContainer.
name() <<
" in store " << bkgContainer.
store());
57 if (!signalContainer.
isValid()) {
58 ATH_MSG_ERROR(
"Could not get signal InDetSimDataCollection container " << signalContainer.
name() <<
" from store " << signalContainer.
store());
59 return StatusCode::FAILURE;
61 ATH_MSG_DEBUG(
"Found signal InDetSimDataCollection container " << signalContainer.
name() <<
" in store " << signalContainer.
store());
65 ATH_CHECK(outputContainer.
record(std::make_unique<InDetSimDataCollection>()));
66 if (!outputContainer.
isValid()) {
67 ATH_MSG_ERROR(
"Could not record output InDetSimDataCollection container " << outputContainer.
name() <<
" to store " << outputContainer.
store());
68 return StatusCode::FAILURE;
70 ATH_MSG_DEBUG(
"Recorded output InDetSimDataCollection container " << outputContainer.
name() <<
" in store " << outputContainer.
store());
73 ATH_MSG_VERBOSE(
"Inserting signal SDO, size = " << signalContainer->size());
74 outputContainer->insert(signalContainer->begin(), signalContainer->end());
78 ATH_MSG_VERBOSE(
"Inserting background SDO, size = " << bkgContainerPtr->size());
80 for (
const auto &
entry : *bkgContainerPtr) {
81 auto it = outputContainer->find(
entry.first);
82 if (
it != outputContainer->end()) {
85 std::vector<InDetSimData::Deposit> depositsVector(outSimData.
getdeposits());
86 depositsVector.insert(depositsVector.end(),
entry.second.getdeposits().begin(),
entry.second.getdeposits().end());
90 outputContainer->insert(
entry);
98 return StatusCode::SUCCESS;
InDetSDOOverlay(const std::string &name, ISvcLocator *pSvcLocator)
const std::vector< Deposit > & getdeposits() const
const_pointer_type cptr()
Dereference the pointer.
const std::string & name() const
Return the StoreGate ID for the referenced object.
virtual StatusCode execute(const EventContext &ctx) const override
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
An algorithm that can be simultaneously executed in multiple threads.
::StatusCode StatusCode
StatusCode definition for legacy code.
std::string store() const
Return the name of the store holding the object we are proxying.
virtual StatusCode initialize() override
SG::ReadHandleKey< InDetSimDataCollection > m_bkgInputKey
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?
SG::ReadHandleKey< InDetSimDataCollection > m_signalInputKey
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
SG::WriteHandleKey< InDetSimDataCollection > m_outputKey