Mantid
|
#include <LoadANSTOHelper.h>
Classes | |
struct | FileInfo |
Public Member Functions | |
void | close () |
File (const std::string &path) | |
const std::vector< std::string > & | files () const |
bool | good () const |
size_t | read (void *dst, size_t size) |
int | read_byte () |
bool | select (const char *file) |
const std::string & | selected_name () const |
int64_t | selected_position () const |
int64_t | selected_size () const |
bool | skip (uint64_t offset) |
Static Public Member Functions | |
static bool | append (const std::string &path, const std::string &name, const void *buffer, size_t size) |
Private Member Functions | |
File (const File &) | |
File & | operator= (const File &) |
Private Attributes | |
uint8_t | m_buffer [BUFFER_SIZE] |
size_t | m_bufferAvailable |
size_t | m_bufferPosition |
FastReadOnlyFile | m_file |
std::vector< FileInfo > | m_fileInfos |
std::vector< std::string > | m_fileNames |
bool | m_good |
int64_t | m_position |
size_t | m_selected |
int64_t | m_size |
Static Private Attributes | |
static const auto | BUFFER_SIZE = 4096 |
Definition at line 207 of file LoadANSTOHelper.h.
|
private |
Mantid::DataHandling::ANSTO::Tar::File::File | ( | const std::string & | path | ) |
Definition at line 227 of file LoadANSTOHelper.cpp.
References Mantid::DataHandling::ANSTO::FastReadOnlyFile::handle(), m_file, m_fileInfos, m_fileNames, m_good, Mantid::DataHandling::ANSTO::Tar::File::FileInfo::Offset, position, Mantid::DataHandling::ANSTO::FastReadOnlyFile::read(), Mantid::DataHandling::ANSTO::FastReadOnlyFile::seek(), Mantid::DataHandling::ANSTO::Tar::File::FileInfo::Size, and TarTypeFlag_NormalFile.
|
static |
Definition at line 389 of file LoadANSTOHelper.cpp.
References good(), Mantid::DataHandling::ANSTO::Tar::File::FileInfo::Offset, position, Mantid::DataHandling::ANSTO::Tar::File::FileInfo::Size, and TarTypeFlag_NormalFile.
Referenced by Mantid::DataHandling::PatchBBY::exec().
void Mantid::DataHandling::ANSTO::Tar::File::close | ( | ) |
Definition at line 261 of file LoadANSTOHelper.cpp.
References Mantid::DataHandling::ANSTO::FastReadOnlyFile::close(), m_bufferAvailable, m_bufferPosition, m_file, m_fileInfos, m_fileNames, m_good, m_position, m_selected, and m_size.
Referenced by Mantid::DataHandling::PatchBBY::exec().
const std::vector< std::string > & Mantid::DataHandling::ANSTO::Tar::File::files | ( | ) | const |
Definition at line 275 of file LoadANSTOHelper.cpp.
References m_fileNames.
Referenced by Mantid::DataHandling::LoadBBY::confidence(), Mantid::DataHandling::LoadEMUTar::confidence(), Mantid::DataHandling::LoadBBY::createInstrument(), Mantid::DataHandling::LoadBBY::exec(), Mantid::DataHandling::LoadEMUTar::exec(), Mantid::DataHandling::PatchBBY::exec(), and Mantid::DataHandling::LoadBBY::loadEvents().
bool Mantid::DataHandling::ANSTO::Tar::File::good | ( | ) | const |
Definition at line 274 of file LoadANSTOHelper.cpp.
References m_good.
Referenced by append(), Mantid::DataHandling::LoadBBY::confidence(), Mantid::DataHandling::LoadEMUTar::confidence(), Mantid::DataHandling::LoadBBY::exec(), Mantid::DataHandling::LoadEMUTar::exec(), and Mantid::DataHandling::PatchBBY::exec().
size_t Mantid::DataHandling::ANSTO::Tar::File::read | ( | void * | dst, |
size_t | size | ||
) |
Definition at line 327 of file LoadANSTOHelper.cpp.
References m_buffer, m_bufferAvailable, m_bufferPosition, m_file, m_good, m_position, m_selected, m_size, and Mantid::DataHandling::ANSTO::FastReadOnlyFile::read().
Referenced by Mantid::DataHandling::LoadBBY::createInstrument(), Mantid::DataHandling::LoadEMUTar::exec(), and Mantid::DataHandling::PatchBBY::exec().
int Mantid::DataHandling::ANSTO::Tar::File::read_byte | ( | ) |
Definition at line 366 of file LoadANSTOHelper.cpp.
References m_buffer, m_bufferAvailable, m_bufferPosition, m_file, m_good, m_position, m_selected, m_size, and Mantid::DataHandling::ANSTO::FastReadOnlyFile::read().
Referenced by Mantid::DataHandling::LoadBBY::loadEvents().
bool Mantid::DataHandling::ANSTO::Tar::File::select | ( | const char * | file | ) |
Definition at line 281 of file LoadANSTOHelper.cpp.
References m_bufferAvailable, m_bufferPosition, m_file, m_fileInfos, m_fileNames, m_good, m_position, m_selected, m_size, Mantid::DataHandling::ANSTO::Tar::File::FileInfo::Offset, Mantid::DataHandling::ANSTO::FastReadOnlyFile::seek(), and Mantid::DataHandling::ANSTO::Tar::File::FileInfo::Size.
Referenced by Mantid::DataHandling::LoadBBY::createInstrument(), Mantid::DataHandling::LoadEMUTar::exec(), Mantid::DataHandling::PatchBBY::exec(), and Mantid::DataHandling::LoadBBY::loadEvents().
const std::string & Mantid::DataHandling::ANSTO::Tar::File::selected_name | ( | ) | const |
Definition at line 276 of file LoadANSTOHelper.cpp.
References m_fileNames, and m_selected.
int64_t Mantid::DataHandling::ANSTO::Tar::File::selected_position | ( | ) | const |
Definition at line 277 of file LoadANSTOHelper.cpp.
References m_position.
Referenced by Mantid::DataHandling::LoadBBY::loadEvents().
int64_t Mantid::DataHandling::ANSTO::Tar::File::selected_size | ( | ) | const |
Definition at line 278 of file LoadANSTOHelper.cpp.
References m_size.
Referenced by Mantid::DataHandling::LoadBBY::createInstrument(), Mantid::DataHandling::PatchBBY::exec(), and Mantid::DataHandling::LoadBBY::loadEvents().
bool Mantid::DataHandling::ANSTO::Tar::File::skip | ( | uint64_t | offset | ) |
Definition at line 305 of file LoadANSTOHelper.cpp.
References m_bufferAvailable, m_bufferPosition, m_file, m_good, m_position, m_selected, m_size, and Mantid::DataHandling::ANSTO::FastReadOnlyFile::seek().
Referenced by Mantid::DataHandling::LoadBBY::loadEvents().
|
staticprivate |
Definition at line 209 of file LoadANSTOHelper.h.
|
private |
Definition at line 227 of file LoadANSTOHelper.h.
Referenced by read(), and read_byte().
|
private |
Definition at line 229 of file LoadANSTOHelper.h.
Referenced by close(), read(), read_byte(), select(), and skip().
|
private |
Definition at line 228 of file LoadANSTOHelper.h.
Referenced by close(), read(), read_byte(), select(), and skip().
|
private |
Definition at line 219 of file LoadANSTOHelper.h.
Referenced by close(), File(), read(), read_byte(), select(), and skip().
|
private |
Definition at line 221 of file LoadANSTOHelper.h.
|
private |
Definition at line 220 of file LoadANSTOHelper.h.
Referenced by close(), File(), files(), select(), and selected_name().
|
private |
Definition at line 218 of file LoadANSTOHelper.h.
Referenced by close(), File(), good(), read(), read_byte(), select(), and skip().
|
private |
Definition at line 224 of file LoadANSTOHelper.h.
Referenced by close(), read(), read_byte(), select(), selected_position(), and skip().
|
private |
Definition at line 223 of file LoadANSTOHelper.h.
Referenced by close(), read(), read_byte(), select(), selected_name(), and skip().
|
private |
Definition at line 225 of file LoadANSTOHelper.h.
Referenced by close(), read(), read_byte(), select(), selected_size(), and skip().