Skip to content
Snippets Groups Projects
Commit f260d71c authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia
Browse files

Merge branch 'EventViewFallthrough' into 'master'

EventView may default to StoreGate

See merge request !4763

Former-commit-id: 5074ed3e
parents 9d2d444f a671a0af
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,7 @@ class SimpleView : public IProxyDict
public:
DeclareInterfaceID( SimpleView, 2, 0 );
SimpleView();
SimpleView( std::string Name );
SimpleView( std::string Name, bool AllowFallThrough=false );
virtual ~SimpleView();
/// get default proxy with given id. Returns 0 to flag failure
......@@ -182,7 +182,7 @@ class SimpleView : public IProxyDict
ServiceHandle< StoreGateSvc > m_store;
std::string m_name;
std::vector<const IProxyDict*> m_parents;
bool m_allowFallThrough;
};
......
......@@ -10,13 +10,15 @@ using namespace std;
SimpleView::SimpleView() :
m_store( "StoreGateSvc", "SimpleView" ),
m_name( "SimpleView" )
m_name( "SimpleView" ),
m_allowFallThrough( false )
{
}
SimpleView::SimpleView( std::string Name ) :
SimpleView::SimpleView( std::string Name, bool AllowFallThrough ) :
m_store( "StoreGateSvc", "SimpleView" ),
m_name( Name )
m_name( Name ),
m_allowFallThrough( AllowFallThrough )
{
}
......@@ -70,6 +72,13 @@ SG::DataProxy * SimpleView::proxy( const CLID& id, const std::string& key ) cons
throw std::runtime_error("Duplicate object CLID:"+ std::to_string(id) + " key: " + key + " found in views: " + name()+ " and parent " + parent->name() );
} // else search further
}
//Look in the default store - change to fix IDC
if ( m_allowFallThrough and not local )
{
return m_store->proxy( id, key );
}
return local; // can be the nullptr still
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment