You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// The current recommended way of getting the XML file is to use the environment variables
// DETECTOR_PATH and DETECTOR_CONFIG or DETECTOR(deprecated).
// Look for those first, so we can use it for the default
// config parameter. (see https://github.com/eic/EICrecon/issues/22)
auto *detector_config_env = std::getenv("DETECTOR_CONFIG");
auto *detector_path_env = std::getenv("DETECTOR_PATH");
std::string detector_config;
// Check if detector_config_env is set
if(detector_config_env != nullptr) {
detector_config = detector_config_env;
}
// do we have default file name
if(!detector_config.empty()) {
m_xml_files.push_back(std::string(detector_path_env ? detector_path_env : ".") + "/" + detector_config + ".xml");
}
// User may specify multiple geometry files via the config. parameter. Normally, this
// will be a single file which itself has includes for other files.
app->SetDefaultParameter("dd4hep:xml_files", m_xml_files, "Comma separated list of XML files describing the DD4hep geometry. (Defaults to ${DETECTOR_PATH}/${DETECTOR_CONFIG}.xml using envars.)");
Passing -Pdd4hep:xml_files=$DETECTOR_PATH/$DETECTOR_CONFIG.xml works fine; it's just the defaults that are duplicated on parsing.
The text was updated successfully, but these errors were encountered:
Hi @AyanRoy16 , I haven't looked through the recent parameter handling fixes you implemented, but that's where I would start. I don't think EICrecon does anything strange, so I expect this can be reproduced in a unit test.
With JANA2@master (1dc9158), the interpretation of the geometry parameter
dd4hep::xml_files
leads to duplication of the default value.Steps to reproduce
export DETECTOR_CONFIG=epic_craterlake
eicrecon sim_dis_18x275_minQ2=1000_craterlake.edm4hep.root
with that file from https://github.com/eic/EICrecon/actions/runs/6566489975Expected results
This should load geometry once.
Actual results
Tries (and fails) to load geometry twice (then 4 times, then 8 times, you get the idea).
Debugging
Info lines:
were added with
Relevant JANA2 calls at https://github.com/eic/EICrecon/blob/acts-upgrade-26/src/services/geometry/dd4hep/DD4hep_service.cc#L64-L84:
Passing
-Pdd4hep:xml_files=$DETECTOR_PATH/$DETECTOR_CONFIG.xml
works fine; it's just the defaults that are duplicated on parsing.The text was updated successfully, but these errors were encountered: