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

XtcData::VarDef with the names and types of the 16 timing fields, in the order of the index enum, plus static helpers that write timing data into an Xtc. More...

#include <TimingDef.hh>

Inherits XtcData::VarDef.

Public Types

enum  { data_size = 153 }
 Size constant for the timing record. More...
 
enum  index {
  pulseId , timeStamp , fixedRates , acRates ,
  timeSlot , timeSlotPhase , ebeamPresent , ebeamDestn ,
  ebeamCharge , ebeamEnergy , xWavelength , dmod5 ,
  mpsLimits , mpsPowerClass , sequenceValues , inhibitCounts
}
 Positions of the fields in the TimingDef name list. More...
 

Public Member Functions

 TimingDef ()
 Fill NameVec with the 16 timing fields: UINT64 scalars pulseId and timeStamp, then fixedRates, acRates, timeSlot, timeSlotPhase, ebeamPresent, ebeamDestn, ebeamCharge, ebeamEnergy, xWavelength, dmod5, mpsLimits, mpsPowerClass, sequenceValues and inhibitCounts with the types listed in the index enum.
 

Static Public Member Functions

static void describeData (XtcData::Xtc &, const void *bufEnd, XtcData::NamesLookup &, XtcData::NamesId, const uint8_t *)
 Append a DescribedData to the Xtc that holds a copy of the first data_size (153) bytes of the last argument, and set the shapes of the eight array fields (10, 6, 4, 2, 16, 16, 18 and 8 elements).
 
static void createDataNoBSA (XtcData::Xtc &, const void *bufEnd, XtcData::NamesLookup &, XtcData::NamesId, const uint8_t *)
 Append CreateData values decoded from a raw timing record (last argument): pulse ID and timestamp, rate flags expanded from bits of a 16-bit word, a 3-bit time slot and 13-bit phase, beam present and destination bits, charge, the energy and wavelength arrays, dmod5, MPS limit bits, 4-bit MPS power classes, sequence values and inhibit counts.
 
static void createDataETM (XtcData::Xtc &, const void *bufEnd, XtcData::NamesLookup &, XtcData::NamesId, const uint8_t *, const uint8_t *)
 Append CreateData values taken from a header (pulse ID and timestamp; fifth argument) and an ETM record (rate flags, time slot, beam present and destination bits, sequence values; sixth argument).
 

Additional Inherited Members

- Public Attributes inherited from XtcData::VarDef
std::vector< Name > NameVec
 Name definitions, in order.
 

Detailed Description

XtcData::VarDef with the names and types of the 16 timing fields, in the order of the index enum, plus static helpers that write timing data into an Xtc.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Size constant for the timing record.

Enumerator
data_size 

Size in bytes of the packed TimingData layout (153); describeData() copies this many bytes.

◆ index

Positions of the fields in the TimingDef name list.

Enumerator
pulseId 

Index 0: pulseId (UINT64).

timeStamp 

Index 1: timeStamp (UINT64).

fixedRates 

Index 2: fixedRates (UINT8 array of 10).

acRates 

Index 3: acRates (UINT8 array of 6).

timeSlot 

Index 4: timeSlot (UINT8).

timeSlotPhase 

Index 5: timeSlotPhase (UINT16).

ebeamPresent 

Index 6: ebeamPresent (UINT8).

ebeamDestn 

Index 7: ebeamDestn (UINT8).

ebeamCharge 

Index 8: ebeamCharge (UINT16).

ebeamEnergy 

Index 9: ebeamEnergy (UINT16 array of 4).

xWavelength 

Index 10: xWavelength (UINT16 array of 2).

dmod5 

Index 11: dmod5 (UINT16).

mpsLimits 

Index 12: mpsLimits (UINT8 array of 16).

mpsPowerClass 

Index 13: mpsPowerClass (UINT8 array of 16).

sequenceValues 

Index 14: sequenceValues (UINT16 array of 18).

inhibitCounts 

Index 15: inhibitCounts (UINT32 array of 8).

Constructor & Destructor Documentation

◆ TimingDef()

Drp::TimingDef::TimingDef ( )

Fill NameVec with the 16 timing fields: UINT64 scalars pulseId and timeStamp, then fixedRates, acRates, timeSlot, timeSlotPhase, ebeamPresent, ebeamDestn, ebeamCharge, ebeamEnergy, xWavelength, dmod5, mpsLimits, mpsPowerClass, sequenceValues and inhibitCounts with the types listed in the index enum.

Member Function Documentation

◆ createDataETM()

static void Drp::TimingDef::createDataETM ( XtcData::Xtc &  ,
const void *  bufEnd,
XtcData::NamesLookup &  ,
XtcData::NamesId  ,
const uint8_t *  ,
const uint8_t *   
)
static

Append CreateData values taken from a header (pulse ID and timestamp; fifth argument) and an ETM record (rate flags, time slot, beam present and destination bits, sequence values; sixth argument).

Fields not taken from either (phase, charge, energy, wavelength, dmod5, MPS values, inhibit counts) are written as zeros.

◆ createDataNoBSA()

static void Drp::TimingDef::createDataNoBSA ( XtcData::Xtc &  ,
const void *  bufEnd,
XtcData::NamesLookup &  ,
XtcData::NamesId  ,
const uint8_t *   
)
static

Append CreateData values decoded from a raw timing record (last argument): pulse ID and timestamp, rate flags expanded from bits of a 16-bit word, a 3-bit time slot and 13-bit phase, beam present and destination bits, charge, the energy and wavelength arrays, dmod5, MPS limit bits, 4-bit MPS power classes, sequence values and inhibit counts.

◆ describeData()

static void Drp::TimingDef::describeData ( XtcData::Xtc &  ,
const void *  bufEnd,
XtcData::NamesLookup &  ,
XtcData::NamesId  ,
const uint8_t *   
)
static

Append a DescribedData to the Xtc that holds a copy of the first data_size (153) bytes of the last argument, and set the shapes of the eight array fields (10, 6, 4, 2, 16, 16, 18 and 8 elements).


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