8#include <boost/format.hpp>
27 std::vector<std::string> rez;
36 throw(std::invalid_argument(
"Unknown dE mode provided"));
46 std::vector<std::string> rez;
55 throw(std::invalid_argument(
"Unknown dE mode provided"));
67 if ((absDir[0] >= absDir[1]) && (absDir[0] >= absDir[2])) {
69 }
else if (absDir[1] >= absDir[2]) {
75 std::string name(
"["), separator =
",";
76 for (
size_t i = 0; i < 3; i++) {
80 if (absDir[i] < eps) {
81 name +=
"0" + separator;
87 if (std::fabs(absDir[i] - 1) < eps) {
88 name.append(mainName).append(separator);
91 name.append(
sprintfd(absDir[i], eps)).append(mainName).append(separator);
98 double dist = std::round(data / eps) * eps;
99 return boost::str(boost::format(
"%d") % dist);
#define DLLExport
Definitions of the DLLImport compiler directives for MSVC.
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 DLLExport sprintfd(const double data, const double eps)
creates string representation of the number with accuracy, cpecified by eps
std::string DLLExport 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,...