The Gaudi Framework  v30r3 (a5ef0a68)
VFSSvc.h
Go to the documentation of this file.
1 #ifndef GaudiSvc_VFSSvc_H
2 #define GaudiSvc_VFSSvc_H 1
3 
4 // Include files
5 #include "GaudiKernel/HashMap.h"
7 #include "GaudiKernel/Service.h"
8 
9 #include <list>
10 
11 // Forward declarations
12 class IToolSvc;
13 class IAlgTool;
14 
26 class VFSSvc : public extends<Service, IFileAccess>
27 {
28 public:
30  using extends::extends;
32  StatusCode initialize() override;
34  StatusCode finalize() override;
35 
37  std::unique_ptr<std::istream> open( const std::string& url ) override;
38 
40  const std::vector<std::string>& protocols() const override;
41 
42 private:
44  this, "FileAccessTools", {{"FileReadTool"}}, "List of tools implementing the IFileAccess interface."};
45  Gaudi::Property<std::string> m_fallBackProtocol{this, "FallBackProtocol", "file",
46  "URL prefix to use if the prefix is not present."};
47 
50 
53 
56 
59 };
60 
61 #endif
The interface implemented by the IToolSvc base class.
Definition: IToolSvc.h:19
SmartIF< IToolSvc > m_toolSvc
Handle to the tool service.
Definition: VFSSvc.h:55
std::unique_ptr< std::istream > open(const std::string &url) override
Definition: VFSSvc.cpp:68
std::vector< std::string > m_protocols
Protocols registered.
Definition: VFSSvc.h:49
Implementation of property with value of concrete type.
Definition: Property.h:381
StatusCode initialize() override
Initialize Service.
Definition: VFSSvc.cpp:10
const std::vector< std::string > & protocols() const override
Definition: VFSSvc.cpp:108
STL class.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:51
Gaudi::Property< std::string > m_fallBackProtocol
Definition: VFSSvc.h:45
STL class.
StatusCode finalize() override
Finalize Service.
Definition: VFSSvc.cpp:52
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
Gaudi::Property< std::vector< std::string > > m_urlHandlersNames
Definition: VFSSvc.h:43
std::vector< IAlgTool * > m_acquiredTools
List of acquired tools (needed to release them).
Definition: VFSSvc.h:58
The interface implemented by the AlgTool base class.
Definition: IAlgTool.h:23
Common class providing an architecture-independent hash map.
Definition: HashMap.h:74
Simple service that allows to read files independently from the storage.
Definition: VFSSvc.h:26
GaudiUtils::HashMap< std::string, std::vector< IFileAccess * > > m_urlHandlers
Map of the tools handling the known protocols.
Definition: VFSSvc.h:52