public class PVLoggerDataSource
extends java.lang.Object
Constructor and Description |
---|
PVLoggerDataSource(long id)
Constructor
|
PVLoggerDataSource(long id,
PVLogger theLogger)
Primary Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
closeConnection()
close the PV Logger connection
|
double |
getBeamCurrent()
get the beam current in mA, we use the first available BCM in the
sequence.
|
double |
getBeamCurrent(java.lang.String bcm)
get the beam current in mA, use the BCM specified here.
|
java.util.Map<java.lang.String,java.lang.Double> |
getBPMAmpMap()
Get the value map for BPM amplitude
|
java.util.Map<java.lang.String,java.lang.Double> |
getBPMPhaseMap()
Get the value map for BPM phase
|
java.util.Map<java.lang.String,java.lang.Double> |
getBPMXMap()
Get the value map for horizontal BPM signals
|
java.util.Map<java.lang.String,java.lang.Double> |
getBPMYMap()
Get the value map for vertical BPM signals
|
ChannelSnapshot |
getChannelSnapshot(java.lang.String pv)
get a channel snapshot for the specified PV
|
ChannelSnapshot[] |
getChannelSnapshots()
get all the channel snapshots.
|
double[] |
getChannelSnapshotValue(java.lang.String pv)
get the value for the channel snapshot corresponding to the specified PV
|
double |
getLoggedField(Electromagnet magnet)
Get the magnet's field from the PV Logger Snapshot
|
java.util.Map<java.lang.String,java.lang.Double> |
getMagnetMap()
Get the value map for magnets
|
java.util.Map<java.lang.String,java.lang.Double> |
getMagnetPSMap()
Get the value map for magnet power supplies
|
boolean |
getUsesLoggedBendFields()
Determine whether logged bend fields are applied in the scenario
|
protected java.util.Map<java.lang.String,ChannelSnapshot> |
populateChannelSnapshotTable()
populate the channel snapshot table
|
void |
removeModelSourceFromScenario(AcceleratorSeq sequence,
Scenario scenario)
Remove this data source from the specified scenario
|
void |
setAccelSequence(AcceleratorSeq seq) |
Scenario |
setModelSource(AcceleratorSeq sequence,
Scenario scenario)
set the model lattice with PV logger data source
|
void |
setUsesLoggedBendFields(boolean useLoggedBends)
Sets whether to use the logged bend fields in the scenario
|
void |
updatePVLoggerId(long id)
Update this data source with the data from the specified PV Logger snapshot
|
public PVLoggerDataSource(long id, PVLogger theLogger)
id
- the PV Logger IDtheLogger
- existing, connected PV Logger to usepublic PVLoggerDataSource(long id)
id
- the PV logger IDpublic boolean getUsesLoggedBendFields()
public void setUsesLoggedBendFields(boolean useLoggedBends)
public void closeConnection()
public void updatePVLoggerId(long id)
id
- the PV logger IDprotected java.util.Map<java.lang.String,ChannelSnapshot> populateChannelSnapshotTable()
public ChannelSnapshot getChannelSnapshot(java.lang.String pv)
public double[] getChannelSnapshotValue(java.lang.String pv)
public java.util.Map<java.lang.String,java.lang.Double> getMagnetMap()
public java.util.Map<java.lang.String,java.lang.Double> getMagnetPSMap()
public java.util.Map<java.lang.String,java.lang.Double> getBPMXMap()
public java.util.Map<java.lang.String,java.lang.Double> getBPMYMap()
public java.util.Map<java.lang.String,java.lang.Double> getBPMAmpMap()
public java.util.Map<java.lang.String,java.lang.Double> getBPMPhaseMap()
public void removeModelSourceFromScenario(AcceleratorSeq sequence, Scenario scenario)
public double getLoggedField(Electromagnet magnet)
public Scenario setModelSource(AcceleratorSeq sequence, Scenario scenario)
sequence
- accelerator sequencescenario
- Model Scenario objectpublic void setAccelSequence(AcceleratorSeq seq)
public double getBeamCurrent()
public double getBeamCurrent(java.lang.String bcm)
bcm
- the BCM you want the beam current reading frompublic ChannelSnapshot[] getChannelSnapshots()