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

ResultDgram whose auxdata field holds four 6-bit fields: add (bits 5-0), record (bits 11-6), monitor (bits 17-12) and flush (bits 23-18). More...

#include <WindowResultDgram.hh>

Inherits Pds::Eb::ResultDgram.

Public Member Functions

 WindowResultDgram (const Pds::EbDgram &dgram, unsigned id)
 Construct as ResultDgram(dgram, id).
 
void updateAdd (unsigned value)
 Set the add field (auxdata bits 5-0) to value, masked to 6 bits.
 
void updateRecord (unsigned value)
 Set the record field (auxdata bits 11-6) to value, masked to 6 bits.
 
void updateMonitor (unsigned value)
 Set the monitor field (auxdata bits 17-12) to value, masked to 6 bits.
 
void flush (unsigned value)
 Set the flush field (auxdata bits 23-18) to value, masked to 6 bits.
 
uint32_t updateAdd () const
 Return the add field (auxdata bits 5-0).
 
uint32_t updateRecord () const
 Return the record field (auxdata bits 11-6).
 
uint32_t updateMonitor () const
 Return the monitor field (auxdata bits 17-12).
 
uint32_t flush () const
 Return the flush field (auxdata bits 23-18).
 
void dump (const char *title) const
 Print title followed by the whole object as 32-bit hex words to stdout.
 
- Public Member Functions inherited from Pds::Eb::ResultDgram
 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

ResultDgram whose auxdata field holds four 6-bit fields: add (bits 5-0), record (bits 11-6), monitor (bits 17-12) and flush (bits 23-18).

Constructor & Destructor Documentation

◆ WindowResultDgram()

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

Construct as ResultDgram(dgram, id).

Member Function Documentation

◆ dump()

void Pds::Eb::WindowResultDgram::dump ( const char *  title) const
inline

Print title followed by the whole object as 32-bit hex words to stdout.

◆ flush() [1/2]

uint32_t Pds::Eb::WindowResultDgram::flush ( ) const
inline

Return the flush field (auxdata bits 23-18).

◆ flush() [2/2]

void Pds::Eb::WindowResultDgram::flush ( unsigned  value)
inline

Set the flush field (auxdata bits 23-18) to value, masked to 6 bits.

◆ updateAdd() [1/2]

uint32_t Pds::Eb::WindowResultDgram::updateAdd ( ) const
inline

Return the add field (auxdata bits 5-0).

◆ updateAdd() [2/2]

void Pds::Eb::WindowResultDgram::updateAdd ( unsigned  value)
inline

Set the add field (auxdata bits 5-0) to value, masked to 6 bits.

◆ updateMonitor() [1/2]

uint32_t Pds::Eb::WindowResultDgram::updateMonitor ( ) const
inline

Return the monitor field (auxdata bits 17-12).

◆ updateMonitor() [2/2]

void Pds::Eb::WindowResultDgram::updateMonitor ( unsigned  value)
inline

Set the monitor field (auxdata bits 17-12) to value, masked to 6 bits.

◆ updateRecord() [1/2]

uint32_t Pds::Eb::WindowResultDgram::updateRecord ( ) const
inline

Return the record field (auxdata bits 11-6).

◆ updateRecord() [2/2]

void Pds::Eb::WindowResultDgram::updateRecord ( unsigned  value)
inline

Set the record field (auxdata bits 11-6) to value, masked to 6 bits.


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