Back to home page

EIC code displayed by LXR

 
 

    


Warning, /sphenixprod/AGENTS.md is written in an unsupported language. File is not indexed.

0001 @../prodmacros/AGENTS.md
0002 
0003 # sphenixprod agent orientation
0004 
0005 Read `../prodmacros/AGENTS.md` before working here; Claude Code imports it through the line above. If the sibling checkout is unavailable, locate it in the [prodmacros repository](https://github.com/sPHENIX-Collaboration/prodmacros). This file gives the `sphenixprod` code map; `README.md` has command examples and detailed usage.
0006 
0007 ## Runtime and entry points
0008 
0009 - From this repository, source `./this_sphenixprod.sh` before running its commands. It sets `ODBCINI=./.odbc.ini`, so the file must be in the current working directory for database access.
0010 - `create_submission.py` parses a rule YAML through `sphenixprodrules.py`, matches inputs through `sphenixmatching.py`, creates `sphenixcondorjobs.py` jobs, and optionally submits them via `execute_condorsubmission.py` when `--andgo` is set. The argument parser uses `--rulename` for a direct rule selection.
0011 - `master_production_control.sh` calls `dispatch_productions.py` once with the active-production list; the dispatcher starts one `production_control.py` per listed pilot, staggered. `production_control.py` selects the pilot's hostname entry and launches submission and spiders according to its flags. Check the current parser and pilot before using a placeholder or option.
0012 - `dstspider.py` and `histspider.py` register finished outputs in FileCatalog. `resubmit_to_condor.py`, `custom_resubmit.py`, `find_stale_jobs.py`, `check_downstream.py`, and `dst_deleter.py` handle later job inspection or maintenance. Consult each command's help and source before using a write or delete action.
0013 
0014 ## Code and data
0015 
0016 - `sphenixdbutils.py` maps the Production read and write DSNs and the FileCatalog DSN; job tracking uses `production_jobs`. `sphenixjobdicts.py` maps DST output types to required inputs. `argparsing.py` owns common command arguments.
0017 - On the shared production host, there is no testbed database switch. A command capable of writing can affect production unless its documented dry-run path is used. Check the code for each command; some inspection tools are read only.
0018 - Default output and log locations come from `sphenixprodrules.py`, and rule YAMLs may override them. Rule templates live in `prodmacros/run*/`; instances keep their own rules and pilots under `thisProd/`.
0019 
0020 ## Legacy
0021 
0022 - `production_status` is the legacy job table, consulted only on request; current job tracking uses `production_jobs`.
0023 - The pilot `finishmon` flag and `monitor_finish.py` are retired: they still run against `production_jobs` but have no role in current or new productions. Do not enable them in a new pilot.