29 : m_bc(bc), m_CoordSize(4), m_TypeName(
"MDEvent"), m_ReadOnly(true), m_isOpened(false) {
48 if (blockSize == 4 || blockSize == 8) {
51 throw std::invalid_argument(
"The class currently supports 4(float) and "
52 "8(double) event coordinates only");
59 throw std::invalid_argument(
"unsupported event type");
95 if (mode.find(
'w') != std::string::npos || mode.find(
'W') != std::string::npos) {
101 if (fileName.find(
"exist") != std::string::npos) {
102 size_t nEvents = 1000;
106 for (
size_t i = 0; i < nEvents; i++) {
136 for (
size_t i = 0; i < DataBlock.size(); i++) {
152 const size_t nPoints)
const {
158 for (
size_t i = 0; i < nPoints *
m_EventSize; i++) {
bool openFile(const std::string &fileName, const std::string &mode) override
Open the file to use in IO operations with events.
bool m_isOpened
identified of the file state, if it is open or not.
void getDataType(size_t &CoordSize, std::string &typeName) const override
As save/load operations use void data type, these function allow set up/get the type name provided fo...
void saveBlock(const std::vector< float > &, const uint64_t) const override
Save block of data into properly opened and initiated direct access data file.
std::vector< float > fileContents
~BoxControllerDummyIO() override
void closeFile() override
Close the file.
BoxControllerDummyIO(const Mantid::API::BoxController *bc)
Constructor.
bool m_ReadOnly
identifier if the file open only for reading or is in read/write
std::string m_fileName
full file name (with path) of the Nexis file responsible for the IO operations (as NeXus filename has...
unsigned int m_CoordSize
number of bytes in the event coorinates (coord_t length).
void setDataType(const size_t blockSize, const std::string &typeName) override
The optional method to set up the event type and the size of the event coordinate As save/load operat...
void loadBlock(std::vector< float > &, const uint64_t, const size_t) const override
Load a block of data from properly prepared direct access data file.
const Mantid::API::BoxController * m_bc
shared pointer to the box controller, which is repsoponsible for this IO
This class is used by MDBox and MDGridBox in order to intelligently determine optimal behavior.
size_t getNDims() const
Get # of dimensions.
uint64_t getFileLength() const
void setFileLength(const uint64_t length) const
Set the length of the file that this MRU writes to.
Records the filename and the description of failure.