15 #ifndef BORNAGAIN_DEVICE_IO_IOFACTORY_H
16 #define BORNAGAIN_DEVICE_IO_IOFACTORY_H
68 std::function<
Datafield*(std::istream&)> readData);
71 std::function<
void(std::ostream&)> writeData);
79 bool filesAgree(
const std::string& datFileName,
const std::string& refFileName,
double tol);
Stores radiation power per bin.
Provides users with possibility to read and write IntensityData from/to files in different format....
static bool fileTypeMatchesLoaderSelector(const std::string &fileName, LoaderSelector selector)
static void writeSimulationResult(const SimulationResult &result, const std::string &file_name)
Writes Datafield contained in the given SimulationResult object.
static void writeDatafield(const Datafield &data, const std::string &file_name)
Writes Datafield in file.
static Datafield * readReflectometryData(const std::string &file_name)
static Datafield * readDatafield(const std::string &file_name, LoaderSelector selector=automatic)
Reads file and returns newly created Datafield object. If selector is automatic, then the file extens...
Wrapper around Datafield that also provides unit conversions.
bool filesAgree(const std::string &datFileName, const std::string &refFileName, double tol)
Returns true if data in both files agree.