BornAgain
1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Utility functions for data input and output. More...
Functions | |
bool | isCompressed (const std::string &name) |
Returns true if name contains *.gz extension. | |
bool | isGZipped (const std::string &name) |
Returns true if name contains *.gz extension. More... | |
bool | isBZipped (const std::string &name) |
Returns true if name contains *.bz2 extension. | |
std::string | GetFileMainExtension (const std::string &name) |
Returns file extension after stripping '.gz' if any. More... | |
bool | isIntFile (const std::string &file_name) |
returns true if file name corresponds to BornAgain native format (compressed or not) | |
bool | isTiffFile (const std::string &file_name) |
returns true if file name corresponds to tiff file (can be also compressed) | |
std::unique_ptr< IAxis > | createAxis (std::istream &input_stream) |
Creates axis of certain type from input stream. | |
void | fillOutputData (OutputData< double > *data, std::istream &input_stream) |
Fills output data raw buffer from input stream. | |
std::vector< double > | parse_doubles (const std::string &str) |
Parse double values from string to vector of double. | |
void | readLineOfDoubles (std::vector< double > &buffer, std::istringstream &iss) |
Utility functions for data input and output.
bool DataFormatUtils::isGZipped | ( | const std::string & | name | ) |
Returns true if name contains *.gz extension.
Does name contain *.gz extension?
Definition at line 55 of file DataFormatUtils.cpp.
std::string DataFormatUtils::GetFileMainExtension | ( | const std::string & | name | ) |
Returns file extension after stripping '.gz' if any.
Returns file main extension (without .gz).
Definition at line 67 of file DataFormatUtils.cpp.