36 auto castParent =
dynamic_cast< const SG::View*
>( parent );
41 throw std::runtime_error(
"Unable to link parent view that cannot be cast to SG::View" );
58 const std::string& key,
93 return m_store->proxy_exact( itr->second );
131 auto inParentProxy = parent->findProxy(
id, key,
false );
132 if (
isValid( inParentProxy ) ) {
133 return inParentProxy;
138 if ( (not
isValid( localProxy )) and allowFallThrough ) {
142 bool filterPass =
false;
146 if ( key.find( entry ) != std::string::npos ) {
152 if ( !filterPass )
return nullptr;
155 return m_store->proxy(
id, key );
167 std::string ret = indent +
"Dump " +
name() +
"\n";
170 if ( dp->name().find(
name() ) == 0 )
171 ret +=
" " + dp->name();
176 if (
m_parents.size() ) ret += indent +
"Parents:\n";
178 ret += p->dump( indent +
" " );
182 if ( indent ==
"" ) {
184 ret += indent +
"May access main store: " +
m_store->name();
186 ret += indent +
"May not access main store";
195 throw std::runtime_error(
"Not implemented: SG::View::tryELRemap" );
200 throw std::runtime_error(
"Not implemented: SG::View::keyToString" );
205 throw std::runtime_error(
"Not implemented: SG::View::keyToString" );
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
uint32_t CLID
The Class ID type.
SG::sgkey_t sgkey_t
Type of the keys.
A "view" of the event store (IProxyDict).
virtual bool tryELRemap(sgkey_t sgkey_in, size_t index_in, sgkey_t &sgkey_out, size_t &index_out) override
Test to see if the target of an ElementLink has moved.
virtual const std::string * keyToString(IStringPool::sgkey_t key) const override
Find the string and CLID corresponding to a given key.
virtual SG::DataProxy * proxy(const CLID &id, const std::string &key) const override
Get proxy with given id and key.
SG::DataProxy * findProxy(const CLID &id, const std::string &key, bool allowFallThrough) const
Internal implementation of proxy()
std::string dump(const std::string &indent="") const
Print content of the view.
void linkParent(const IProxyDict *parent)
Link to the previously used views.
virtual const std::string & name() const override
Name of the view.
ServiceHandle< StoreGateSvc > m_store
std::vector< std::string > m_fallFilter
virtual SG::DataProxy * recordObject(SG::DataObjectSharedPtr< DataObject > obj, const std::string &key, bool allowMods, bool returnExisting) override
Record an object in the store.
std::set< const SG::View * > m_parents
virtual std::vector< const SG::DataProxy * > proxies() const override
Return the list of all current proxies in store.
std::string viewKey(const std::string &key) const
Construct a key as used in the parent store.
virtual SG::DataProxy * proxy_exact(SG::sgkey_t sgkey) const override
Get proxy given a hashed key+clid.
SG::ConcurrentSGKeyMap< sgkey_t > KeyMap_t
CxxUtils::RefCountedPtr< T > DataObjectSharedPtr
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.