Skip to content

Commit

Permalink
support --output-obj like acts-project#3180. Also sync with acts-proj…
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Adye authored and Tim Adye committed Dec 5, 2024
1 parent 3390f50 commit fcbc74d
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Examples/Scripts/Python/full_chain_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,12 @@ def parse_args():
"--output-csv",
action="count",
default=0,
help="Use CSV output instead of ROOT. Specify -cc to output both.",
help="Use CSV output instead of ROOT. Specify -cc to output all formats (ROOT, CSV, and obj).",
)
parser.add_argument(
"--output-obj",
action="store_true",
help="Enable obj output",
)
parser.add_argument(
"-n",
Expand Down Expand Up @@ -272,6 +277,7 @@ def full_chain(args):
outputDirCsv = outputDir if args.output_csv != 0 else None
outputDirLessCsv = outputDirLess if args.output_csv != 0 else None
outputDirMoreCsv = outputDirMore if args.output_csv != 0 else None
outputDirObj = outputDirLess if args.output_obj else outputDir if args.output_csv == 2 else None

# fmt: off
if args.generic_detector:
Expand Down Expand Up @@ -388,8 +394,7 @@ def full_chain(args):
"LongStripEndcapReadout",
],
outputParticlesGenerator="particles_input",
outputParticlesInitial="particles_initial",
outputParticlesFinal="particles_final",
outputParticlesSimulation="particles_simulated",
outputSimHits="simhits",
graphvizOutput="graphviz",
dd4hepDetector=detector,
Expand Down Expand Up @@ -479,6 +484,7 @@ def full_chain(args):
postSelectParticles=postSelectParticles,
outputDirRoot=outputDirRoot,
outputDirCsv=outputDirCsv,
outputDirObj=outputDirObj,
)
else:
if s.config.numThreads != 1:
Expand All @@ -504,6 +510,7 @@ def full_chain(args):
killAfterTime=25 * u.ns,
outputDirRoot=outputDirRoot,
outputDirCsv=outputDirCsv,
outputDirObj=outputDirObj,
)

addDigitization(
Expand Down

0 comments on commit fcbc74d

Please sign in to comment.