|
Gaudi Framework, version v21r8 |
| Home | Generated: 17 Mar 2010 |
00001 // $Id: VFSSvc.h,v 1.2 2008/06/12 15:23:03 marcocle Exp $ 00002 #ifndef GaudiSvc_VFSSvc_H 00003 #define GaudiSvc_VFSSvc_H 1 00004 00005 // Include files 00006 #include "GaudiKernel/Service.h" 00007 #include "GaudiKernel/IFileAccess.h" 00008 #include "GaudiKernel/HashMap.h" 00009 00010 #include <list> 00011 00012 // Forward declarations 00013 template <class TYPE> class SvcFactory; 00014 class IToolSvc; 00015 class IAlgTool; 00016 00028 class VFSSvc: public extends1<Service, IFileAccess> { 00029 public: 00031 virtual StatusCode initialize(); 00033 virtual StatusCode finalize(); 00034 00036 virtual std::auto_ptr<std::istream> open(const std::string &url); 00037 00039 virtual const std::vector<std::string> &protocols() const; 00040 00041 protected: 00043 VFSSvc(const std::string& name, ISvcLocator* svcloc); 00044 00045 virtual ~VFSSvc(); 00046 00047 private: 00048 00049 // Allow SvcFactory to instantiate the service. 00050 friend class SvcFactory<VFSSvc>; 00051 00053 std::vector<std::string> m_urlHandlersNames; 00054 00056 std::vector<std::string> m_protocols; 00057 00059 std::string m_fallBackProtocol; 00060 00062 GaudiUtils::HashMap<std::string,IFileAccess*> m_urlHandlers; 00063 00065 SmartIF<IToolSvc> m_toolSvc; 00066 00068 std::list<IAlgTool*> m_acquiredTools; 00069 00070 }; 00071 00072 #endif