29 std::string storename;
30 const std::string& objkey =
m_key.objKey();
31 std::string::size_type ppos = objkey.find (
'+');
32 if (ppos != std::string::npos) {
33 storename = objkey.substr (0, ppos+1);
36 this->addDependency (DataObjID (
m_key.clid(), storename +
a),
37 Gaudi::DataHandle::Writer);
39 return StatusCode::SUCCESS;
53 m_key.clid() <<
"/" <<
m_key.key() <<
"_DELETED [" <<
55 return StatusCode::FAILURE;
59 std::unique_ptr<DataObject> ptr (proxy->readData());
62 m_key.clid() <<
"/" <<
m_key.key() <<
"_DELETED [" <<
64 return StatusCode::FAILURE;
72 std::vector<std::string> extraAliases;
74 if (!proxy->hasAlias (
a +
"_DELETED")) {
75 extraAliases.push_back (
a);
80 if (!proxy->alias().empty() || !extraAliases.empty()) {
83 ATH_MSG_ERROR(
"Can't find proxy for just-recorded object " <<
85 return StatusCode::FAILURE;
89 for (std::string
a : proxy->alias()) {
90 if (
a.ends_with (
"_DELETED")) {
91 a.erase (
a.size() - 8, 8);
92 if (!
evtStore()->recordObject (dobj,
a,
false,
true)) {
95 return StatusCode::FAILURE;
100 for (
const std::string&
a : extraAliases) {
101 if (!
evtStore()->recordObject (dobj,
a,
false,
true)) {
104 return StatusCode::FAILURE;
109 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
Generic algorithm wrapping an input conversion.
Handle allowing writes to the event store with a configurable type.
ServiceHandle< StoreGateSvc > & evtStore()
Header file for AthHistogramAlgorithm.
virtual StatusCode execute(const EventContext &ctx) const override
Standard Algorithm execute method.
SG::sgkey_t m_sgkey
Cache sgkey of proxy corresponding to the original object.
SG::TypelessWriteHandleKey m_key
Property: Output key.
Gaudi::Property< std::vector< std::string > > m_aliases
virtual StatusCode initialize() override
Standard initialize method.
DataObject * accessData()
Access DataObject on-demand using conversion service.
Handle allowing writes to the event store with a configurable type.
CxxUtils::RefCountedPtr< T > DataObjectSharedPtr