lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
Loading...
Searching...
No Matches
Pds::Eb::ResultDgram Class Reference

Trigger result datagram: an EbDgram followed by a 32-bit result word and a 32-bit monitor buffer number word. More...

#include <ResultDgram.hh>

Inherits Pds::EbDgram.

Inherited by Pds::Eb::CubeConfigDgram, Pds::Eb::CubeResultDgram, and Pds::Eb::WindowResultDgram.

Public Member Functions

 ResultDgram (const Pds::EbDgram &dgram, unsigned id)
 Copy the pulse ID and transition header of dgram, use a new Xtc of TypeId::Data (version 0) with source Src(id, Level::Event), zero both words, and add their size to the Xtc extent.
 
void prescale (bool value)
 Set or clear the prescale bit (bit 0) of the result word.
 
void persist (bool value)
 Set or clear the persist bit (bit 1) of the result word.
 
void monitor (uint32_t value)
 Set the monitor field (MAX_MRQS bits starting at bit 2) of the result word to value, masked to the field width.
 
void auxdata (uint32_t value)
 Set the auxdata field (bits 31-8) of the result word to value, masked to 24 bits.
 
bool prescale () const
 Return true if the prescale bit (bit 0) is set.
 
bool persist () const
 Return true if the persist bit (bit 1) is set.
 
uint32_t monitor () const
 Return the monitor field (MAX_MRQS bits starting at bit 2), shifted down.
 
uint32_t auxdata () const
 Return the auxdata field (bits 31-8), shifted down.
 
uint32_t data () const
 Return the whole 32-bit result word.
 
void monBufNo (uint32_t monBufNo_)
 Set the monitor buffer number word (CubeConfigDgram stores its ResultType in this word).
 
uint32_t monBufNo () const
 Return the monitor buffer number word.
 
- Public Member Functions inherited from Pds::EbDgram
 EbDgram (const PulseId &pulseId, const Dgram &dgram)
 Construct from the pulse ID of pulseId (control bits dropped) and a copy of dgram.
 
 EbDgram (const TimingHeader &th, const XtcData::Src src, uint32_t envRogMask)
 Construct from a timing header: pulse ID (control bits dropped), time, env set to the control bits in bits 31-24 plus th.env masked by envRogMask, and an empty Parent Xtc with source src.
 
void setEOL () const
 Set bit 62 of the pulse ID word, marking the last entry of a batch (callable on const objects).
 
bool isEOL () const
 Return true if bit 62 of the pulse ID word is set.
 
bool keepRaw () const
 Return bit 22 of env.
 
- Public Member Functions inherited from Pds::PulseId
 PulseId (uint64_t value)
 Store value as the whole 64-bit word, control bits included.
 
uint64_t pulseId () const
 Return the low 56 bits of the word (the pulse ID without the control bits).
 
- Public Member Functions inherited from XtcData::Dgram
 Dgram ()
 Default constructor; header fields are uninitialized and xtc is default-constructed (damage 0, extent 0).
 
 Dgram (const Transition &transition_)
 Copy the header from transition_; xtc is default-constructed (damage 0, extent 0).
 
 Dgram (const Transition &transition_, const Xtc &xtc_)
 Copy the header from transition_ and copy-construct xtc from xtc_.
 
- Public Member Functions inherited from XtcData::Transition
 Transition ()
 Default constructor; fields are left uninitialized as in TransitionBase().
 
 Transition (Type type_, TransitionId::Value tid_, const TimeStamp &time_, uint32_t env_)
 Forward all arguments to TransitionBase(type_, tid_, time_, env_).
 
unsigned control () const
 Return env bits 31:24.
 
TransitionId::Value service () const
 Return env bits 27:24 as a TransitionId::Value.
 
Type type () const
 Return env bits 29:28 as a Type.
 
bool isEvent () const
 Return true if service() is TransitionId::L1Accept.
 
bool isExtended () const
 Return true if env bit 16 is set and isEvent() is false.
 
- Public Member Functions inherited from XtcData::TransitionBase
 TransitionBase ()
 Default constructor; time and env are left uninitialized.
 
 TransitionBase (Type type_, TransitionId::Value tid_, const TimeStamp &time_, uint32_t env_)
 Set time to time_ and env to (type_<<28)|(tid_<<24)|(env_&0xffffff).
 
uint16_t readoutGroups () const
 Return the low 16 bits of env.
 

Additional Inherited Members

- Public Types inherited from XtcData::TransitionBase
enum  Type { Event = 0 , Occurrence = 1 , Marker = 2 }
 Transition type; Transition::type() reads it from env bits 29:28. More...
 
enum  { NumberOfTypes = 3 }
 Count of Type values. More...
 
- Public Attributes inherited from XtcData::Dgram
Xtc xtc
 Top-level Xtc container.
 
- Public Attributes inherited from XtcData::TransitionBase
TimeStamp time
 Datagram timestamp.
 
uint32_t env
 Packed word: type, transition id and 24 low bits (layout in the class description).
 
- Static Public Attributes inherited from XtcData::Dgram
static const unsigned MaxSize = 0x1000000
 0x1000000. Inferred from the name to be a maximum datagram size in bytes; not enforced in this header.
 
- Protected Attributes inherited from Pds::PulseId
uint64_t _pulseIdAndControl
 

Detailed Description

Trigger result datagram: an EbDgram followed by a 32-bit result word and a 32-bit monitor buffer number word.

The result word holds the prescale bit (bit 0), the persist bit (bit 1), a MAX_MRQS-bit monitor field starting at bit 2 and a 24-bit auxdata field (bits 31-8).

Constructor & Destructor Documentation

◆ ResultDgram()

Pds::Eb::ResultDgram::ResultDgram ( const Pds::EbDgram &  dgram,
unsigned  id 
)
inline

Copy the pulse ID and transition header of dgram, use a new Xtc of TypeId::Data (version 0) with source Src(id, Level::Event), zero both words, and add their size to the Xtc extent.

Member Function Documentation

◆ auxdata() [1/2]

uint32_t Pds::Eb::ResultDgram::auxdata ( ) const
inline

Return the auxdata field (bits 31-8), shifted down.

◆ auxdata() [2/2]

void Pds::Eb::ResultDgram::auxdata ( uint32_t  value)
inline

Set the auxdata field (bits 31-8) of the result word to value, masked to 24 bits.

◆ data()

uint32_t Pds::Eb::ResultDgram::data ( ) const
inline

Return the whole 32-bit result word.

◆ monBufNo() [1/2]

uint32_t Pds::Eb::ResultDgram::monBufNo ( ) const
inline

Return the monitor buffer number word.

◆ monBufNo() [2/2]

void Pds::Eb::ResultDgram::monBufNo ( uint32_t  monBufNo_)
inline

Set the monitor buffer number word (CubeConfigDgram stores its ResultType in this word).

◆ monitor() [1/2]

uint32_t Pds::Eb::ResultDgram::monitor ( ) const
inline

Return the monitor field (MAX_MRQS bits starting at bit 2), shifted down.

◆ monitor() [2/2]

void Pds::Eb::ResultDgram::monitor ( uint32_t  value)
inline

Set the monitor field (MAX_MRQS bits starting at bit 2) of the result word to value, masked to the field width.

◆ persist() [1/2]

bool Pds::Eb::ResultDgram::persist ( ) const
inline

Return true if the persist bit (bit 1) is set.

◆ persist() [2/2]

void Pds::Eb::ResultDgram::persist ( bool  value)
inline

Set or clear the persist bit (bit 1) of the result word.

◆ prescale() [1/2]

bool Pds::Eb::ResultDgram::prescale ( ) const
inline

Return true if the prescale bit (bit 0) is set.

◆ prescale() [2/2]

void Pds::Eb::ResultDgram::prescale ( bool  value)
inline

Set or clear the prescale bit (bit 0) of the result word.


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