13 m_urlHandlersNames.push_back(
"FileReadTool");
15 declareProperty(
"FileAccessTools",m_urlHandlersNames,
16 "List of tools implementing the IFileAccess interface.");
18 declareProperty(
"FallBackProtocol",m_fallBackProtocol =
"file",
19 "URL prefix to use if the prefix is not present.");
40 std::vector<std::string>::iterator
i;
58 for ( std::vector<std::string>::const_iterator
prot = hndlr->
protocols().begin();
66 log <<
MSG::ERROR <<
"No handler specified for fallback protocol prefix "
95 std::string::size_type pos = url.find(
"://");
97 if (std::string::npos == pos) {
101 std::string url_prefix(url,0,pos);
113 template <
class Container>
116 append_key(Container &C):
c(C){}
118 template <
class PAIR>
119 void operator() (
const PAIR &x)
121 c.push_back(x.first);
SmartIF< IToolSvc > m_toolSvc
Handle to the tool service.
Definition of the MsgStream class used to transmit messages.
std::vector< std::string > m_protocols
Protocols registered.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
virtual StatusCode initialize()
Initialize Service.
std::string m_fallBackProtocol
Protocol to use in case there is not a specific tool to handle the URL.
GaudiUtils::HashMap< std::string, IFileAccess * > m_urlHandlers
Map of the tools handling the known protocols.
bool isFailure() const
Test for a status code of FAILURE.
virtual ~VFSSvc()
Destructor.
#define DECLARE_COMPONENT(type)
bool isValid() const
Allow for check if smart pointer is valid.
virtual const std::vector< std::string > & protocols() const
This class is used for returning status codes from appropriate routines.
iterator find(const key_type &key)
virtual StatusCode finalize()
Finalize Service.
virtual const std::string & name() const
Retrieve name of the service.
std::list< IAlgTool * > m_acquiredTools
List of acquired tools (needed to release them).
virtual unsigned long release()=0
Release Interface instance.
virtual StatusCode initialize()
Initialization (from CONFIGURED to INITIALIZED).
std
AIDA -> ROTO converter.
Abstract interface for a service or tool implementing a read access to files.
Templated class to add the standard messaging functionalities.
Simple service that allows to read files independently from the storage.
virtual const std::vector< std::string > & protocols() const =0
Protocols supported by the instance.
static const InterfaceID & interfaceID()
Return an instance of InterfaceID identifying the interface.
virtual std::auto_ptr< std::istream > open(const std::string &url)
virtual StatusCode finalize()
Finalize (from INITIALIZED to CONFIGURED).
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
std::vector< std::string > m_urlHandlersNames
Names of the handlers to use.
SmartIF< ISvcLocator > & serviceLocator() const
Retrieve pointer to service locator.
virtual StatusCode queryInterface(const InterfaceID &ti, void **pp)=0
Set the void** to the pointer to the requested interface of the instance.