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

Interface of the DRP plugins that produce the TEB input data (size() bytes) for each event, either on the CPU or in a CUDA stream. More...

#include <TriggerPrimitive.hh>

Inherited by Pds::Trg::TmoTebPrimitive.

Public Member Functions

virtual ~TriggerPrimitive ()
 Does nothing; empty virtual destructor.
 
virtual int configure (const nlohmann::json &configureMsg, const nlohmann::json &connectMsg, size_t collectionId)=0
 Pure virtual: configure from the configure and connect messages; implementations return 0 on success.
 
virtual void configure (const XtcData::Xtc &xtc, const void *bufEnd)
 Hook to add to the Configure data in xtc; does nothing unless overridden.
 
virtual void event (const Drp::MemPool &pool, uint32_t index, const XtcData::Xtc &contribution, XtcData::Xtc &xtc, const void *bufEnd)=0
 Pure virtual: append the TEB input data for the event contribution (pebble buffer index of pool) to xtc.
 
virtual void event (cudaStream_t stream, unsigned *const state, float const *const calibBuffers, size_t const calibBufsCnt, uint32_t *const outBuffers, size_t const outBufsCnt, unsigned const *const index, unsigned *const retCode_d)
 GPU hook: enqueue on stream the work that writes the TEB input data; does nothing unless overridden.
 
virtual size_t size () const =0
 Pure virtual: return the size in bytes of the TEB input data.
 

Detailed Description

Interface of the DRP plugins that produce the TEB input data (size() bytes) for each event, either on the CPU or in a CUDA stream.

Constructor & Destructor Documentation

◆ ~TriggerPrimitive()

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

Does nothing; empty virtual destructor.

Member Function Documentation

◆ configure() [1/2]

virtual int Pds::Trg::TriggerPrimitive::configure ( const nlohmann::json &  configureMsg,
const nlohmann::json &  connectMsg,
size_t  collectionId 
)
pure virtual

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

Implemented in Pds::Trg::TmoTebPrimitive.

◆ configure() [2/2]

virtual void Pds::Trg::TriggerPrimitive::configure ( const XtcData::Xtc &  xtc,
const void *  bufEnd 
)
inlinevirtual

Hook to add to the Configure data in xtc; does nothing unless overridden.

Reimplemented in Pds::Trg::TmoTebPrimitive.

◆ event() [1/2]

virtual void Pds::Trg::TriggerPrimitive::event ( const Drp::MemPool &  pool,
uint32_t  index,
const XtcData::Xtc &  contribution,
XtcData::Xtc &  xtc,
const void *  bufEnd 
)
pure virtual

Pure virtual: append the TEB input data for the event contribution (pebble buffer index of pool) to xtc.

Implemented in Pds::Trg::TmoTebPrimitive.

◆ event() [2/2]

virtual void Pds::Trg::TriggerPrimitive::event ( cudaStream_t  stream,
unsigned *const  state,
float const *const  calibBuffers,
size_t const  calibBufsCnt,
uint32_t *const  outBuffers,
size_t const  outBufsCnt,
unsigned const *const  index,
unsigned *const  retCode_d 
)
inlinevirtual

GPU hook: enqueue on stream the work that writes the TEB input data; does nothing unless overridden.

Reimplemented in Pds::Trg::TmoTebPrimitive.

◆ size()

virtual size_t Pds::Trg::TriggerPrimitive::size ( ) const
pure virtual

Pure virtual: return the size in bytes of the TEB input data.

Implemented in Pds::Trg::TmoTebPrimitive.


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