 |
ATLAS Offline Software
|
Go to the documentation of this file.
19 m_store( storeName,
name ),
22 m_allowFallThrough( allowFallThrough )
38 m_parents.insert( castParent );
41 throw std::runtime_error(
"Unable to link parent view that cannot be cast to SG::View" );
58 const std::string&
key,
68 m_keyMap.emplace(keyNoView,
proxy->sgkey());
91 auto itr = m_keyMap.find(
sgkey);
92 if (itr != m_keyMap.end()) {
93 return m_store->proxy_exact( itr->second );
114 return findProxy(
id,
key, m_allowFallThrough );
124 auto localProxy = m_store->proxy(
id, viewKey(
key) );
129 for (
auto parent: m_parents ) {
131 auto inParentProxy =
parent->findProxy(
id,
key,
false );
132 if (
isValid( inParentProxy ) ) {
133 return inParentProxy;
138 if ( (not
isValid( localProxy )) and allowFallThrough ) {
141 if ( !m_fallFilter.empty() ) {
142 bool filterPass =
false;
145 for (
auto&
entry : m_fallFilter ) {
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";
177 for (
auto p : m_parents ) {
178 ret +=
p->dump(
indent +
" " );
183 if ( m_allowFallThrough ) {
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" );
virtual SG::DataProxy * recordObject(SG::DataObjectSharedPtr< DataObject > obj, const std::string &key, bool allowMods, bool returnExisting) override
Record an object in the store.
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
SG::sgkey_t sgkey_t
Type of the keys.
void linkParent(const IProxyDict *parent)
Link to the previously used views.
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.
uint32_t CLID
The Class ID type.
virtual SG::DataProxy * proxy(const CLID &id, const std::string &key) const override
Get proxy with given id and key.
virtual SG::DataProxy * proxy_exact(SG::sgkey_t sgkey) const override
Get proxy given a hashed key+clid.
std::string dump(const std::string &indent="") const
Print content of the view.
std::string to_string(const DetectorType &type)
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
SG::ConcurrentSGKeyMap< sgkey_t > KeyMap_t
SG::DataProxy * findProxy(const CLID &id, const std::string &key, bool allowFallThrough) const
Internal implementation of proxy()
Smart pointer to manage DataObject reference counts.
A "view" of the event store (IProxyDict).