12#pragma warning(disable : 4275)
28namespace FrameworkTestHelpers {
30namespace JSONTestInstrumentBuilder {
31void initialiseRoot(
const Json::Value &root,
const std::string &name);
32Json::Value &
addNXEntry(Json::Value &root,
const std::string &name);
33Json::Value &
addNXSample(Json::Value &entry,
const std::string &name);
34Json::Value &
addNXInstrument(Json::Value &entry,
const std::string &name);
36Json::Value &
addNXSource(Json::Value &instrument,
const std::string &name);
37Json::Value &
addNXMonitor(Json::Value &entry,
const std::string &name);
41 const std::string &writerModule);
43 const std::string &writerModule);
45Json::Value &
addNXChopper(Json::Value &instrument,
const std::string &name);
52 const std::string &writerModule);
54Json::Value &
addNXDetector(Json::Value &instrument,
const std::string &name);
58 const std::vector<double> &values = {0.049},
59 const std::vector<double> &vec = {0, 0, -1});
62 const std::vector<double> &values = {0.971},
63 const std::vector<double> &vec = {1, 0, 0});
66 const std::vector<double> &values = {90},
67 const std::vector<double> &vec = {0, 1, 0});
70 const std::vector<int32_t> &values);
72void addXPixelOffset(Json::Value &nxDetector,
const std::vector<int> &arrayShape,
const std::vector<double> &values);
74void addYPixelOffset(Json::Value &nxDetector,
const std::vector<int> &arrayShape,
const std::vector<double> &values);
76void addZPixelOffset(Json::Value &nxDetector,
const std::vector<int> &arrayShape,
const std::vector<double> &values);
78Json::Value &
addOffShape(Json::Value &nxDetector,
const std::string &name =
"pixel_shape");
79void addOffShapeFaces(Json::Value &shape,
const std::vector<int> &arrayShape = {1},
80 const std::vector<int> &faces = {0});
82 const std::vector<double> &vertices = {-0.001, -0.001, 0, 0.001, -0.001, 0, 0.001, 0.001, 0,
85 const std::vector<int> &windingOrder = {0, 1, 2, 3});
87Json::Value &
addCylindricalShape(Json::Value &nxDetector,
const std::string &name =
"pixel_shape");
89 const std::vector<int> &indices = {0, 1, 2});
91 const std::vector<double> &vertices = {-0.001, 0, 0, 0.001, 0.00405, 0, 0.001, 0, 0});
double value
The value of the point.
void addYPixelOffset(Json::Value &nxDetector, const std::vector< int > &arrayShape, const std::vector< double > &values)
void addNXMonitorName(Json::Value &monitor, const std::string &name)
void addNXInstrumentName(Json::Value &instrument, const std::string &name)
Json::Value & addNXSource(Json::Value &instrument, const std::string &name)
void addNXTransformationDependency(Json::Value &nxDetector, const std::string &dependencyPath)
void addNXMonitorWaveformStreamInfo(Json::Value &monitor, const std::string &topic, const std::string &source, const std::string &writerModule)
Json::Value & addNXTransformation(Json::Value &nxDetector, const std::string &name)
void addOffShapeWindingOrder(Json::Value &shape, const std::vector< int > &arrayShape={4}, const std::vector< int > &windingOrder={0, 1, 2, 3})
void addOffShapeFaces(Json::Value &shape, const std::vector< int > &arrayShape={1}, const std::vector< int > &faces={0})
void addNXChopperSlitEdges(Json::Value &chopper, const std::vector< double > &edges={0.0, 23.0})
void addNXTransformationBeamDirectionOffset(Json::Value &nxTransformation, const std::vector< int > &arrayShape={1}, const std::vector< double > &values={0.049}, const std::vector< double > &vec={0, 0, -1})
Json::Value & addNXDetector(Json::Value &instrument, const std::string &name)
Json::Value & addOffShape(Json::Value &nxDetector, const std::string &name="pixel_shape")
Json::Value & addCylindricalShape(Json::Value &nxDetector, const std::string &name="pixel_shape")
void addOffShapeVertices(Json::Value &shape, const std::vector< int > &arrayShape={4, 3}, const std::vector< double > &vertices={-0.001, -0.001, 0, 0.001, -0.001, 0, 0.001, 0.001, 0, -0.001, 0.001, 0})
const std::string convertToString(const Json::Value &value)
void addNXMonitorEventStreamInfo(Json::Value &monitor, const std::string &topic, const std::string &source, const std::string &writerModule)
void addXPixelOffset(Json::Value &nxDetector, const std::vector< int > &arrayShape, const std::vector< double > &values)
Json::Value & addNXInstrument(Json::Value &entry, const std::string &name)
void addNXChopperSlitHeight(Json::Value &chopper, const double slitHeight=150)
void addNXChopperSlits(Json::Value &chopper, const int32_t value)
Json::Value & addNXSample(Json::Value &entry, const std::string &name)
void addDetectorNumbers(Json::Value &nxDetector, const std::vector< int > &arrayShape, const std::vector< int32_t > &values)
void addCylindricalShapeCylinders(Json::Value &shape, const std::vector< int > &arrayShape={3}, const std::vector< int > &indices={0, 1, 2})
Json::Value & addNXMonitor(Json::Value &entry, const std::string &name)
void initialiseRoot(const Json::Value &root, const std::string &name)
void addNXMonitorDetectorID(Json::Value &monitor, const int32_t detectorID)
void addNXTransformationLocation(Json::Value &nxTransformation, const std::vector< int > &arrayShape={1}, const std::vector< double > &values={0.971}, const std::vector< double > &vec={1, 0, 0})
void addNXChopperName(Json::Value &chopper, const std::string &chopperName)
Json::Value & addNXChopper(Json::Value &instrument, const std::string &name)
void addZPixelOffset(Json::Value &nxDetector, const std::vector< int > &arrayShape, const std::vector< double > &values)
void addNXChopperRadius(Json::Value &chopper, const double radius=350)
void addCylindricalShapeVertices(Json::Value &shape, const std::vector< int > &arrayShape={3, 3}, const std::vector< double > &vertices={-0.001, 0, 0, 0.001, 0.00405, 0, 0.001, 0, 0})
Json::Value & addNXEntry(Json::Value &root, const std::string &name)
void addNXChopperTopDeadCenter(Json::Value &chopper, const std::string &topic, const std::string &source, const std::string &writerModule)
void addNXTransformationOrientation(Json::Value &nxTransformation, const std::vector< int > &arrayShape={1}, const std::vector< double > &values={90}, const std::vector< double > &vec={0, 1, 0})
std::string getJSONGeometryMissingChopperInformation()
std::string getJSONGeometryNoDetectorIDs()
std::string getFullJSONInstrumentSimpleCylindrical()
std::string getJSONGeometryEmptyCylindricalGeometry()
std::string getJSONGeometryMissingBeamDirectionOffset()
std::string getJSONGeometryNoYPixelOffset()
std::string getJSONGeometryInvalidOffGeometry()
std::string getJSONGeometryNoPixelShape()
std::string getFullJSONInstrumentSimpleWithChopper()
std::string getJSONGeometryNoInstrument()
std::string getFullJSONInstrumentSimpleOFF()
std::string getJSONGeometryMissingOrientation()
std::string getFullJSONInstrumentSimpleWithMonitor()
std::string getJSONGeometryNoXPixelOffset()
std::string getJSONGeometryMissingTransformations()
std::string getJSONGeometryNoDetectors()
std::string getJSONGeometryEmptyOffGeometry()
std::string getJSONGeometryMissingMonitorInformation()
std::string getJSONGeometryInvalidCylindricalGeometry()
std::string getFullJSONInstrumentSimpleWithMonitorNoShape()
std::string getJSONGeometryNoSample()
std::string getFullJSONInstrumentSimpleWithSource()
std::string getFullJSONInstrumentSimpleWithZPixelOffset()
Helper class which provides the Collimation Length for SANS instruments.