Confluence will be unusable 23-July-2024 at 06:00 due to a Crowd upgrade.
...
Code Block |
---|
#!/bin/csh
setenv DAQREL /reg/g/pcds/dist/pds/2.10.6/build (the latest release goes here)
setenv PYTHONPATH ${PYTHONPATH}:${DAQREL}/pdsapp/lib/x86_64-linux:${DAQREL}/ami/lib/x86_64-linux
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${DAQREL}/pdsdata/lib/x86_64-linux:${DAQREL}/pdsapp/lib/x86_64-linux:${DAQREL}/ami/lib/x86_64-linux
|
...
Code Block |
---|
import pyami class AmiScalar(pyami.Entry): # subclass for readability def __init__(self,name): pyami.Entry.__init__(self,name) class AmiAcqiris(pyami.Entry): # subclass for readability def __init__(self,detid,channel): pyami.Entry.__init__(self,detid,channel) eth_lo = 0x7f000001 eth_mc = 0xefff2604 CxiAcq = 0x18000200 # detector identifier for CxiEndstation Acqiris readout if __name__ == "__main__": pyami.connect(eth_lomc,eth_lo,eth_mclo) # example parameters for a monitoring playback job x = AmiScalar("ProcTime") # accumulate (events,mean,rms) for 'ProcTime' scalar variable x.get() # return accumulated data x = AmiAcqiris(CxiAcq,1) # accumulate averaged waveform for Cxi Acqiris readout module x.get() # return accumulated waveform |
...
Code Block |
---|
-- pyami module -- connect(Server_Group, CDS_interface, FEZ_interface, Server_Group) Connects the module to the group of monitoring servers. The input parameters are specific to the hutch. If the last two parameters are omitted, they will be learned from the available network interfaces on the host. This must be called before any of the following class methods. class pyami.Entry(name,'Scalar') Monitors data from the scalar variable 'name'. A tupledictionary of ('Scalar', n_events, mean, rms) is accumulated. class pyami.Entry(name,'TH1F',nbins,xlo,xhi) Monitors data from the scalar variable 'name'. A tupledictionary of (type='TH1F', underflowsuflow, overflowsoflow, data=( n_bin0, n_bin1, ...)) is accumulated. class pyami.Entry(det_identifier) or class pyami.Entry(det_identifier,channel) Monitors the data from the detector associated with 'det_identifier' and 'channel'. A tupledictionary of data averaged over events is accumulated. The dimensions and binning of the data are determined from the detector. The tupledictionary format is (type='Waveform', entries=events, xlow, xhigh, data=(y0, y1, ...)) or (type='Image', entries=events, offset=dark_level, ppxbin, ppybin, data=((row0col0,row0col1,...),(row1col0,row1col1,...))) or (type='ImageArray', entries=events, offset=dark_level, ppxbin, ppybin, data=( ((row0col0,row0col1,...),(row1col0,row1col1,...))_0, ((row0col0,row0col1,...),(row1col0,row1col1,...))_1, ... )) Each of the above methods also takes an optional final string argument that defines an event filter. The string must take the form: _lo_value_<_scalar_name_<_hi_value_ or (_expr1_)&(_expr2_) or (_expr1_)|(_expr2_) where _expr1_ and _expr2_ also take one of the forms. Members: Entry.get() Returns the data accumulated since the object was created. |