20#include <boost/python/class.hpp>
21#include <boost/python/copy_const_reference.hpp>
22#include <boost/python/list.hpp>
23#include <boost/python/overloads.hpp>
24#include <boost/python/register_ptr_to_python.hpp>
40 const
std::
string &date) {
47 PyErr_Warn(PyExc_DeprecationWarning,
"ExperimentInfo.getInstrumentFilename() is deprecated.\n"
48 "Use InstrumentFileFinder.getInstrumentFilename() instead.");
67 register_ptr_to_python<std::shared_ptr<ExperimentInfo>>();
69 class_<ExperimentInfo, boost::noncopyable>(
"ExperimentInfo", no_init)
71 "Returns the :class:`~mantid.geometry.Instrument` for this run.")
74 (arg(
"prefix"), arg(
"fileFormats"), arg(
"directoryNames"), arg(
"date")),
75 "Compile a list of files in compliance with name pattern-matching,\n"
76 "file format, and date-stamp constraints\n\n"
77 "Ideally, the valid-from and valid-to of any valid file should\n"
78 "encapsulate the argument date. If this is not possible, then\n"
79 "the file with the most recent valid-from stamp is selected\n\n"
80 "prefix: the name of a valid file must begin with this "
82 "fileFormats: list of valid file extensions\n"
83 "directoryNames: list of directories to be searched\n"
84 "date : the 'valid-from' and 'valid-to 'dates of a valid\n"
85 "file will encapsulate this date (e.g '1900-01-31 23:59:00')\n"
86 "\nreturns : list of absolute paths for each valid file\n")
87 .staticmethod(
"getResourceFilenames")
89 getInstrumentFilename_Overload(
"Returns IDF filename", (arg(
"instrument"), arg(
"date") =
"")))
90 .staticmethod(
"getInstrumentFilename")
92 "Return the :class:`~mantid.api.Sample` object. This cannot be "
93 "modified, use mutableSample to modify.")
95 args(
"self"),
"Return a modifiable :class:`~mantid.api.Sample` object.")
96 .def(
"run", &
ExperimentInfo::run, return_value_policy<reference_existing_object>(), args(
"self"),
97 "Return the :class:`~mantid.api.Run` object. This cannot be "
98 "modified, use mutableRun to modify.")
100 "Return a modifiable :class:`~mantid.api.Run` object.")
103 args(
"self",
"detId"))
108 "Return a const reference to the "
109 ":class:`~mantid.geometry.DetectorInfo` "
113 "Return a const reference to the :class:`~mantid.api.SpectrumInfo` "
117 "Return a const reference to the "
118 ":class:`~mantid.geometry.ComponentInfo` "
120 .def(
"setSample", setSample, args(
"self",
"sample"))
121 .def(
"setRun", setRun, args(
"self",
"run"));
#define GET_POINTER_SPECIALIZATION(TYPE)
std::string getInstrumentFilenameWarn(const std::string &instName, const std::string &date="")
list getResourceFilenames(const std::string &prefix, const list &fileFormats, const list &directoryNames, const std::string &date)
Converter from C++ signature to python signature.
void export_ExperimentInfo()
#define GNU_DIAG_OFF(x)
This is a collection of macros for turning compiler warnings off in a controlled manner.
This class is shared by a few Workspace types and holds information related to a particular experimen...
Run & mutableRun()
Writable version of the run object.
const SpectrumInfo & spectrumInfo() const
Return a reference to the SpectrumInfo object.
const Geometry::DetectorInfo & detectorInfo() const
Return a const reference to the DetectorInfo object.
double getEFixed(const detid_t detID) const
Easy access to the efixed value for this run & detector ID.
const Run & run() const
Run details object access.
Geometry::Instrument_const_sptr getInstrument() const
Returns the parameterized instrument.
Kernel::DeltaEMode::Type getEMode() const
Returns the emode for this run.
const Sample & sample() const
Sample accessors.
void setEFixed(const detid_t detID, const double value)
Set the efixed value for a given detector ID.
int getRunNumber() const
Utility method to get the run number.
const Geometry::ComponentInfo & componentInfo() const
Sample & mutableSample()
Writable version of the sample object.
static std::vector< std::string > getResourceFilenames(const std::string &prefix, const std::vector< std::string > &fileFormats, const std::vector< std::string > &directoryNames, const std::string &date)
Utility to retrieve a resource file (IDF, Parameters, ..)
static std::string getInstrumentFilename(const std::string &instrumentName, const std::string &date="")
Get the IDF using the instrument name and date.
This class stores information regarding an experimental run as a series of log entries.
This class stores information about the sample used in particular run.
int32_t detid_t
Typedef for a detector ID.
Converts a Python sequence type to a C++ std::vector, where the element type is defined by the templa...
Converter that takes a std::vector and converts it into a python list.
Implements the RemoveConstSharedPtr policy.