# File: inzdab.mac
# Brief: Macro showing how to load a zdab file and run processoers on the data
#
# Date: 2014-07-24
# Contact: P G Jones,
# Revisions:
# 2016-11-21 : N Barros, Changed the logic of InZDAB
# 2016-12-12 : T Kaptanoglu, Update the comments
#
# This macro demonstrates how to load a zdab file called input.zdab and run
# processors on it including output to a root file called output.root.
/rat/physics_list/OmitAll true
/rat/db/set DETECTOR geo_file "geo/empty.geo"
/rat/inzdab/load input.zdab
# To read in files from command line instead using the '-i' option, one can use:
#/rat/inzdab/load_default
/run/initialize
# BEGIN EVENT LOOP
/rat/proc count # An example processor
/rat/procset update 5
/rat/proc outroot
/rat/procset file "output.root"
# END EVENT LOOP
# In order to specify file name by the '-o' command line option, simply use:
# /rat/proc outroot
# with no second line
/rat/inzdab/read
exit