lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
Loading...
Searching...
No Matches
Pds::Trg::Trigger Class Referenceabstract

Interface of the trigger decision code loaded by the TEB: event() fills the result datagram of each built event from its contributions. More...

#include <Trigger.hh>

Public Member Functions

virtual ~Trigger ()
 Does nothing; empty virtual destructor.
 
virtual unsigned rogReserve (unsigned rog, unsigned meb, size_t nBufs) const
 Return the number of monitor buffers of MEB meb (out of nBufs) to reserve for events containing readout group rog; the TEB sums this over the non-common groups.
 
virtual int configure (const nlohmann::json &connectMsg, const nlohmann::json &configureMsg, const Pds::Eb::EbParams &prms)=0
 Pure virtual: configure from the connect and configure messages and the TEB parameters; implementations return 0 on success.
 
virtual int initialize (const std::vector< size_t > &inputsRegSizes, size_t resultsRegSize)
 Hook given the input region sizes and the result region size after configuration; returns 0 unless overridden.
 
virtual void event (const Pds::EbDgram *const *start, const Pds::EbDgram **end, Pds::Eb::ResultDgram &result)=0
 Pure virtual: set the trigger decision in result from the contributions in [start, end).
 
virtual void transition (Pds::Eb::ResultDgram &result)
 Hook for transitions; does nothing unless overridden.
 
virtual void shutdown ()
 Hook for shutdown; does nothing unless overridden.
 

Static Public Member Functions

static size_t size ()
 Return the size of a Pds::Eb::ResultDgram, the result size used by the TEB.
 

Detailed Description

Interface of the trigger decision code loaded by the TEB: event() fills the result datagram of each built event from its contributions.

Constructor & Destructor Documentation

◆ ~Trigger()

virtual Pds::Trg::Trigger::~Trigger ( )
inlinevirtual

Does nothing; empty virtual destructor.

Member Function Documentation

◆ configure()

virtual int Pds::Trg::Trigger::configure ( const nlohmann::json &  connectMsg,
const nlohmann::json &  configureMsg,
const Pds::Eb::EbParams &  prms 
)
pure virtual

Pure virtual: configure from the connect and configure messages and the TEB parameters; implementations return 0 on success.

◆ event()

virtual void Pds::Trg::Trigger::event ( const Pds::EbDgram *const *  start,
const Pds::EbDgram **  end,
Pds::Eb::ResultDgram &  result 
)
pure virtual

Pure virtual: set the trigger decision in result from the contributions in [start, end).

The TEB calls it for events and transitions.

◆ initialize()

virtual int Pds::Trg::Trigger::initialize ( const std::vector< size_t > &  inputsRegSizes,
size_t  resultsRegSize 
)
inlinevirtual

Hook given the input region sizes and the result region size after configuration; returns 0 unless overridden.

◆ rogReserve()

virtual unsigned Pds::Trg::Trigger::rogReserve ( unsigned  rog,
unsigned  meb,
size_t  nBufs 
) const
inlinevirtual

Return the number of monitor buffers of MEB meb (out of nBufs) to reserve for events containing readout group rog; the TEB sums this over the non-common groups.

Returns 0 unless overridden.

◆ shutdown()

virtual void Pds::Trg::Trigger::shutdown ( )
inlinevirtual

Hook for shutdown; does nothing unless overridden.

◆ size()

static size_t Pds::Trg::Trigger::size ( )
inlinestatic

Return the size of a Pds::Eb::ResultDgram, the result size used by the TEB.

◆ transition()

virtual void Pds::Trg::Trigger::transition ( Pds::Eb::ResultDgram &  result)
inlinevirtual

Hook for transitions; does nothing unless overridden.


The documentation for this class was generated from the following file: