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

L1Dgram followed by two 32-bit info words decoded by samples(), streams(), channels() and sync(). More...

#include <Stream.hh>

Inherits XtcData::L1Dgram.

Public Member Functions

 EventHeader ()
 Default constructor; nothing is initialized.
 
unsigned eventType () const
 Return service(), the transition id from the env word.
 
uint64_t timeStamp () const
 Return time.value() (seconds in the high 32 bits, nanoseconds in the low 32 bits).
 
unsigned samples () const
 Return info word 0 bits 19:0.
 
unsigned streams () const
 Return info word 0 bits 23:20.
 
unsigned channels () const
 Return info word 0 bits 31:24.
 
unsigned sync () const
 Return info word 1 bits 2:0.
 
void dump () const
 Print to stdout the first eight 32-bit words of the object in hex, the time, readoutGroups() and sync(), and a line with env, both info words and the decoded fields.
 
- Public Member Functions inherited from XtcData::L1Dgram
uint16_t reserved () const
 Return env bits 23:16.
 
bool keepRaw () const
 Return env bit 22 (bit 6 of reserved(), labeled L0Raw in the source comment).
 
- 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.
 

Detailed Description

L1Dgram followed by two 32-bit info words decoded by samples(), streams(), channels() and sync().

The comment above says it is used only for testing (psalg/tests/hsd_valid.cc).

Constructor & Destructor Documentation

◆ EventHeader()

Pds::HSD::EventHeader::EventHeader ( )
inline

Default constructor; nothing is initialized.

Member Function Documentation

◆ channels()

unsigned Pds::HSD::EventHeader::channels ( ) const
inline

Return info word 0 bits 31:24.

◆ dump()

void Pds::HSD::EventHeader::dump ( ) const
inline

Print to stdout the first eight 32-bit words of the object in hex, the time, readoutGroups() and sync(), and a line with env, both info words and the decoded fields.

◆ eventType()

unsigned Pds::HSD::EventHeader::eventType ( ) const
inline

Return service(), the transition id from the env word.

◆ samples()

unsigned Pds::HSD::EventHeader::samples ( ) const
inline

Return info word 0 bits 19:0.

◆ streams()

unsigned Pds::HSD::EventHeader::streams ( ) const
inline

Return info word 0 bits 23:20.

◆ sync()

unsigned Pds::HSD::EventHeader::sync ( ) const
inline

Return info word 1 bits 2:0.

◆ timeStamp()

uint64_t Pds::HSD::EventHeader::timeStamp ( ) const
inline

Return time.value() (seconds in the high 32 bits, nanoseconds in the low 32 bits).


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