Skip to content
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

Fix Issue 875 #936

Merged
merged 6 commits into from
Jul 26, 2022
Merged

Conversation

MarkusFrankATcernch
Copy link
Contributor

@MarkusFrankATcernch MarkusFrankATcernch commented Jul 26, 2022

BEGINRELEASENOTES

  • Recursive calls to apply-plugins overwrote the return code.

  • This MR fixes issue PluginFactoryBase::make_return problem with longs #875

  • Support for 1D, 2D and 3D parameterised volumes.
    (Outstanding request by S.Ko)

    1. TGeo does not support parametrized volumes intrinsically.
      On the dd4hep/TGeo side these are implemented by multiple placements
      according to the user supplied transformation matrices.
      For details see the calls in dd4hep::Volume::paramVolume<dim>D(...)
    2. When translated to Geant4, the structures are identified and
      the proper Geant4 parameterisation is created.
    3. An example can be found in:
    • examples/ClientTests/src/ParamVolume_geo.cpp
    • to display: geoDisplay examples/ClientTests/compact/ParamVolume<dim>D.xml
    • the Geant4 conversion is excercised with the scripts:
      python examples/ClientTests/scripts/ParamVolume.py \
         -geometry examples/ClientTests/compact/ParamVolume<dim>D.xml \
         -vis -macro examples/ClientTests/compact/ParamVolume.mac ```
      

ENDRELEASENOTES

@MarkusFrankATcernch
Copy link
Contributor Author

@SanghyunKo This MR might be of interest to you.

@MarkusFrankATcernch MarkusFrankATcernch merged commit 45f06b8 into AIDASoft:master Jul 26, 2022
@SanghyunKo
Copy link
Contributor

Thanks @MarkusFrankATcernch, this is neat. I used to work around it by using horrendous multiple loops...

@MarkusFrankATcernch MarkusFrankATcernch deleted the issue_875 branch July 26, 2022 15:11
@vvolkl
Copy link
Contributor

vvolkl commented Jul 28, 2022

Hi @MarkusFrankATcernch, we see the following runtime error in the lcgeo tests in our nightlies, do you think it could be related to this PR?

 8099 ----------------------------------------------------------------
 8100 
 8101 Traceback (most recent call last):
 8102   File "/cvmfs/sw-nightlies.hsf.org/spackages5/dd4hep/commit.02c6d5ac04c187f37631f9f15ca6c1c08452d992/x86_64-centos7-gcc11.2.0-opt/yvder/bin/ddsim", line 25, in <modul      e>
 8103     RUNNER.run()
 8104   File "/cvmfs/sw-nightlies.hsf.org/spackages5/dd4hep/commit.02c6d5ac04c187f37631f9f15ca6c1c08452d992/x86_64-centos7-gcc11.2.0-opt/yvder/lib/python3.9/site-packages/DD      Sim/DD4hepSimulation.py", line 306, in run
 8105     kernel.loadGeometry(str("file:" + compactFile))
 8106 cppyy.gbl.std.runtime_error: void dd4hep::sim::Geant4Kernel::loadGeometry(const string& compact_file) =>
 8107     runtime_error: dd4hep: apply-plugin: Failed to execute plugin lcgeo_LinearSortingPolicy
 8108 dd4hep: with plugin:lcgeo_LinearSortingPolicy
 8109 dd4hep: Error interpreting XML nodes of type <plugin/>
 8110 dd4hep: Error interpreting XML nodes of type <plugins/>
 8111 dd4hep: while parsing file:/tmp/gitlab-runner/spack-stage/spack-stage-lcgeo-commit.2220bc8428381dab91b1934a235bbf177522320c-5wahn7aynqewkli5cd6znujgkkmu7vhx/spack-src/      lcgeoTests/../FCCee/compact/FCCee_o1_v04/FCCee_o1_v04.xml
 8112 dd4hep: with plugin:DD4hep_XMLLoader
 8113 <end of output>
 8114 Test time = 139.46 sec
 8115 ----------------------------------------------------------
 8116 Test Fail Reason:
 8117 Error regular expression found in output. Regex=[Error]
 8118 "t_test_FCCee_o1_v04" end time: Jul 28 06:46 CEST
 8119 "t_test_FCCee_o1_v04" time elapsed: 00:02:19

@andresailer
Copy link
Member

Hi @vvolkl , yes it is related. I need to change the return value of that plugin, I think.

wdconinc added a commit to eic/epic that referenced this pull request Aug 27, 2022
As of DD4hep-1.22, AIDASoft/DD4hep#936, any plugin returning a zero return value is assumed to have failed. This is somewhat counter-intuitive for plugins that simply return a long status code, but it is inteded to allow recursive calls and is in line with what other plugins already do, e.g. `return field` or `return sdet`.
wdconinc added a commit to eic/epic that referenced this pull request Sep 3, 2022
As of DD4hep-1.22, AIDASoft/DD4hep#936, any plugin returning a zero return value is assumed to have failed. This is somewhat counter-intuitive for plugins that simply return a long status code, but it is inteded to allow recursive calls and is in line with what other plugins already do, e.g. `return field` or `return sdet`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants