pflib v3.12.0-1-g716e801
Pretty Fine HGCROC Interaction Library
Loading...
Searching...
No Matches
trig.cxx File Reference

TRIG menu commands. More...

#include "pflib/TRIG.h"
#include <optional>
#include "pflib/packing/Hex.h"
#include "pflib/packing/MultiSampleECONDEventPacket.h"
#include "pflib/packing/SingleECONTCaptureFrame.h"
#include "pflib/packing/TrigAlgoOutput.h"
#include "pflib/utility/string_format.h"
#include "pftool.h"
Include dependency graph for trig.cxx:

Functions

 ENABLE_LOGGING ()
 
void trig_render (Target *tgt)
 
template<class SampleFrame >
std::vector< SampleFrame > decode_multi_sample (int n_samples, std::vector< uint32_t > &data)
 
void trig (const std::string &cmd, Target *target)
 Interaction with trigger alignment, capture, and algo.
 
void align (const std::string &cmd, Target *tgt)
 TRIG.ALIGN commands.
 
void algo (const std::string &cmd, Target *target)
 TRIG.ALGO commands.
 
static void trigger_timein (Target *tgt)
 TRIG.TIMEIN.
 
void self_trigger (Target *tgt)
 TRIG.SELF_TRIG.
 
void setup (Target *tgt)
 TRIG.SETUP.
 

Detailed Description

TRIG menu commands.

Function Documentation

◆ algo()

void algo ( const std::string & cmd,
Target * target )

TRIG.ALGO commands.

  • SPY: view last captured trig algo output
  • BUFFER_CLEAR: clear buffer by reading samples until its empty
  • CONFIG: change settings of trigger algorithm
  • STATUS: print settings of trigger algo and if output is available

◆ align()

void align ( const std::string & cmd,
Target * tgt )

TRIG.ALIGN commands.

  • SETUP : setup the alignment capture time
  • READ : read the alignment capture buffer
  • DELAY : set the delay for one elink

◆ self_trigger()

void self_trigger ( Target * tgt)

TRIG.SELF_TRIG.

Attempts to have trigger algo do the self-triggering by disabling the following L1A after a charge injection and enabling external L1As originating from our trigger algorithm.

◆ setup()

void setup ( Target * tgt)

TRIG.SETUP.

apply the various time offset parameters that were deduced in TIMEIN and SELF_TRIG

◆ trig()

void trig ( const std::string & cmd,
Target * target )

Interaction with trigger alignment, capture, and algo.

Commands

  • RESET : call reset on the TRIG block (TRIG::reset)
  • ELINK_SPY : spy on six TRIG elinks (Elinks::spy)
  • EVENT_SPY : readout the last captured event (TRIG::read_event)
  • PIPELINE : change depth of capture buffer for readout
  • SAMPLES_PER_L1A : number of samples to readout per l1a
  • PRESAMPLES : number of "pre-samples" to include in readout
  • BUFFER_CLEAR : readout samples until buffer is emtpy

◆ trigger_timein()

static void trigger_timein ( Target * tgt)
static

TRIG.TIMEIN.

This command attempts to deduce the capture delay for the trigger links by taking two runs after setting some parameters on the chip.

Assuming the pedestal values on the chip are all ~200 (as is the case at UMN), setting the CH_XX.ADC_PEDESTAL and DIGITALHALF_X.ADC_TH to their maxima (255 and 31 respectively) forces the trigger sums to be zero for pedestals.

We inject a pulse into Channel 0 of ROC0 on the HcalBackplane which comes out of ROC0 inside TC0_0 which goes into ECON-T1 DIN6 which then is summed into STC6 (I think)