21 ISvcLocator* pSvcLocator ) :
31 StatusCode
sc = StatusCode::SUCCESS;
35 if (
m_load.value().size() > 0 ) {
36 std::ostringstream
str;
37 str <<
"Will explicitly preload the following DataObjects:";
38 for (
auto &obj :
m_load.value() ) {
39 str <<
"\n + " << obj;
40 if ( obj.key() .empty() ) {
41 sc = StatusCode::FAILURE;
42 str <<
" ERROR: empty key is not allowed!";
62 return StatusCode::SUCCESS;
68 ATH_MSG_DEBUG(
"Executing " << name() <<
" running with store " << viewProxy->name() );
69 StatusCode
sc = StatusCode::SUCCESS;
72 for (
auto &obj :
m_load.value() ) {
83 ATH_MSG_DEBUG(
"Found " << obj.key() <<
" in " << viewProxy->name() );
85 else if ( obj.key().rfind(
"DetectorStore", 0 ) != std::string::npos )
89 else if ( obj.className() ==
"SG::AuxElement" )
92 const auto split = obj.key().rfind(
'.');
93 if (
split == std::string::npos) {
94 ATH_MSG_ERROR(
"Aux data specified, but key does not contain '.': " << obj.key() );
95 sc = StatusCode::FAILURE;
99 const auto parentKey = obj.key().substr( 0,
split );
100 SG::VarHandleKey parentVhk( obj.clid(), parentKey, Gaudi::DataHandle::Writer );
101 dp = viewProxy->proxy( obj.clid(), parentVhk.
key() );
103 ATH_MSG_DEBUG(
"Found " << parentKey <<
" in " << viewProxy->name() <<
" (need aux data " << obj.key() <<
")" );
105 ATH_MSG_ERROR(
"Did not find " << parentKey <<
" in " << viewProxy->name() <<
" (need aux data " << obj.key() <<
")" );
106 sc = StatusCode::FAILURE;
112 ATH_MSG_ERROR(
"Did not find " << obj.key() <<
" in " << viewProxy->name() );
119 sc = StatusCode::FAILURE;
#define ATH_MSG_WARNING(x)
void setProperty(columnar::PythonToolHandle &self, const std::string &key, nb::object value)
bool msgLvl(const MSG::Level lvl) const
An algorithm that can be simultaneously executed in multiple threads.
virtual ~ViewDataVerifier()
Destructor:
virtual StatusCode execute(const EventContext &ctx) const override
ViewDataVerifier()
Default constructor:
virtual StatusCode initialize() override
Gaudi::Property< DataObjIDColl > m_load
Containers to verify.
A property holding a SG store/key/clid from which a VarHandle is made.
const std::string & key() const
Return the StoreGate ID for the referenced object.
A "view" of the event store (IProxyDict).
std::vector< std::string > split(const std::string &s, const std::string &t=":")
const ExtendedEventContext & getExtendedEventContext(const EventContext &ctx)
Retrieve an extended context from a context object.