Skip to content

Commit

Permalink
Fix GDML examples
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkusFrankATcernch committed Jun 22, 2023
1 parent b165e9d commit 2a492e2
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 41 deletions.
82 changes: 41 additions & 41 deletions examples/CLICSiD/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,47 +86,47 @@ dd4hep_add_test_reg( CLICSiD_multiple_inputs
REGEX_FAIL "Exception;EXCEPTION;ERROR" )
#
#
## Always false. Good for now!
if( "${ROOT_FIND_VERSION}" VERSION_GREATER "6.13.0" )
# ROOT Geometry export to GDML
dd4hep_add_test_reg( CLICSiD_GDML_export_LONGTEST
COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_CLICSiD.sh"
EXEC_ARGS geoPluginRun -input file:${DD4hep_ROOT}/DDDetectors/compact/SiD.xml -print WARNING -destroy -volmgr
-plugin DD4hep_ROOTGDMLExtract -output EcalBarrel.gdml -path /world/EcalBarrel
-plugin DD4hep_ROOTGDMLExtract -output EcalEndcap.gdml -path /world/EcalEndcap
-plugin DD4hep_ROOTGDMLExtract -output HcalBarrel.gdml -path /world/HcalBarrel
-plugin DD4hep_ROOTGDMLExtract -output HcalEndcap.gdml -path /world/HcalEndcap
-plugin DD4hep_ROOTGDMLExtract -output HcalPlug.gdml -path /world/HcalPlug
-plugin DD4hep_ROOTGDMLExtract -output MuonBarrel.gdml -path /world/MuonBarrel
-plugin DD4hep_ROOTGDMLExtract -output MuonEndcap.gdml -path /world/MuonEndcap
-plugin DD4hep_ROOTGDMLExtract -output LumiCal.gdml -path /world/LumiCal
-plugin DD4hep_ROOTGDMLExtract -output BeamCal.gdml -path /world/BeamCal
-plugin DD4hep_ROOTGDMLExtract -output LumiReadout_Forward.gdml -path /world/LumiReadout_Forward
-plugin DD4hep_ROOTGDMLExtract -output LumiReadout_Backward.gdml -path /world/LumiReadout_Backward
-plugin DD4hep_VolumeDump --topstat
REGEX_PASS "Checked 130738 physical volume placements"
REGEX_FAIL "Exception;EXCEPTION;ERROR" )
#
# ROOT Geometry export to GDML
dd4hep_add_test_reg( CLICSiD_GDML_import_LONGTEST
COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_CLICSiD.sh"
EXEC_ARGS geoPluginRun -input file:${DD4hep_ROOT}/DDDetectors/compact/SiD.xml -print WARNING -destroy -volmgr
-plugin DD4hep_ROOTGDMLParse -input EcalBarrel.gdml -path /world/EcalBarrel
-plugin DD4hep_ROOTGDMLParse -input EcalEndcap.gdml -path /world/EcalEndcap
-plugin DD4hep_ROOTGDMLParse -input HcalBarrel.gdml -path /world/HcalBarrel
-plugin DD4hep_ROOTGDMLParse -input HcalEndcap.gdml -path /world/HcalEndcap
-plugin DD4hep_ROOTGDMLParse -input HcalPlug.gdml -path /world/HcalPlug
-plugin DD4hep_ROOTGDMLParse -input MuonBarrel.gdml -path /world/MuonBarrel
-plugin DD4hep_ROOTGDMLParse -input MuonEndcap.gdml -path /world/MuonEndcap
-plugin DD4hep_ROOTGDMLParse -input LumiCal.gdml -path /world/LumiCal
-plugin DD4hep_ROOTGDMLParse -input BeamCal.gdml -path /world/BeamCal
-plugin DD4hep_ROOTGDMLParse -input LumiReadout_Forward.gdml -path /world/LumiReadout_Forward
-plugin DD4hep_ROOTGDMLParse -input LumiReadout_Backward.gdml -path /world/LumiReadout_Backward
-plugin DD4hep_VolumeDump --topstat
DEPENDS CLICSiD_GDML_export_LONGTEST
REGEX_PASS "Checked 130738 physical volume placements"
REGEX_FAIL "Exception;EXCEPTION;ERROR" )
#
if( "${ROOT_VERSION}" VERSION_GREATER "6.13.0" )
# ROOT Geometry export to GDML
dd4hep_add_test_reg( CLICSiD_GDML_export_LONGTEST
COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_CLICSiD.sh"
EXEC_ARGS geoPluginRun -input file:${DD4hep_ROOT}/DDDetectors/compact/SiD.xml -print WARNING -destroy -volmgr
-plugin DD4hep_ROOTGDMLExtract -output EcalBarrel.gdml -path /world/EcalBarrel
-plugin DD4hep_ROOTGDMLExtract -output EcalEndcap.gdml -path /world/EcalEndcap
-plugin DD4hep_ROOTGDMLExtract -output HcalBarrel.gdml -path /world/HcalBarrel
-plugin DD4hep_ROOTGDMLExtract -output HcalEndcap.gdml -path /world/HcalEndcap
-plugin DD4hep_ROOTGDMLExtract -output HcalPlug.gdml -path /world/HcalPlug
-plugin DD4hep_ROOTGDMLExtract -output MuonBarrel.gdml -path /world/MuonBarrel
-plugin DD4hep_ROOTGDMLExtract -output MuonEndcap.gdml -path /world/MuonEndcap
-plugin DD4hep_ROOTGDMLExtract -output LumiCal.gdml -path /world/LumiCal
-plugin DD4hep_ROOTGDMLExtract -output BeamCal.gdml -path /world/BeamCal
-plugin DD4hep_ROOTGDMLExtract -output LumiReadout_Forward.gdml -path /world/LumiReadout_Forward
-plugin DD4hep_ROOTGDMLExtract -output LumiReadout_Backward.gdml -path /world/LumiReadout_Backward
-plugin DD4hep_VolumeDump --topstat
REGEX_PASS "\\+\\+\\+ Checked 130882 physical volume placements."
REGEX_FAIL "Exception;EXCEPTION;ERROR"
)
#
# ROOT Geometry export to GDML
dd4hep_add_test_reg( CLICSiD_GDML_import_LONGTEST
COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_CLICSiD.sh"
EXEC_ARGS geoPluginRun -input file:${CLICSiDEx_INSTALL}/compact/SiD_empty.xml -print WARNING -destroy -volmgr
-plugin DD4hep_ROOTGDMLParse -input EcalBarrel.gdml -path /world/EcalBarrel
-plugin DD4hep_ROOTGDMLParse -input EcalEndcap.gdml -path /world/EcalEndcap
-plugin DD4hep_ROOTGDMLParse -input HcalBarrel.gdml -path /world/HcalBarrel
-plugin DD4hep_ROOTGDMLParse -input HcalEndcap.gdml -path /world/HcalEndcap
-plugin DD4hep_ROOTGDMLParse -input HcalPlug.gdml -path /world/HcalPlug
-plugin DD4hep_ROOTGDMLParse -input MuonBarrel.gdml -path /world/MuonBarrel
-plugin DD4hep_ROOTGDMLParse -input MuonEndcap.gdml -path /world/MuonEndcap
-plugin DD4hep_ROOTGDMLParse -input LumiCal.gdml -path /world/LumiCal
-plugin DD4hep_ROOTGDMLParse -input BeamCal.gdml -path /world/BeamCal
-plugin DD4hep_ROOTGDMLParse -input LumiReadout_Forward.gdml -path /world/LumiReadout_Forward
-plugin DD4hep_ROOTGDMLParse -input LumiReadout_Backward.gdml -path /world/LumiReadout_Backward
-plugin DD4hep_VolumeDump --topstat
DEPENDS CLICSiD_GDML_export_LONGTEST
REGEX_PASS "\\+\\+\\+ Checked 11282 physical volume placements."
REGEX_FAIL "Exception;EXCEPTION;ERROR" )
#
endif()
#
# Checksum test of the EcalBarrel sub-detector
Expand Down
39 changes: 39 additions & 0 deletions examples/CLICSiD/compact/SiD_empty.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<lccdd>
<!-- #==========================================================================
# AIDA Detector description implementation
#==========================================================================
# Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
# All rights reserved.
#
# For the licensing terms see $DD4hepINSTALL/LICENSE.
# For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
#
#==========================================================================
-->

<info name="GDML_Import"
title="GDML import test"
author="Markus Frank"
url="http://www.cern.ch/lhcb"
status="development"
version="1.0">
<comment>GDML import test</comment>
</info>

<includes>
<gdmlFile ref="${DD4hepINSTALL}/DDDetectors/compact/elements.xml"/>
<gdmlFile ref="${DD4hepINSTALL}/DDDetectors/compact/materials.xml"/>
</includes>

<display>
<vis name="Invisible" showDaughters="false" visible="false"/>
<vis name="InvisibleWithChildren" showDaughters="true" visible="false"/>
<vis name="WorldVis" alpha="0.8" r="1.0" g="1.0" b="0.0" showDaughters="false" visible="true" drawingStyle="solid" lineStyle="solid"/>
<vis name="VisibleGreen" alpha="1.0" r="0.0" g="1.0" b="0.0" showDaughters="true" visible="true" drawingStyle="solid" lineStyle="solid"/>
</display>

<world material="Air">
<shape type="Box" dx="30*m" dy="30*m" dz="30*m"/>
</world>
</lccdd>

0 comments on commit 2a492e2

Please sign in to comment.