BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Handles raw data during the life time of DataHandlerDialog. More...
Public Member Functions | |
DataHandler ()=default | |
std::vector< std::string > | textData (const std::string &file_name) |
Returns raw text data representing content of the file with given name. More... | |
void | updateRawData (const std::vector< std::string > &file_names) |
Load raw data from the list of files, if it was not loaded yet. More... | |
Private Member Functions | |
void | loadFile (const std::string &file_name) |
correspondence of file name to the raw data in the file (i.e. all strings) More... | |
Private Attributes | |
std::map< std::string, std::vector< std::string > > | m_raw_data |
Handles raw data during the life time of DataHandlerDialog.
Loads the data from multiple ASCII files and stores in a buffer of strings.
Definition at line 28 of file datahandler.h.
|
default |
|
private |
correspondence of file name to the raw data in the file (i.e. all strings)
Load file with given name. File is assumed to be ASCII.
Definition at line 49 of file datahandler.cpp.
References gui2::Utils::LoadASCIIFile(), and m_raw_data.
Referenced by updateRawData().
std::vector< std::string > gui2::DataHandler::textData | ( | const std::string & | file_name | ) |
Returns raw text data representing content of the file with given name.
Definition at line 41 of file datahandler.cpp.
References m_raw_data.
void gui2::DataHandler::updateRawData | ( | const std::vector< std::string > & | file_names | ) |
Load raw data from the list of files, if it was not loaded yet.
Remove data which is not present.
Definition at line 25 of file datahandler.cpp.
References ModelView::Utils::Contains(), loadFile(), and m_raw_data.
|
private |
Definition at line 40 of file datahandler.h.
Referenced by loadFile(), textData(), and updateRawData().