Skip to content

Commit

Permalink
fix: rm references to $DETECTOR in DD4hep_service.cc (#1232)
Browse files Browse the repository at this point in the history
### 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.
  • Loading branch information
wdconinc authored Jan 14, 2024
1 parent 18b7de8 commit 19745a0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/services/geometry/dd4hep/DD4hep_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ void DD4hep_service::Initialize() {
}

// The current recommended way of getting the XML file is to use the environment variables
// DETECTOR_PATH and DETECTOR_CONFIG or DETECTOR(deprecated).
// DETECTOR_PATH and DETECTOR_CONFIG.
// Look for those first, so we can use it for the default
// config parameter. (see https://github.com/eic/EICrecon/issues/22)
// config parameter.
auto *detector_config_env = std::getenv("DETECTOR_CONFIG");
auto *detector_path_env = std::getenv("DETECTOR_PATH");

Expand Down Expand Up @@ -175,7 +175,7 @@ std::string DD4hep_service::resolveFileName(const std::string &filename, char *d
// on the screen to be that this file doesn't exist.
auto mess = fmt::format(fmt::emphasis::bold | fg(fmt::color::red), "ERROR: ");
mess += fmt::format(fmt::emphasis::bold, "file: {} does not exist!", filename);
mess += "\nCheck that your DETECTOR and DETECTOR_CONFIG environment variables are set correctly.";
mess += "\nCheck that your DETECTOR_PATH and DETECTOR_CONFIG environment variables are set correctly.";
std::cerr << std::endl << std::endl << mess << std::endl << std::endl; // TODO standard log here!
std::_Exit(EXIT_FAILURE);
}
Expand Down

0 comments on commit 19745a0

Please sign in to comment.