Go to the documentation of this file.
24 m_toolSvc = serviceLocator()->service(
"ToolSvc" );
26 error() <<
"Cannot locate ToolSvc" <<
endmsg;
31 for (
const auto& i : m_urlHandlersNames ) {
35 error() <<
"Cannot get tool " << i <<
endmsg;
38 m_acquiredTools.push_back(
tool );
41 error() << i <<
" does not implement IFileAccess" <<
endmsg;
47 for (
const auto& prot : hndlr->protocols() ) m_urlHandlers[prot].emplace_back( hndlr.get() );
51 if ( m_urlHandlers.find( m_fallBackProtocol ) == m_urlHandlers.end() ) {
52 error() <<
"No handler specified for fallback protocol prefix " << m_fallBackProtocol.value() <<
endmsg;
78 auto pos = url.
find(
"://" );
80 if ( std::string::npos == pos ) {
95 for (
auto hndlr : handlers->second ) {
96 out = hndlr->open( url );
105 constexpr
struct select1st_t {
106 template <
typename S,
typename T>
StatusCode initialize() override
iterator find(const key_type &key)
Gaudi::Property< std::string > m_fallBackProtocol
void reset(TYPE *ptr=nullptr)
Set the internal pointer to the passed one disposing of the old one.
T back_inserter(T... args)
const std::vector< std::string > & protocols() const override
StatusCode finalize() override
StatusCode finalize() override
Finalize Service.
std::vector< IAlgTool * > m_acquiredTools
List of acquired tools (needed to release them).
std::vector< std::string > m_protocols
Protocols registered.
GaudiUtils::HashMap< std::string, std::vector< IFileAccess * > > m_urlHandlers
Map of the tools handling the known protocols.
static const InterfaceID & interfaceID()
Return an instance of InterfaceID identifying the interface.
SmartIF< IToolSvc > m_toolSvc
Handle to the tool service.
std::unique_ptr< std::istream > open(const std::string &url) override
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
#define DECLARE_COMPONENT(type)
constexpr static const auto FAILURE