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

Validator that compares a threshold (compressed) stream with the matching raw stream. More...

#include <Stream.hh>

Public Member Functions

 ThrStream (const StreamHeader &strm)
 Keep a reference to the threshold stream header strm (not a copy).
 
bool validate (const StreamHeader &raw) const
 Return true if either stream has no samples, or if every non-skip word of the threshold stream equals the raw sample at the matching position.
 

Detailed Description

Validator that compares a threshold (compressed) stream with the matching raw stream.

The comment above describes a ramp test signal repeating 0..0xfe.

Constructor & Destructor Documentation

◆ ThrStream()

Pds::HSD::ThrStream::ThrStream ( const StreamHeader &  strm)

Keep a reference to the threshold stream header strm (not a copy).

Member Function Documentation

◆ validate()

bool Pds::HSD::ThrStream::validate ( const StreamHeader &  raw) const

Return true if either stream has no samples, or if every non-skip word of the threshold stream equals the raw sample at the matching position.

The comparison starts at each stream's boffs() and stops at whichever stream ends first (its samples() minus eoffs()); words past that point are not checked. Words with bit 15 set are skip markers that advance the raw position by their low 15 bits; a skip marker in the first position advances both positions by one. When both streams have samples, prints the error and test counts to stdout (nothing is printed on the early return for an empty stream).


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