Ticket #5659 (closed: fixed)
Component member function to get fully qualified path name of component
Reported by: | Karl Palmen | Owned by: | Karl Palmen |
---|---|---|---|
Priority: | major | Milestone: | Release 2.3 |
Component: | Mantid | Keywords: | |
Cc: | anders.markvardsen@… | Blocked By: | |
Blocking: | Tester: | Gesner Passos |
Description (last modified by Karl Palmen) (diff)
It would be useful to be able to get the fully qualified path name of a component. It could save python code being written possibly several times to do this, whenever necessary to report details of the current component.
Change History
comment:1 Changed 8 years ago by Karl Palmen
- Cc anders.markvardsen@… added
- Description modified (diff)
- Summary changed from Component member function to get fully qualifed path name of component to Component member function to get fully qualified path name of component
comment:2 Changed 8 years ago by Karl Palmen
- Owner set to Karl Palmen
- Status changed from new to assigned
comment:3 Changed 8 years ago by Nick Draper
- Milestone changed from Release 2.2 to Release 2.3
Moved at the end of release 2.2
comment:4 Changed 8 years ago by Karl Palmen
Fixing this as well as #5658 would enable the correct saving and loading of instrument parameters for all components. At present it does not work for all tubes in MERLIN or WISH, because the name of the tube is not unique to the instrument. I expect that only trivial parameters are presently stored with such tubes and so this has not yet caused a problem.
A fully qualified pathname is sufficient, not necessary, steps can be skipped provided each remaining step is unique within whatever lies to the right. For example, 'WISH/panel03/WISHpanel03/tube005' could be written 'panel03/tube005', because 'panel03' is unique within the instrument and 'tube005' is unique within 'panel03'. Instrument::getComponentByName as fixed by #5658, would accept such as string.
comment:6 Changed 8 years ago by Karl Palmen
Can be implemented by calling Component::getAncestors and then getting the name of each ancestor and putting the names together appropriately into a string.
comment:8 Changed 8 years ago by Karl Palmen
Added code to return full name re #5659
Compiles but still needs testing
Signed-off-by: Karl Palmen <karl.palmen@…>
Changeset: 0697b0daaa253d2e67e015d89cda81f2170081b9
comment:9 Changed 8 years ago by Karl Palmen
Put ancestor's name rather than ancestor into full name re #5659
Signed-off-by: Karl Palmen <karl.palmen@…>
Changeset: c598cf7e05a936712c86d96dff241bc465d8fecf
comment:10 Changed 8 years ago by Karl Palmen
Corrected Code and Added Unit Test re #5659
Signed-off-by: Karl Palmen <karl.palmen@…>
Changeset: e4c1c3a1c7d88db74d3f33f151e19d3690e397de
comment:11 Changed 8 years ago by Karl Palmen
Work may still need to be done to make it visible in python.
comment:12 Changed 8 years ago by Karl Palmen
Expose Icomponent.getFullName to python re #5659
Signed-off-by: Karl Palmen <karl.palmen@…>
Changeset: 9b29651c6eb1f49cc5fb8c20983fae2b38b5e712
comment:13 Changed 8 years ago by Karl Palmen
- Status changed from accepted to verify
- Resolution set to fixed
comment:14 Changed 8 years ago by Karl Palmen
Added code to return full name re #5659
Compiles but still needs testing
Signed-off-by: Karl Palmen <karl.palmen@…>
Changeset: 0697b0daaa253d2e67e015d89cda81f2170081b9
comment:15 Changed 8 years ago by Karl Palmen
Put ancestor's name rather than ancestor into full name re #5659
Signed-off-by: Karl Palmen <karl.palmen@…>
Changeset: c598cf7e05a936712c86d96dff241bc465d8fecf
comment:16 Changed 8 years ago by Karl Palmen
Corrected Code and Added Unit Test re #5659
Signed-off-by: Karl Palmen <karl.palmen@…>
Changeset: e4c1c3a1c7d88db74d3f33f151e19d3690e397de
comment:17 Changed 8 years ago by Gesner Passos
- Status changed from verify to verifying
- Tester set to Gesner Passos
comment:18 Changed 8 years ago by Gesner Passos
- Status changed from verifying to closed
This ticket passed. But a new one: #6047 was created to deal with strange behavior inside the MERLIN data files. Tested for SRF, GEM, LOQ, SANS2D, EMU and MERLIN
comment:19 Changed 8 years ago by Karl Palmen
Expose Icomponent.getFullName to python re #5659
Signed-off-by: Karl Palmen <karl.palmen@…>
Changeset: 9b29651c6eb1f49cc5fb8c20983fae2b38b5e712
comment:20 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 6505
some typing errors corrected and cc added