The Gaudi Framework  v36r1 (3e2fb5a8)
VFSSvc.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #ifndef GaudiSvc_VFSSvc_H
12 #define GaudiSvc_VFSSvc_H 1
13 
14 // Include files
15 #include "GaudiKernel/HashMap.h"
17 #include "GaudiKernel/Service.h"
18 
19 #include <list>
20 
21 // Forward declarations
22 class IToolSvc;
23 class IAlgTool;
24 
36 class VFSSvc : public extends<Service, IFileAccess> {
37 public:
39  using extends::extends;
41  StatusCode initialize() override;
43  StatusCode finalize() override;
44 
46  std::unique_ptr<std::istream> open( const std::string& url ) override;
47 
49  const std::vector<std::string>& protocols() const override;
50 
51 private:
53  this, "FileAccessTools", {{"FileReadTool"}}, "List of tools implementing the IFileAccess interface."};
54  Gaudi::Property<std::string> m_fallBackProtocol{this, "FallBackProtocol", "file",
55  "URL prefix to use if the prefix is not present."};
56 
59 
62 
65 
68 };
69 
70 #endif
std::string
STL class.
IAlgTool
Definition: IAlgTool.h:33
VFSSvc::m_fallBackProtocol
Gaudi::Property< std::string > m_fallBackProtocol
Definition: VFSSvc.h:54
std::vector< std::string >
VFSSvc::protocols
const std::vector< std::string > & protocols() const override
Definition: VFSSvc.cpp:113
HashMap.h
IFileAccess.h
VFSSvc::finalize
StatusCode finalize() override
Finalize Service.
Definition: VFSSvc.cpp:61
VFSSvc::m_urlHandlersNames
Gaudi::Property< std::vector< std::string > > m_urlHandlersNames
Definition: VFSSvc.h:52
VFSSvc::m_acquiredTools
std::vector< IAlgTool * > m_acquiredTools
List of acquired tools (needed to release them).
Definition: VFSSvc.h:67
VFSSvc::m_protocols
std::vector< std::string > m_protocols
Protocols registered.
Definition: VFSSvc.h:58
VFSSvc
Definition: VFSSvc.h:36
StatusCode
Definition: StatusCode.h:65
VFSSvc::m_urlHandlers
GaudiUtils::HashMap< std::string, std::vector< IFileAccess * > > m_urlHandlers
Map of the tools handling the known protocols.
Definition: VFSSvc.h:61
VFSSvc::m_toolSvc
SmartIF< IToolSvc > m_toolSvc
Handle to the tool service.
Definition: VFSSvc.h:64
VFSSvc::open
std::unique_ptr< std::istream > open(const std::string &url) override
Definition: VFSSvc.cpp:76
SmartIF< IToolSvc >
extends
Base class used to extend a class implementing other interfaces.
Definition: extends.h:20
Service.h
VFSSvc::initialize
StatusCode initialize() override
Initialize Service.
Definition: VFSSvc.cpp:20
GaudiUtils::HashMap
Definition: HashMap.h:83
std::unique_ptr
STL class.
IToolSvc
Definition: IToolSvc.h:29
Gaudi::Property
Implementation of property with value of concrete type.
Definition: Property.h:39