lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
Loading...
Searching...
No Matches
eb.hh File Reference

Event-builder constants (limits, timeouts, batch sizes), parameter structures for TEB/MEB contributors and builders, and the latency() helper. More...

#include <cstdint>
#include <string>
#include <vector>
#include <array>
#include <map>
#include <chrono>
#include "xtcdata/xtc/TimeStamp.hh"

Classes

struct  Pds::Eb::TebCtrbParams
 Parameters of a TEB contributor (a DRP), per the original comment. More...
 
struct  Pds::Eb::MebCtrbParams
 Parameters of an MEB contributor (a DRP), per the original comment. More...
 
struct  Pds::Eb::EbParams
 Parameters used by both TEBs and MEBs, per the original comment. More...
 

Namespaces

namespace  Pds
 Outer namespace of the HSD digitizer helpers.
 
namespace  Pds::Eb
 Namespace of the psdaq event-builder (eb) code.
 

Macros

#define POSIX_TIME_AT_EPICS_EPOCH   631152000u
 Seconds from the POSIX epoch (1970-01-01) to the EPICS epoch (1990-01-01): 631152000.
 

Enumerations

enum  {
  Pds::Eb::VL_NONE , Pds::Eb::VL_DEFAULT , Pds::Eb::VL_BATCH , Pds::Eb::VL_EVENT ,
  Pds::Eb::VL_DETAILED
}
 Verbosity levels, from none to most detailed. More...
 

Functions

template<typename T >
int64_t Pds::Eb::latency (const XtcData::TimeStamp &)
 Return the time from timestamp time to now (std::chrono::system_clock) as a count of duration type T.
 

Variables

const unsigned Pds::Eb::MAX_DRPS = 64
 Maximum number of contributors (64; the original comment says these limits come from the bits of a uint64_t).
 
const unsigned Pds::Eb::MAX_TEBS = 4
 Maximum number of trigger event builders (4).
 
const unsigned Pds::Eb::MAX_MEBS = 4
 Maximum number of monitor event builders (4).
 
const unsigned Pds::Eb::MAX_MRQS = MAX_MEBS
 Maximum number of monitor requestors; equal to MAX_MEBS.
 
const unsigned Pds::Eb::NUM_READOUT_GROUPS = 8
 Number of readout groups supported (8).
 
const unsigned Pds::Eb::TICK_RATE = 1000000 * 13/14
 System clock rate in Hz according to the original comment; computed in integer arithmetic as 1000000 * 13 / 14.
 
const unsigned Pds::Eb::EB_TMO_MS = 12000
 Event-builder event timeout in milliseconds (12000).
 
const unsigned Pds::Eb::TEB_TR_BUFFERS = 128
 Number of TEB transition buffers (128); the original comment says it must exceed the timeout times the SlowUpdate rate.
 
const unsigned Pds::Eb::MEB_TR_BUFFERS = 24
 Number of MEB transition buffers (24); the original comment says it must exceed the timeout times the SlowUpdate rate.
 
const unsigned Pds::Eb::MAX_ENTRIES = 64
 Maximum number of entries (events) per batch (64).
 
const uint64_t Pds::Eb::BATCH_DURATION = MAX_ENTRIES
 Batch duration in pulse-ID ticks; equal to MAX_ENTRIES and checked by a static_assert to be a power of 2.
 
const unsigned Pds::Eb::MAX_LATENCY = 16 * 1024 * 1024
 Buffering range in pulse-ID ticks (16 * 1024 * 1024).
 
const unsigned Pds::Eb::MAX_BATCHES = MAX_LATENCY / MAX_ENTRIES
 Maximum number of batches in circulation, MAX_LATENCY / MAX_ENTRIES; checked by a static_assert to be a power of 2.
 

Detailed Description

Event-builder constants (limits, timeouts, batch sizes), parameter structures for TEB/MEB contributors and builders, and the latency() helper.

Macro Definition Documentation

◆ POSIX_TIME_AT_EPICS_EPOCH

#define POSIX_TIME_AT_EPICS_EPOCH   631152000u

Seconds from the POSIX epoch (1970-01-01) to the EPICS epoch (1990-01-01): 631152000.

Only defined if not already defined.