29 return Mantid::Types::Core::DateAndTime(root.
getString(
"run/start_time"));
31 return Mantid::Types::Core::DateAndTime(root.
getString(
"run/stop_time"));
38 return Mantid::Types::Core::DateAndTime(root.
getString(
"mantid_workspace_1/logs/run_start/value"));
40 return Mantid::Types::Core::DateAndTime(root.
getString(
"mantid_workspace_1/logs/run_end/value"));
47 return Mantid::Types::Core::DateAndTime(root.
getString(
"raw_data_1/start_time"));
49 return Mantid::Types::Core::DateAndTime(root.
getString(
"raw_data_1/end_time"));
56 return Mantid::Types::Core::DateAndTime(root.
getString(
"entry/start_time"));
58 return Mantid::Types::Core::DateAndTime(root.
getString(
"entry/end_time"));
63 std::vector<std::string> entryName;
64 std::vector<std::string> definition;
71 }
else if (
count == 0) {
72 g_log.
error(
"Error no entries found in " + filename);
79 }
else if (entryName[0] ==
"mantid_workspace_1") {
82 }
else if (entryName[0] ==
"raw_data_1") {
90 g_log.
error(
"File " + filename +
" is a currently unsupported type of NeXus file");
104 Mantid::Types::Core::DateAndTime dateAndTime;
120 throw std::runtime_error(
"Unkown Nexus format. Not able to extract a date and time.");
static const std::string muonTD
static const std::string pulsedTD
Records the filename and the description of failure.
The Logger class is in charge of the publishing messages from the framework through various channels.
void error(const std::string &msg)
Logs at error level.
static T & Instance()
Return a reference to the Singleton instance, creating it if it does not already exist Creation is do...
std::vector< NXClassInfo > & groups() const
Returns a list of all classes (or groups) in this NXClass.
NXChar openNXChar(const std::string &name) const
Creates and opens a char dataset.
std::string getString(const std::string &name) const
Returns a string.
Templated class implementation of NXDataSet.
Implements NXentry Nexus class.
Implements NXroot Nexus class.
NXEntry openEntry(const std::string &name)
Opens an entry – a topmost Nexus class.
Kernel::Logger g_log("ExperimentInfo")
static logger object
Mantid::Types::Core::DateAndTime DLLExport extractEndTime(const std::string &filename)
Gets the start time from the nexus file.
NexusType whichNexusType(const std::string &filename)
Mantid::Types::Core::DateAndTime handleProcessedNexusFile(TimeType type, const std::string &filename)
Mantid::Types::Core::DateAndTime handleISISNexusFile(TimeType type, const std::string &filename)
Mantid::Types::Core::DateAndTime extractDateAndTime(TimeType type, const std::string &filename)
Mantid::Types::Core::DateAndTime handleMuonNexusFile(TimeType type, const std::string &filename)
Mantid::Types::Core::DateAndTime DLLExport extractStartTime(const std::string &filename)
Extracts the start and the end time from a Nexus file.
Mantid::Types::Core::DateAndTime handleTofRawNexusFile(TimeType type, const std::string &filename)
MANTID_NEXUS_DLL int getNexusEntryTypes(const std::string &fileName, std::vector< std::string > &entryName, std::vector< std::string > &definition)
Get all the Nexus entry types for a file.