All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
VFSSvc.h
Go to the documentation of this file.
1 // $Id: VFSSvc.h,v 1.2 2008/06/12 15:23:03 marcocle Exp $
2 #ifndef GaudiSvc_VFSSvc_H
3 #define GaudiSvc_VFSSvc_H 1
4 
5 // Include files
6 #include "GaudiKernel/Service.h"
8 #include "GaudiKernel/HashMap.h"
9 
10 #include <list>
11 
12 // Forward declarations
13 class IToolSvc;
14 class IAlgTool;
15 
27 class VFSSvc: public extends1<Service, IFileAccess> {
28 public:
30  virtual StatusCode initialize();
32  virtual StatusCode finalize();
33 
35  virtual std::auto_ptr<std::istream> open(const std::string &url);
36 
38  virtual const std::vector<std::string> &protocols() const;
39 
41  VFSSvc(const std::string& name, ISvcLocator* svcloc);
42 
43  virtual ~VFSSvc();
44 
45 private:
46 
48  std::vector<std::string> m_urlHandlersNames;
49 
51  std::vector<std::string> m_protocols;
52 
54  std::string m_fallBackProtocol;
55 
58 
61 
63  std::list<IAlgTool*> m_acquiredTools;
64 
65 };
66 
67 #endif
The interface implemented by the IToolSvc base class.
Definition: IToolSvc.h:17
SmartIF< IToolSvc > m_toolSvc
Handle to the tool service.
Definition: VFSSvc.h:60
std::vector< std::string > m_protocols
Protocols registered.
Definition: VFSSvc.h:51
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:26
virtual StatusCode initialize()
Initialize Service.
Definition: VFSSvc.cpp:24
std::string m_fallBackProtocol
Protocol to use in case there is not a specific tool to handle the URL.
Definition: VFSSvc.h:54
GaudiUtils::HashMap< std::string, IFileAccess * > m_urlHandlers
Map of the tools handling the known protocols.
Definition: VFSSvc.h:57
virtual ~VFSSvc()
Destructor.
Definition: VFSSvc.cpp:22
virtual const std::vector< std::string > & protocols() const
Definition: VFSSvc.cpp:127
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
VFSSvc(const std::string &name, ISvcLocator *svcloc)
Standard constructor.
Definition: VFSSvc.cpp:10
virtual StatusCode finalize()
Finalize Service.
Definition: VFSSvc.cpp:76
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
std::list< IAlgTool * > m_acquiredTools
List of acquired tools (needed to release them).
Definition: VFSSvc.h:63
The interface implemented by the AlgTool base class.
Definition: IAlgTool.h:23
Simple service that allows to read files independently from the storage.
Definition: VFSSvc.h:27
virtual std::auto_ptr< std::istream > open(const std::string &url)
Definition: VFSSvc.cpp:92
std::vector< std::string > m_urlHandlersNames
Names of the handlers to use.
Definition: VFSSvc.h:48