Skip to content

Commit

Permalink
doc: add json example
Browse files Browse the repository at this point in the history
  • Loading branch information
wdconinc authored Feb 5, 2024
1 parent 823c597 commit 74719e2
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion DDG4/python/DDSim/Helper/Action.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,18 @@ class Action(ConfigHelper):
# multiple actions by list of dict of name and parameter dict:
>>> SIM.action.stack = [ { "name": "Geant4TestStackAction", "parameter": {"Property_int": 10} } ]
On the command line, these can be specified as JSON strings.
On the command line or in python, these actions can be specified as JSON strings:
$ ddsim --action.stack '{ "name": "Geant4TestStackAction", "parameter": { "Property_int": 10 } }'
or
>>> SIM.action.stack = '''
{
"name": "Geant4TestStackAction",
"parameter": {
"Property_int": 10,
"Property_double": "1.0*mm"
}
}
'''
"""

Expand Down

0 comments on commit 74719e2

Please sign in to comment.