20 template <
class FILETYPE>
25 File(
const std::string& name)
26 : _name(name), _fileptr(
nullptr), _streamptr(
nullptr) {
47 std::string
getContent()
const {
return _streamptr !=
nullptr ? _streamptr->str() :
""; }
56 std::stringstream* _streamptr;
64 #define IFile File<std::ifstream>
65 #define OFile File<std::ofstream>
MPI-safe file I/O interface.
Definition FileIO.h:21
FILETYPE * operator->() const
Forward methods via pointer emulation.
Definition FileIO.h:41
std::string getContent() const
Get the file content.
Definition FileIO.h:47
FILETYPE & operator*() const
Forward methods via pointer-dereference emulation.
Definition FileIO.h:44
~File()
Destructor.
Definition FileIO.h:31
Namespace for all LHAPDF functions and classes.
Definition AlphaS.h:14
void flushFileCache()
Global function to flush the MPI-safe file cache.