Commit abde7a09 authored by Whitney Armstrong's avatar Whitney Armstrong
Browse files

modified: part3/running_juggler.md

parent 4bdb5604
......@@ -4,6 +4,67 @@
Juggler is a Gaudi based event processing framework which uses the [eicd](https://eic.phy.anl.gov/eicd) data model.
### Algorithms
##
Algorithms are implemented as C++ in the [juggler repository](https://eicweb.phy.anl.gov/eic/juggler).
### Options file
The set of algorithms, their input data, and output data are assembled in so-called "options" files (typically in an `options` directory).
These are actually python that is interpreted by the `gaudirun.py` program.
Once compiled and install as part of juggler, the algorithms can be imported into juggler.
```
from Gaudi.Configuration import *
from GaudiKernel.DataObjectHandleBase import DataObjectHandleBase
from Configurables import ApplicationMgr, EICDataSvc, PodioOutput, GeoSvc
from GaudiKernel import SystemOfUnits as units
from Configurables import Jug__Digi__EMCalorimeterDigi as EMCalorimeterDigi
podioinput = PodioInput("PodioReader",
collections=["mcparticles","EcalBarrelHits"])
ecal_digi = EMCalorimeterDigi("ecal_digi",
inputHitCollection="EcalBarrelHits",
outputHitCollection="RawEcalBarrelHits")
ecal_reco = EMCalReconstruction("ecal_reco",
inputHitCollection="RawEcalBarrelHits",
outputHitCollection="RecEcalBarrelHits",
minModuleEdep=0.0*units.MeV)
out = PodioOutput("out", filename=output_rec_file)
out.outputCommands = ["keep *",
"drop BarrelTrackSourceLinks",
"drop InitTrackParams",
"drop trajectories",
"drop outputSourceLinks",
"drop outputInitialTrackParameters",
"drop mcparticles"
]
ApplicationMgr(
TopAlg = [podioinput, ecal_digi, ecal_reco, out],
EvtSel = 'NONE',
EvtMax = 10,
ExtSvc = [podioevent,geo_service],
OutputLevel=DEBUG
)
```
### Executing Juggler
If using the container-installed juggler algorithms you can run the reconstruction with:
```
gaudirun.py options/demo_reco.py
```
When adding your own algorithm and installed into a custom location, you will need do the following:
```
xenv -x ${JUGGLER_INSTALL_PREFIX}/Juggler.xenv gaudirun.py options/demo_reco.py
```
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment