|
Mantid
|
#include <ISISInstrumentDataCache.h>
Public Member Functions | |
| std::string | getFileParentDirectoryPath (const std::string &filename) const |
| std::vector< std::string > | getRunNumbersInCache (std::string const &instrumentName) const |
| Get a vector of the run numbers' files present in the given instrument's data cache. | |
| bool | isIndexFileAvailable (std::string const &instrument) const |
| Check if the data cache index file is available on the current system for a given instrument. | |
| ISISInstrumentDataCache (const std::string &path) | |
Private Member Functions | |
| Mantid::Kernel::InstrumentInfo | getInstrumentFromName (const std::string &instName) const |
| std::filesystem::path | makeIndexFilePath (const std::string &instrumentName) const |
| std::pair< std::filesystem::path, Json::Value > | openCacheJsonFile (const Mantid::Kernel::InstrumentInfo &instrument) const |
| Open the Json file and return the path and the opened file object. | |
| std::pair< std::string, std::string > | splitIntoInstrumentAndNumber (const std::string &filename) const |
| std::pair< Mantid::Kernel::InstrumentInfo, std::string > | validateInstrumentAndNumber (const std::string &filename) const |
Private Attributes | |
| std::string | m_dataCachePath |
Definition at line 22 of file ISISInstrumentDataCache.h.
|
inline |
Definition at line 24 of file ISISInstrumentDataCache.h.
| std::string ISISInstrumentDataCache::getFileParentDirectoryPath | ( | const std::string & | filename | ) | const |
Definition at line 23 of file ISISInstrumentDataCache.cpp.
References Mantid::Kernel::Logger::debug(), Mantid::API::g_log, openCacheJsonFile(), and validateInstrumentAndNumber().
|
private |
Definition at line 99 of file ISISInstrumentDataCache.cpp.
Referenced by getRunNumbersInCache(), and validateInstrumentAndNumber().
| std::vector< std::string > ISISInstrumentDataCache::getRunNumbersInCache | ( | std::string const & | instrumentName | ) | const |
Get a vector of the run numbers' files present in the given instrument's data cache.
| instrumentName | The instrument to get run numbers for. |
Definition at line 49 of file ISISInstrumentDataCache.cpp.
References getInstrumentFromName(), and openCacheJsonFile().
| bool ISISInstrumentDataCache::isIndexFileAvailable | ( | std::string const & | instrumentName | ) | const |
Check if the data cache index file is available on the current system for a given instrument.
| instrumentName | The instrument to find the index file for. |
Definition at line 135 of file ISISInstrumentDataCache.cpp.
References makeIndexFilePath().
|
private |
Definition at line 108 of file ISISInstrumentDataCache.cpp.
References Mantid::Kernel::Logger::debug(), Mantid::API::g_log, and m_dataCachePath.
Referenced by isIndexFileAvailable(), and openCacheJsonFile().
|
private |
Open the Json file and return the path and the opened file object.
| instrument | The instrument to open the index file for. |
| std::invalid_argument | if the file could not be found. |
Definition at line 61 of file ISISInstrumentDataCache.cpp.
References Mantid::Kernel::Logger::debug(), Mantid::API::g_log, makeIndexFilePath(), Mantid::Kernel::InstrumentInfo::name(), and Mantid::Kernel::InstrumentInfo::shortName().
Referenced by getFileParentDirectoryPath(), and getRunNumbersInCache().
|
private |
Definition at line 116 of file ISISInstrumentDataCache.cpp.
Referenced by validateInstrumentAndNumber().
|
private |
Definition at line 80 of file ISISInstrumentDataCache.cpp.
References getInstrumentFromName(), and splitIntoInstrumentAndNumber().
Referenced by getFileParentDirectoryPath().
|
private |
Definition at line 36 of file ISISInstrumentDataCache.h.
Referenced by makeIndexFilePath().