Draft: Ensure the consistency of DataSet when reading from a file
Previously, a DataSet
could end up in an inconsistent state depending on the order of execution (e.g., the nr of frames or the metadata could be invalid).
To avoid such an inconsistency, the classes IDataReader
(as well as its derived classes), Diffractometer
and DataSet
are disentangled. The instrument-related methods and variables (like state
, instrumentStates
, sampleStates
, detectorStates
, and computeQ
) are moved to Diffractometer
. The MetaData
is stored only in DataSet
(to avoid duplication in IDataReader
). Hence, a data-reader accepts a pointer to a DataSet
and stores the acquired data in the DataSet
(as the sole data container). The DataSet
metadata are updated as soon as the required data is available.
Furthermore,
- The duplicate HDF5 exporter,
DataSet::saveHDF5
, is discarded. HDF5 output is solely produced by the ExperimentExporter module. - Adding unrecognized metadata keys will result in a warning in the log file.
-
RawDataReader
parameters include the name for theDataSet
; name duplication is checked inRawDataDialog::verify
and the user is warned via aQMessage
. - Renamed
HDF5MetaDataReader
->BaseHDF5DataReader
for proper naming. - Retired unused modules
HDF5ConverterDialog
,FakeDataReader
,MatrixParser
,DataOrder
andTestMatrixParser
. - Code and comments are improved.
Closes issues #276 (closed) , #306 (closed)
Related to issue #262