The Gaudi Framework
v32r2 (46d42edc)
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
}
GaudiPython.HistoUtils.path
path
Definition:
HistoUtils.py:933
FileReadTool::protocols
const std::vector< std::string > & protocols() const override
Protocols supported by the instance.
Definition:
FileReadTool.cpp:17
std
STL namespace.
std::string
STL class.
DECLARE_COMPONENT
#define DECLARE_COMPONENT(type)
Definition:
PluginServiceV1.h:46
FileReadTool.h
std::vector< std::string >
FileReadTool
Basic implementation of the IFileAccess interface.
Definition:
FileReadTool.h:16
GaudiUtils
src
component
FileReadTool.cpp
Generated on Sat Sep 28 2019 18:06:54 for The Gaudi Framework by
1.8.15