|
ATLAS Offline Software
|
Go to the documentation of this file.
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),
39 return StatusCode::SUCCESS;
55 return StatusCode::FAILURE;
59 std::unique_ptr<DataObject>
ptr (
proxy->readData());
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 __cplusplus >= 201709
91 if (
a.ends_with (
"_DELETED"))
93 if (
a.compare (
a.size() - 8, 8,
"_DELETED") == 0)
96 a.erase (
a.size() - 8, 8);
97 if (!
evtStore()->recordObject (dobj,
a,
false,
true)) {
100 return StatusCode::FAILURE;
105 for (
const std::string&
a : extraAliases) {
106 if (!
evtStore()->recordObject (dobj,
a,
false,
true)) {
109 return StatusCode::FAILURE;
114 return StatusCode::SUCCESS;
Handle allowing writes to the event store with a configurable type.
Generic algorithm wrapping an input conversion.
DataObject * accessData()
Access DataObject on-demand using conversion service.
const std::string & key() const
Return the StoreGate ID for the referenced object.
Handle allowing writes to the event store with a configurable type.
virtual StatusCode execute(const EventContext &ctx) const override
Standard Algorithm execute method.
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Property< std::vector< std::string > > m_aliases
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual StatusCode initialize() override
Standard initialize method.
SG::sgkey_t m_sgkey
Cache sgkey of proxy corresponding to the original object.
CLID clid() const
Return the class ID for the referenced object.
Smart pointer to manage DataObject reference counts.
SG::TypelessWriteHandleKey m_key
Property: Output key.