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

Dgram prefixed by the pulse ID word, as built by the DRPs and exchanged with the event builders. More...

#include <EbDgram.hh>

Inherits Pds::PulseId, and XtcData::Dgram.

Inherited by Pds::Eb::ResultDgram.

Public Member Functions

 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

Dgram prefixed by the pulse ID word, as built by the DRPs and exchanged with the event builders.

Bit 62 of the word (control bit 6) marks the end of a batch (EOL).

Constructor & Destructor Documentation

◆ EbDgram() [1/2]

Pds::EbDgram::EbDgram ( const PulseId &  pulseId,
const Dgram &  dgram 
)
inline

Construct from the pulse ID of pulseId (control bits dropped) and a copy of dgram.

◆ EbDgram() [2/2]

Pds::EbDgram::EbDgram ( const TimingHeader &  th,
const XtcData::Src  src,
uint32_t  envRogMask 
)
inline

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.

Member Function Documentation

◆ isEOL()

bool Pds::EbDgram::isEOL ( ) const
inline

Return true if bit 62 of the pulse ID word is set.

◆ keepRaw()

bool Pds::EbDgram::keepRaw ( ) const
inline

Return bit 22 of env.

◆ setEOL()

void Pds::EbDgram::setEOL ( ) const
inline

Set bit 62 of the pulse ID word, marking the last entry of a batch (callable on const objects).


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