Skip to content

Commit

Permalink
feat: pull CAD generated service meshes into simulation
Browse files Browse the repository at this point in the history
  • Loading branch information
wdconinc authored and Chao Peng committed Jul 23, 2023
1 parent 8259208 commit bc4855d
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 1 deletion.
17 changes: 17 additions & 0 deletions compact/tracking/cable_services.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!-- SPDX-License-Identifier: LGPL-3.0-or-later -->
<!-- Copyright (C) 2022 Wouter Deconinck, Whitney Armstrong -->

<lccdd>
<includes>
<gdmlFile ref="meshes/FullCableSpaceEstimate.xml"/>
</includes>

<detectors>
<detector name="Services" type="DD4hep_TestShape_Creator">
<check>
<shape type="CAD_MultiVolume" ref="meshes/FullCableSpaceEstimate.obj" unit="m">
</shape>
</check>
</detector>
</detectors>
</lccdd>
19 changes: 19 additions & 0 deletions compact/tracking/get_meshes.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!-- SPDX-License-Identifier: LGPL-3.0-or-later -->
<!-- Copyright (C) 2022 Wouter Deconinck, Whitney Armstrong -->

<lccdd>
<plugins>
<plugin name="epic_FileLoader">
<arg value="cache:$DETECTOR_PATH:/opt/detector"/>
<arg value="file:meshes/FullCableSpaceEstimate.obj"/>
<arg value="url:https://github.com/eic/epic-data/raw/meshes/meshes/tracking/FullCableSpaceEstimate.obj"/>
</plugin>
</plugins>
<plugins>
<plugin name="epic_FileLoader">
<arg value="cache:$DETECTOR_PATH:/opt/detector"/>
<arg value="file:meshes/FullCableSpaceEstimate.xml"/>
<arg value="url:https://github.com/eic/epic-data/raw/meshes/meshes/tracking/FullCableSpaceEstimate.xml"/>
</plugin>
</plugins>
</lccdd>
4 changes: 4 additions & 0 deletions configurations/services_only.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
features:
tracking:
get_meshes:
cable_services:
2 changes: 1 addition & 1 deletion src/FileLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ long load_file(Detector& /* desc */, int argc, char** argv)
{
// argument parsing
std::string cache, file, url;
std::string cmd("curl --retry 5 -f {0} -o {1}");
std::string cmd("curl --location --retry 5 -f {0} -o {1}");
for (int i = 0; i < argc && argv[i]; ++i) {
if (0 == std::strncmp("cache:", argv[i], 6))
cache = (argv[i] + 6);
Expand Down

0 comments on commit bc4855d

Please sign in to comment.