8#include "MantidMDAlgorithms/DllConfig.h"
9#include <boost/format.hpp>
28 std::vector<std::string> rez;
37 throw(std::invalid_argument(
"Unknown dE mode provided"));
47 std::vector<std::string> rez;
56 throw(std::invalid_argument(
"Unknown dE mode provided"));
68 if ((absDir[0] >= absDir[1]) && (absDir[0] >= absDir[2])) {
70 }
else if (absDir[1] >= absDir[2]) {
76 std::string
name(
"["), separator =
",";
77 for (
size_t i = 0; i < 3; i++) {
81 if (absDir[i] < eps) {
82 name +=
"0" + separator;
88 if (std::fabs(absDir[i] - 1) < eps) {
89 name.append(mainName).append(separator);
92 name.append(
sprintfd(absDir[i], eps)).append(mainName).append(separator);
97std::string MANTID_MDALGORITHMS_DLL
sprintfd(
const double data,
const double eps) {
99 double dist = std::round(data / eps) * eps;
100 return boost::str(boost::format(
"%d") % dist);
constexpr double X() const noexcept
Get x.
constexpr double Y() const noexcept
Get y.
constexpr double Z() const noexcept
Get z.
std::vector< std::string > getDefaultDimIDModQ(Kernel::DeltaEMode::Type dEMode) const
std::vector< std::string > getDefaultDimIDQ3D(Kernel::DeltaEMode::Type dEMode) const
function returns default dimension id-s for different Q and dE modes, defined by this class
std::vector< std::string > m_DefaultDimID
the vector describes default dimension names, specified along the axis if no names are explicitly req...
std::string MANTID_MDALGORITHMS_DLL sprintfd(const double data, const double eps)
creates string representation of the number with accuracy, cpecified by eps
std::string MANTID_MDALGORITHMS_DLL makeAxisName(const Kernel::V3D &Dir, const std::vector< std::string > &QNames)
function to build mslice-like axis name from the vector, which describes crystallographic direction a...
Type
Define the available energy transfer modes It is important to assign enums proper numbers,...