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

Timing header at the start of the DMA data: the pulse ID word, the transition fields (time, env), an event counter and two opaque words. More...

#include <EbDgram.hh>

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

Public Member Functions

 TimingHeader ()=delete
 Deleted: the header is never constructed, only mapped over memory.
 
 TimingHeader (const TimingHeader &)=delete
 Deleted: the header cannot be copied.
 
void operator= (const TimingHeader &)=delete
 Deleted: the header cannot be copy-assigned.
 
unsigned control () const
 Return the 8 control bits (bits 63-56 of the pulse ID word).
 
XtcData::TransitionBase::Type type () const
 Return bits 5-4 of the control bits as the transition type.
 
XtcData::TransitionId::Value service () const
 Return the low 4 control bits as the transition ID.
 
bool isEvent () const
 Return true if the transition ID is L1Accept.
 
bool error () const
 Return true if bit 7 of the control bits is set (PgpReader logs it as a timing header error).
 
- 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::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.
 

Public Attributes

uint32_t evtCounter
 Event counter; PgpReader uses its low 24 bits to pick the PGPEvent and to detect jumps.
 
uint32_t _opaque [2]
 Two 32-bit words not interpreted in this header.
 
- 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).
 

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...
 
- Protected Attributes inherited from Pds::PulseId
uint64_t _pulseIdAndControl
 

Detailed Description

Timing header at the start of the DMA data: the pulse ID word, the transition fields (time, env), an event counter and two opaque words.

Not constructible or copyable, since it is only used over mapped memory (per the code comment).

Constructor & Destructor Documentation

◆ TimingHeader() [1/2]

Pds::TimingHeader::TimingHeader ( )
delete

Deleted: the header is never constructed, only mapped over memory.

◆ TimingHeader() [2/2]

Pds::TimingHeader::TimingHeader ( const TimingHeader &  )
delete

Deleted: the header cannot be copied.

Member Function Documentation

◆ control()

unsigned Pds::TimingHeader::control ( ) const
inline

Return the 8 control bits (bits 63-56 of the pulse ID word).

◆ error()

bool Pds::TimingHeader::error ( ) const
inline

Return true if bit 7 of the control bits is set (PgpReader logs it as a timing header error).

◆ isEvent()

bool Pds::TimingHeader::isEvent ( ) const
inline

Return true if the transition ID is L1Accept.

◆ operator=()

void Pds::TimingHeader::operator= ( const TimingHeader &  )
delete

Deleted: the header cannot be copy-assigned.

◆ service()

XtcData::TransitionId::Value Pds::TimingHeader::service ( ) const
inline

Return the low 4 control bits as the transition ID.

◆ type()

XtcData::TransitionBase::Type Pds::TimingHeader::type ( ) const
inline

Return bits 5-4 of the control bits as the transition type.

Member Data Documentation

◆ _opaque

uint32_t Pds::TimingHeader::_opaque[2]

Two 32-bit words not interpreted in this header.

◆ evtCounter

uint32_t Pds::TimingHeader::evtCounter

Event counter; PgpReader uses its low 24 bits to pick the PGPEvent and to detect jumps.


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