Class MuDaq
- java.lang.Object
-
- cbsw.lhcb.pdmdb.MuDaq
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
MuDaq.ControlPanel
(package private) class
MuDaq.DaqTask
Performs free-running data acquisition(package private) class
MuDaq.DaqTaskUdp
Performs free-running data acquisition of UDP datagrams.(package private) class
MuDaq.I2c
class
MuDaq.StatusPanel
-
Field Summary
Fields Modifier and Type Field Description static Csr
cfg
Configuration register mirror(package private) boolean
daqActive
(package private) int
daqBufferLength
(package private) DaqProxy
daqProxy
The DaqProxy(package private) JniAdeptDepp
depp
The DEPP interface(package private) DrpPanel
drp
Controls for the FPGA DRP port(package private) java.lang.String
id
(package private) RegisterIo
io
The RegisterIo interface(package private) java.util.ArrayList<MGTControl>
mgts
List of FPGA MGT instancesstatic MuDaq
muDaq
Static member containing the MuDaq instance referenced by exec()(package private) javax.swing.JFrame
muDaqJF
(package private) DaqMux
mux
List of DAQ buffer instances(package private) javax.swing.JFrame
pdmdbJF
(package private) java.util.ArrayList<PdmdbMaster>
pdmdbs
The PDMDB instances(package private) java.util.prefs.Preferences
prefs
(package private) javax.swing.JFrame
programJF
(package private) int
runNumber
(package private) ScanControl
scanControl
(package private) static Csr
status
Status register mirror(package private) javax.swing.JFrame
statusFrame
(package private) Io
statusIo
(package private) java.util.ArrayList<RegisterIoTable>
tableList
List of tables that display FPGA register content(package private) PdmdbModuleTester
tester
(package private) javax.swing.JFrame
testerJF
(package private) javax.swing.JTextField
triggerNumberTF
(package private) XilinxDjtg
xilinx
-
Constructor Summary
Constructors Constructor Description MuDaq()
No-argument constructor called by the unmarshaller
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
configure(java.lang.String[] args)
Configures the muDaq registersvoid
dumpDaqBuffers(java.lang.String fileNamePrefix)
Reads DAQ buffer until empty.void
endDAQ()
void
fuseGbtx()
Triggers GBTX e-fusingvoid
get(int offset, byte[] regBuf)
Reads a byte array from the hardware.java.nio.ByteBuffer
getBER()
Reads the bitflip counters from hardwarejava.lang.String
getId()
void
init(JniAdeptDepp depp, java.util.prefs.Preferences prefs)
Called after unmarshalling to initialise the instance and its childrenjavax.swing.JMenu
makeMenu(java.lang.String title)
Convenience function that builds a main menu.GuiJPanel
makePanel()
Convenience method that builds a GUI panelvoid
prepareBER()
Prepares for a bit error rate testvoid
prepareDAQ(int runNumber)
Prepares for DAQ with TFC.void
put(int offset, byte[] regBuf)
Writes a byte array to the hardware.void
readConfigurationFile(java.lang.String fileName)
Reads a MuDaq register file into the register mirror.void
reset()
Resets muDaqvoid
setStateFromPreferences()
Reads saved settings from Preferences and updates the configuration register mirror(package private) void
setStateShutdown()
Puts MuDaq into the low power shutdown statevoid
startDaqTask(java.lang.String[] args)
Start free-running DAQ.void
stopDaqTask(java.lang.String[] args)
Stop free-running DAQ.void
toggle(java.lang.String regName)
Toggles a configuration register (on, then off)
-
-
-
Field Detail
-
prefs
java.util.prefs.Preferences prefs
-
depp
JniAdeptDepp depp
The DEPP interface
-
daqProxy
DaqProxy daqProxy
The DaqProxy
-
io
RegisterIo io
The RegisterIo interface
-
id
java.lang.String id
-
tableList
java.util.ArrayList<RegisterIoTable> tableList
List of tables that display FPGA register content
-
mux
DaqMux mux
List of DAQ buffer instances
-
mgts
java.util.ArrayList<MGTControl> mgts
List of FPGA MGT instances
-
pdmdbs
java.util.ArrayList<PdmdbMaster> pdmdbs
The PDMDB instances
-
drp
DrpPanel drp
Controls for the FPGA DRP port
-
tester
PdmdbModuleTester tester
-
pdmdbJF
javax.swing.JFrame pdmdbJF
-
testerJF
javax.swing.JFrame testerJF
-
programJF
javax.swing.JFrame programJF
-
muDaqJF
javax.swing.JFrame muDaqJF
-
runNumber
int runNumber
-
xilinx
XilinxDjtg xilinx
-
muDaq
public static MuDaq muDaq
Static member containing the MuDaq instance referenced by exec()
-
scanControl
ScanControl scanControl
-
statusFrame
javax.swing.JFrame statusFrame
-
triggerNumberTF
javax.swing.JTextField triggerNumberTF
-
daqActive
boolean daqActive
-
daqBufferLength
final int daqBufferLength
- See Also:
- Constant Field Values
-
cfg
public static Csr cfg
Configuration register mirror
-
status
static Csr status
Status register mirror
-
statusIo
Io statusIo
-
-
Method Detail
-
getId
public java.lang.String getId()
-
makePanel
public GuiJPanel makePanel()
Convenience method that builds a GUI panel
- Returns:
- The panel.
-
makeMenu
public javax.swing.JMenu makeMenu(java.lang.String title)
Convenience function that builds a main menu.
- Parameters:
title
- The menu title.- Returns:
- The menu.
-
init
public void init(JniAdeptDepp depp, java.util.prefs.Preferences prefs)
Called after unmarshalling to initialise the instance and its children
- Parameters:
depp
- The I/O interface.prefs
- The preference path.
-
put
public void put(int offset, byte[] regBuf)
Writes a byte array to the hardware.
-
get
public void get(int offset, byte[] regBuf)
Reads a byte array from the hardware.
-
reset
public void reset()
Resets muDaq
-
readConfigurationFile
public void readConfigurationFile(java.lang.String fileName)
Reads a MuDaq register file into the register mirror.
- Parameters:
fileName
- File name path.
-
configure
public java.lang.String configure(java.lang.String[] args)
Configures the muDaq registers
Callable by
Command
.- Parameters:
args
- Not used.- Returns:
- Command response.
-
setStateShutdown
void setStateShutdown()
Puts MuDaq into the low power shutdown state
-
setStateFromPreferences
public void setStateFromPreferences()
Reads saved settings from Preferences and updates the configuration register mirror
Does not write the settings to the hardware.
-
fuseGbtx
public void fuseGbtx()
Triggers GBTX e-fusing
-
toggle
public void toggle(java.lang.String regName)
Toggles a configuration register (on, then off)
- Parameters:
regName
- The register name as described in XML.
-
prepareBER
public void prepareBER()
Prepares for a bit error rate test
Enables a fixed data pattern and resets the bitflip counters.
-
getBER
public java.nio.ByteBuffer getBER()
Reads the bitflip counters from hardware
- Returns:
- Byte buffer containing the counters
-
prepareDAQ
public void prepareDAQ(int runNumber)
Prepares for DAQ with TFC.
Enables the TFC commands and resets the DAQ.
Data are acquired through DAQ proxy process.
- Parameters:
runNumber
- The number assigned to the run.
-
endDAQ
public void endDAQ()
-
startDaqTask
public void startDaqTask(java.lang.String[] args)
Start free-running DAQ.
- Parameters:
args
- Not currently used
-
stopDaqTask
public void stopDaqTask(java.lang.String[] args)
Stop free-running DAQ.
- Parameters:
args
- Not yet used
-
dumpDaqBuffers
public void dumpDaqBuffers(java.lang.String fileNamePrefix)
Reads DAQ buffer until empty.
This is intended only for diagnostic use.
- Parameters:
fileNamePrefix
- Name of file where to write data.
-
-