The Gaudi Framework
v30r3 (a5ef0a68)
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
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
{
8
// remove the optional "file://" from the beginning of the url
9
std::string
path
;
10
if
( url.compare( 0, 7,
"file://"
) == 0 ) {
11
path = url.
substr
( 7 );
12
}
else
{
13
path = url;
14
}
15
return
std::make_unique<std::ifstream>(
path
);
16
}
17
18
const
std::vector<std::string>
&
FileReadTool::protocols
()
const
19
{
21
static
const
std::vector<std::string>
s_protocols = {{
"file"
}};
22
return
s_protocols;
23
}
FileReadTool::protocols
const std::vector< std::string > & protocols() const override
Protocols supported by the instance.
Definition:
FileReadTool.cpp:18
GaudiPython.HistoUtils.path
path
Definition:
HistoUtils.py:895
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 Wed Aug 1 2018 23:21:16 for The Gaudi Framework by
1.8.11