Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework
v31r0 (aeb156f0)
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
FileReadTool.cpp
Go to the documentation of this file.
1
#include "
FileReadTool.h
"
2
#include <fstream>
3
4
DECLARE_COMPONENT
(
FileReadTool
)
5
6
std
::unique_ptr<
std
::istream>
FileReadTool
::open( const
std
::
string
& url ) {
7
// remove the optional "file://" from the beginning of the url
8
std::string
path
;
9
if
( url.compare( 0, 7,
"file://"
) == 0 ) {
10
path = url.
substr
( 7 );
11
}
else
{
12
path = url;
13
}
14
return
std::make_unique<std::ifstream>(
path
);
15
}
16
17
const
std::vector<std::string>
&
FileReadTool::protocols
()
const
{
19
static
const
std::vector<std::string>
s_protocols = {{
"file"
}};
20
return
s_protocols;
21
}
FileReadTool::protocols
const std::vector< std::string > & protocols() const override
Protocols supported by the instance.
Definition:
FileReadTool.cpp:17
GaudiPython.HistoUtils.path
path
Definition:
HistoUtils.py:932
std
STL namespace.
std::string
STL class.
DECLARE_COMPONENT
#define DECLARE_COMPONENT(type)
Definition:
PluginServiceV1.h:46
FileReadTool.h
std::vector< std::string >
std::string::substr
T substr(T...args)
FileReadTool
Basic implementation of the IFileAccess interface.
Definition:
FileReadTool.h:16
GaudiUtils
src
component
FileReadTool.cpp
Generated on Mon Feb 11 2019 17:48:19 for The Gaudi Framework by
1.8.11