hutch_python.load_conf.load_conf¶
- hutch_python.load_conf.load_conf(conf, hutch_dir=None, args=None)¶
Step through the object loading procedure, given a configuration.
The procedure is:
Check the configuration for errors
Display the banner by calling
hutch_banner
Use
hutch
key to createhutch.db
importable namespace to stash the objects. This will be literallyhutch.db
if hutch is not provided, or the hutch name e.g.mfx.db
.Evaluate the settings to determine which kind of daq object to create later.
Load debug tools
Load options
Set ophyd signal default timeouts
Create a
logs
namespace that allows the user to configure the logging settings.Create a
RunEngine
,RE
Create a
daq
object withRE
registered.Import
plan_defaults
and includebp
,bps
, andbpp
.Add a
re
namespace of ready-to-run scan functions as a mirror ofbp
. Graft all daq-integrated scans onto thedaq
object.Create a
scan_pvs
object, andenable
it.Use
hutch
anddaq_platform
keys to create theelog
object and configure it to match the correct experiment.Load the shared global devices for LCLS
Use
db
key to load devices from thehappi
beamline database and create ahutch_beampath
object fromlightpath
Create an
archive
object for interfacing with the Archiver ApplianceUse
hutch
key to load detector objects from thecamviewer
configuration file.Load some simulated hardware and place it in the
sim
namespace.Use
experiment
key to select the current experimentIf
experiment
was missing, autoselect experiment usinghutch
key
Use current experiment to load experiment objects from questionnaire
Use
load
key to bring up the user’sbeamline
modulesUse current experiment to load experiment file
Create some default groups
Configure and load the position presets
Write the db.txt file to note what was loaded
If a conf key is missing, we’ll note it in a
logger.info
message. If an extra conf entry is found, we’ll note it in alogger.warning
message. If an automatically selected file is missing, we’ll note it in alogger.info
message. All other errors will be noted in a logger.error message.- Parameters:
conf (dict) –
dict
interpretation of the original yaml filehutch_dir (
Path
orstr
, optional) –Path
object that points to the hutch’s launch directory. This is the directory that includes theexperiments
directory and a hutchname directory e.g.mfx
If this is missing, we’ll be unable to write thedb.txt
file, do relative filepath database selection forhappi
, or establish a preset positions directory.args (argparse.Namespace, optional) – The namespace returned from the cli argument parsing, or None
- Returns:
objs – See the return value of
load
- Return type:
dict{str: object}