NuWa: Index of all Job Modules
Introduction
Job modules are used to configure and run simulation and analysis
tasks. They are used with the nuwa.py command as follows:
% nuwa.py -n 100 -m "MDC09a.runLED" -o led_n100.root
This example simulates 100 LED flashes in the center of the AD. The
module name is listed in quotes after the '-m' option. The '-n'
option specifies the number of events you wish to process, and the
'-o' option specifies the output file name.
Additional options can be passed directly to the job module by placing
them inside the quotes. The following example places the LED along
the axis of ACU B, at the z = +100.0 cm position.
% nuwa.py -n 100 -m "MDC09a.runLED -z 100.0 -n DayaBayAD1_ACU_B_GdlsEdge_LED" -o led_n100.root
Analysis jobs are run in the same fashion. The following example runs
a simple event reconstruction. The '-n -1' option will process all
events in the input file(s).
% nuwa.py -n -1 -m "ReconAlg.AdSimple" -o led_recon_n100.root led_n100.root
Modules may also be run in series:
% nuwa.py -n 100 -m "MDC09a.runLED"-m "ReconAlg.AdSimple" -o led_recon_n100.root
Modifying Modules
To change a module, make a copy in your local directory, change it,
and run it without the 'package.' prefix in the module name.
% mkdir mywork
% cd mywork
% cp $PACKAGEROOT/(package)/python/(package)/module.py myModule.py
% (change the module)
% nuwa.py -n 100 -m "myModule" -o myOutput_n100.root
Writing your own Job Module
A job module is a script which configures your simulation or analysis
job. It is written in the python
programming language. In your module, you must define two functions:
configure and run.
def configure( argv=[] ):
"""Write a description of your module here
Add more details about your module here
"""
# Put your job configuration commands here
return
def run(app):
"""Additional Run-time configuration can go here"""
pass
See the many modules below for module configuration examples.