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.yml
- Display the - xxxpythonbanner
- Create and set up a - RunEngineas- RE
- Create the - plansobject with default plans and alias to- p
- Create the - daqobject
- Create the - scan_pvsobject
 
- Database Load - Load the - dbfrom- cfg.yamlusing- happi
- Create the - xxx_beampathobject using- lightpath
- Create cameras using the camviewer configuration file 
 
- Beamline Load - Import all objects from the modules under - loadin- cfg.yaml. By convention, this is just- xxx.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 - happiand- psdm_qs_cli.
- Import - Userclass from experiment file and instantiate- User().
- Attach all questionnaire objects to the - User()object
- If there was no experiment file, make a - SimpleNamespace()object instead
- Set this object to be - xand- user.
 
- Groups Load - If any - EpicsMotorobjects were defined previously, group them into a- motorsobject. Alias this to- m.
- If any - Slitsobjects were defined previously, group them into a- slitsobject. Alias this to- s.
- Group all loaded objects by metadata, to be found in a tab-accessible way e.g. - xxx.dg1.name
- Group everything into an - all_objectsobject. Alias this to- a.
 
- Finish - Create all - _debugobjects as documented on the debug page.
- Enable input, output, and error logger 
- Enter the - ipythonterminal