Startup Sequence¶
Calling xxxpython is an alias for calling hutch-python --cfg cfg.yml.
The cfg.yml file defines what the loader will do. The specifics of this
file are documented on the yaml files page.
Each step of the startup can freely access any objects defined by previous steps. In order, the startup sequence is as follows:
Common Startup
Set up log files, debug state, and sim state
Read
cfg.ymlDisplay the
xxxpythonbannerCreate and set up a
RunEngineasRECreate the
plansobject with default plans and alias topCreate the
daqobjectCreate the
scan_pvsobject
Database Load
Load the
dbfromcfg.yamlusinghappiCreate the
xxx_beampathobject usinglightpathCreate cameras using the camviewer configuration file
Beamline Load
Import all objects from the modules under
loadincfg.yaml. By convention, this is justxxx.beamline, but it can also be extended to a list of modules.
Experiment Load
Automatically select the hutch’s current experiment if one was not provided in the
cfg.yml.Create user objects from the experiment questionnaire using
happiandpsdm_qs_cli.Import
Userclass from experiment file and instantiateUser().Attach all questionnaire objects to the
User()objectIf there was no experiment file, make a
SimpleNamespace()object insteadSet this object to be
xanduser.
Groups Load
If any
EpicsMotorobjects were defined previously, group them into amotorsobject. Alias this tom.If any
Slitsobjects were defined previously, group them into aslitsobject. Alias this tos.Group all loaded objects by metadata, to be found in a tab-accessible way e.g.
xxx.dg1.nameGroup everything into an
all_objectsobject. Alias this toa.
Finish
Create all
_debugobjects as documented on the debug page.Enable input, output, and error logger
Enter the
ipythonterminal