Ticket #1899 (closed: fixed)
Write a helper class that constructs an example instrument for use in unit tests
Reported by: | Russell Taylor | Owned by: | Janik Zikovsky |
---|---|---|---|
Priority: | critical | Milestone: | Iteration 26 |
Component: | Mantid | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Russell Taylor |
Description
This will be used in any test of an algorithm that requires an instrument to be defined on the workspace, in place of loading a data file or even an instrument xml file.
The class should directly construct a dummy instrument from the Geometry C++ API. This should include source, sample and monitor(s) in sensible positions and a selection of detectors/banks of various types/shapes. It could be configurable such that the calling client could choose the distances and types of detectors.
Once complete, methods could be added to WorkspaceHelper.hh to construct a full workspace including an instrument and a spectraDetectorMap. However, this should not be made the default because we want to keep our unit tests as lean as possible and plenty of them do not require any instrument information.
Change History
comment:1 Changed 10 years ago by Nick Draper
- Status changed from new to assigned
- Owner set to Russell Taylor
comment:2 Changed 10 years ago by Janik Zikovsky
- Owner changed from Russell Taylor to Janik Zikovsky
- Status changed from assigned to accepted
comment:5 Changed 10 years ago by Janik Zikovsky
- Status changed from accepted to verify
- Resolution set to fixed
comment:6 Changed 10 years ago by Russell Taylor
- Status changed from verify to verifying
- Tester set to Russell Taylor