Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The This script lives in /sdf/group/lcls/ds/ana/tutorials/psana1_examples/epics.py.  The LCLS DAQ includes many slowly changing quantities (e.g. voltages, temperatures, motor positions) that are recorded with software called EPICS.  Also, many other non-area-detectors are not yet accessible with the simple "Detector" interface.  We have plans to make everything accessible with the "Detector" interface, but until that is complete we support the following older forms of accessing detector informationcalled EPICS.  This example shows the use of a more complex "full name" and an easier "alias" (see device names).

Code Block
from psana import *
ds = DataSource('exp=xpptut15:run=59:smd')

evrFullNameepicsVarFullName = SourceDetector('DetInfo(NoDetector.0:Evr.0)HX2:DVD:GCC:01:PMON')
evrAliasNameepicsVarAlias = SourceDetector('evr0SampleTemp_GetA')
es = ds.env().epicsStore()
for nevent,evt in enumerate(ds.events()):
    # these next two lines are equivalent (second one uses "alias" name)        
    evr = evt.get(EvrData.DataV4, evrFullName)
    evr = evt.get(EvrData.DataV4, evrAliasName)
    # now access one of the slower "epics variables"print(epicsVarFullName())
    print es.value('HX2:DVD:GCC:01:PMON'(epicsVarAlias())
    break

References