Ticket #9064 (closed: fixed)
Create SetInstrumentParameter Algorithm
Reported by: | Stuart Campbell | Owned by: | Nick Draper |
---|---|---|---|
Priority: | major | Milestone: | Release 3.2 |
Component: | Framework | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Wenduo Zhou |
Description
Create an algorithm to set/add a parameter onto the instrument. This should allow the specification of the instrument component for the value to be attached to, the parameter name and value.
If there is documentation relating to instrument parameters, then the existence of this algorithm should be add there.
Change History
comment:2 Changed 7 years ago by Nick Draper
Got the commit ticket id wrong:
New SetInstrumentParameter algorithm Allows instrument parameters to be easily set using an algorithm.
re #9064
comment:3 Changed 7 years ago by Nick Draper
- Status changed from assigned to verify
- Resolution set to fixed
comment:4 Changed 7 years ago by Wenduo Zhou
- Status changed from verify to verifying
- Tester set to Wenduo Zhou
comment:5 Changed 7 years ago by Wenduo Zhou
- Status changed from verifying to reopened
- Resolution fixed deleted
MantidPlot crashed during test. The ticket is thus reopened.
Here are 2 cases how to reproduce the issue.
- Load PG3_2538_event.nxs with meta data only and logs
- Run SetInstrumentParameter wit ComponentName = monitor1, ParameterName = a, ParameterType = Number and Value = 33. It may or may not crash. (I tried twice, crashed once)
- Run SetInstrumentParameter again. But this time, set Value to 33.3, while keep the other parameters as step 2. Then MantidPlot crashes when it is executed.
comment:6 Changed 7 years ago by Wenduo Zhou
This is the error message that I saw: "terminate called after throwing an instance of 'std::runtime_error'
what(): ParameterMap::add - Type mismatch on parameter replacement
"
comment:7 Changed 7 years ago by Nick Draper
- Status changed from reopened to inprogress
re #9064 remove previous parameter before adding
Changeset: 824929fff076b7a1aaf59d3e9c4fee8fe4dab804
comment:8 Changed 7 years ago by Nick Draper
Wenduo's problem was that it wasn't clearing away duplicates of the parametes, so you could have both a string and number parameter with the same name.
There is now a unit test for this, and matching parameters are cleared before new ones are added.
comment:9 Changed 7 years ago by Nick Draper
- Status changed from inprogress to verify
- Resolution set to fixed
comment:10 Changed 7 years ago by Nick Draper
re #9064 Fixed a const error
Changeset: 629c31a70f93765cd828aa01be662bb571a19ce2
comment:12 Changed 7 years ago by Wenduo Zhou
- Status changed from verifying to closed
SetInstrumentParameter works as what is designed. Test is passed.
comment:13 Changed 7 years ago by Wenduo Zhou
Merge remote-tracking branch 'origin/feature/9064_SetInstrumentParameter'
Full changeset: 28ef8a5199633105c1ca2829e5572d47fe9263a1
comment:14 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 9907