liftof_rb::api

Function rb_calibration

Source
pub fn rb_calibration(
    rc_to_runner: &Sender<RunConfig>,
    tp_to_publisher: &Sender<TofPacket>,
    save_waveforms: bool,
    address: String,
) -> Result<(), CalibrationError>
Expand description

A full set of RB calibration

This includes

  • take voltage calbration data, 1000 events, save to disk, but keep in memory
  • take timing calibration data, 1000 events, save to disk but keep in memory
  • no input data, 1000 events, save to disk but keep in memory
  • apply calibration script (Jamie) save result in binary and in textfile, send downstream

§Arguments

  • rc_to_runner : send calibration specific config to the runner thread
  • tp_to_publisher : send calibration packets (wrapped in TofPacket) to publisher thread
  • save_waveforms : save te waveforms wit the calibration
  • address : the publisher’s data address We use a trick to get the event packets for the calibration: We are subscribing to the PUB socket of the publisher