Make all paths relative#95
Conversation
|
|
||
| MyDDMarlinPandora.Parameters |= { | ||
| "PandoraSettingsXmlFile": ["PandoraSettingsCLD/PandoraSettingsDefault.xml"], | ||
| "PandoraSettingsXmlFile": [f"{dir_path}/../PandoraSettingsCLD/PandoraSettingsDefault.xml"], |
There was a problem hiding this comment.
Can we do something even better, check in Python if this exists and fail otherwise? Countless of times I start running only to see that it fails when initializing Pandora, which is not too late but still
There was a problem hiding this comment.
Great idea! We could already add a helpful error message now, I might add it tomorrow if I remember.
There was a problem hiding this comment.
Countless of times I start running only to see that it fails when initializing Pandora, which is not too late but still
I tried, but how do you even get to that point? If I run it from somewhere else it already fails at the py_utils import...
I could change this PR to include the warning for Pandora, then stuff like tracking only should be runnable from anywhere and only when Pandora is needed it will warn.
… the help message
BEGINRELEASENOTES
CLDReconstruction.pyrunnable from other directories #88ENDRELEASENOTES
passes all our tests, but when you try to actually run the reconstruction from a different directory, it fails because of
CLDConfig/CLDConfig/PandoraSettingsCLD/PandoraSettingsDefault.xml
Line 100 in 691ef7e
Handling this without creating a new file every time would need an extension of Pandora and its API to offer a copy of
Pandora::ReadSettingsthat takes the XML as a string directly. Then we could dynamically rewrite the path from our side.