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

Validator that expects each raw sample to be the previous sample plus 1 modulo 0x800. More...

#include <Stream.hh>

Public Member Functions

 RawStream (const EventHeader &event, const StreamHeader &strm)
 Store the first sample and address range of strm, then print a message and throw a const char* (pulse-id support was removed), so construction never succeeds.
 
bool validate (const EventHeader &event, const StreamHeader &next) const
 Return true if next has no samples, or if every sample from boffs() up to samples()-eoffs() matches: the first equals the stored first sample (masked to 11 bits) and each later one equals the previous sample plus 1, masked with 0x7ff.
 

Static Public Member Functions

static void interleave (bool v)
 Set the file-static interleave flag read by the private adcVal().
 
static void verbose (unsigned)
 Set the file-static verbosity used by RawStream::validate() and ThrStream::validate(): nonzero prints mismatches, and above 1 RawStream::validate() also prints the error count.
 

Detailed Description

Validator that expects each raw sample to be the previous sample plus 1 modulo 0x800.

The comment above says it is used only for testing; its constructor always throws.

Constructor & Destructor Documentation

◆ RawStream()

Pds::HSD::RawStream::RawStream ( const EventHeader &  event,
const StreamHeader &  strm 
)

Store the first sample and address range of strm, then print a message and throw a const char* (pulse-id support was removed), so construction never succeeds.

event is not used.

Member Function Documentation

◆ interleave()

static void Pds::HSD::RawStream::interleave ( bool  v)
static

Set the file-static interleave flag read by the private adcVal().

With the pulse id fixed at 0 it does not change the result.

◆ validate()

bool Pds::HSD::RawStream::validate ( const EventHeader &  event,
const StreamHeader &  next 
) const

Return true if next has no samples, or if every sample from boffs() up to samples()-eoffs() matches: the first equals the stored first sample (masked to 11 bits) and each later one equals the previous sample plus 1, masked with 0x7ff.

event is not used.

◆ verbose()

static void Pds::HSD::RawStream::verbose ( unsigned  )
static

Set the file-static verbosity used by RawStream::validate() and ThrStream::validate(): nonzero prints mismatches, and above 1 RawStream::validate() also prints the error count.


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