-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DETECTOR is not deprecated, but serves different purpose than DETECTOR_CONFIG #290
Comments
Is there any place where those collaboration global variables are described? Because previously in our documentation was written that one sets "DETECTOR" environment variable such as epic_arches . And then it was said that instead of DETECTOR environment variable DETECTOR_CONFIG should be used. In order to make smooth transition for scripts I made a deprecation warning for using DETECTOR env as epic_arches and suggested that DETECTOR_CONFIG should be used. In terms of EICrecon it is a deprecation. |
Lets kind of define what is the expected behavior Now we have this in documentation https://eic.github.io/EICrecon/#/design/common_flags_env?id=environment-variables |
@wdconinc If you list it here it will also work |
@wdconinc bump |
You should not rely on hardcoded names of environment variables to pass the geometry but you should use the value of a parameter for a plugin ( |
That, I believe, needs to be passed to @faustus123 as he had a very strong argument, that in general At the same time, As of my opinion on this, I was strongly on your side (@wdconinc) in the beginning, but after speaking with David and thinking changed my mind. The decision, to use environment variables to set default values as this would cover 99% cases - is balanced between users conveniece and public interface goodness. But you are correct, that
Or if we will split EICrecon to some generic parts + EIC part, that could be this generic part thing. Better to have a convention ready then for such things. P.S. What I concern more of, is that I believe having WHATEVER_DETECTOR_CONFIG without extension (.xml) is confusing. It would be better to have a full path only. |
It looks like the printed warning with the misleading "deprecated" statement was removed in PR#293 11 days ago. I'm going to close this as an issue for now and suggest any further discussion be brought up in another forum since it is much broader than this one piece of code. |
In 0.3.4 currently in eic-shell there are still references to DETECTOR alongside DETECTOR_CONFIG: ERROR: file: /opt/local/share/epic/epic.xml does not exist!
Check that your DETECTOR and DETECTOR_CONFIG environment variables are set correctly. |
### Briefly, what does this PR introduce? This PR removes some remaining references to the environment variable DETECTOR, which is not used and should not be referred to. ### What kind of change does this PR introduce? - [x] Bug fix (issue #290) - [ ] New feature (issue #__) - [ ] Documentation update - [ ] Other: __ ### Please check if this PR fulfills the following: - [ ] Tests for the changes have been added - [ ] Documentation has been added / updated - [ ] Changes have been communicated to collaborators ### Does this PR introduce breaking changes? What changes might users need to make to their code? No. ### Does this PR change default behavior? No.
In https://github.com/eic/EICrecon/blob/main/src/services/geometry/dd4hep/JDD4hep_service.cc#L66 eicrecon generates the warning
[WARN] DETECTOR environment variable is deprecated. Use DETECTOR_CONFIG instead
even when
DETECTOR_CONFIG
is defined (that's only checked later).This is somewhat misleading since
DETECTOR_CONFIG
is what defines the detector configuration (e.g.epic_arches
,epic_tracking_only
) under a specificDETECTOR
description (e.g.epic
). TheDETECTOR_CONFIG
starts withDETECTOR
.This means that
DETECTOR
is not deprecated. It just isn't the variable that should be used to pass the configuration to use.The text was updated successfully, but these errors were encountered: