22 #if defined( USE_FILE_PROVIDER )
54 if (
good() ) ( *this) << preprinted_header.str();
63 std::string
const & filename_a,
64 std::ios_base::openmode open_mode
97 std::stringstream no_header;
107 if ( ( open_mode & ios::ate ) || ( open_mode & ios::app )
108 || ( ( open_mode & ios::in ) && ( open_mode & ios::out ) ) ) {
178 std::stringstream no_header;
233 MPI_Comm_rank (MPI_COMM_WORLD, &my_rank);
#define utility_exit_with_message(m)
Exit with file + line + message.
basic_zip_ostream< char > zip_ostream
bool allocate_assign_char_buffer()
if character buffer does not exist, create it and assign it to internal ofstream
std::streamsize buffer_size_
size of buffer (in bytes)
Compression compression_
Compression state.
Platform independent operations on files (except I/O)
bool trytry_ofstream_open(std::ofstream &ofstream_, std::string const &name, std::ios_base::openmode open_mode)
Try to open file a few times just in case it is locked (from BOINC LIB)
bool is_gzip() const
returns true if it is a gzip
static bool bMPI_reroute_stream_
basic_mpi_ostream< char > mpi_ostream
void open_append_if_existed(std::string const &filename_a, std::stringstream &preprinted_header)
open file as append if it exists, return true if file existed before, false if it is new...
zlib_stream::zip_ostream * zip_stream_p_
Zip file stream pointer (owning)
Program exit functions and macros.
mpi_stream::mpi_ostream * mpi_stream_p_
std::string file_extension(std::string const &filename)
Extension of a File Name.
std::string filename_
File name.
static void enable_MPI_reroute(int min_client_rank, int master_rank)
void open_append(std::string const &filename_a)
Open a text file for appending.
Output file stream wrapper for uncompressed and compressed files.
void close()
Close the ofstream and reset the state.
static int mpi_FileBuf_master_rank_
ocstream cout(std::cout)
Wrapper around std::cout.
BooleanOptionKey const exit("options:exit")
bool file_exists(std::string const &path)
Does File Exist?
void open(std::string const &filename_a, std::ios_base::openmode open_mode=std::ios_base::out)
Open a file.
std::ofstream of_stream_
File stream.