Analysis-Utilities 26.9.9
C++/ROOT utilities for nuclear measurement data analysis
Loading...
Searching...
No Matches

One decoded SOL block, optionally carrying its traces. More...

#include <BinaryUtils.hpp>

Public Types

enum  DataType : UChar_t {
  ALL = 0 , OneTrace = 1 , NoTrace = 2 , Minimum = 3 ,
  MiniWithFineTime = 4 , Raw = 10
}
 SOL block layout, which decides both the fields and the traces present. More...

Public Member Functions

Bool_t hasTraces () const
 Whether this block carries traces.
UInt_t getSamples () const
 Samples per trace in this block.
const Int_t * getAnalog0 () const
 Pointer to the first analogue trace.
const Int_t * getAnalog1 () const
 Pointer to the second analogue trace.
const UChar_t * getDigital (UInt_t ch) const
 Pointer to one digital probe trace.
const Int_t * getOneTrace () const
 Pointer to the single trace of a OneTrace block.
void clearTraces ()
 Release the trace buffer, invalidating every trace pointer.
TString getDataTypeName () const
 Human-readable name for data_type.
void Print () const
 SOLData ()
 Construct with all fields zeroed and no traces.
 ~SOLData ()

Public Attributes

UShort_t block_header
 Raw block header word.
UChar_t channel
UShort_t energy
UShort_t energy_short
ULong64_t timestamp
UShort_t fine_timestamp
UShort_t flags_high
UShort_t flags_low
UChar_t data_type
Bool_t is_psd
UChar_t down_sampling
UChar_t board_fail
UChar_t flush
UShort_t trigger_thr
ULong64_t event_size
UInt_t agg_counter
ULong64_t trace_len
ULong64_t block_id
UChar_t ana_probe_type [2]
UChar_t dig_probe_type [4]
std::vector< Char_t > trace_data
 Raw trace bytes, exactly as written by the DAQ.

Detailed Description

One decoded SOL block, optionally carrying its traces.

Warning
The trace accessors hand back raw pointers into trace_data, which the reader reuses. Every one of them is invalidated by clearTraces() and by the next SOLReader::ReadEvent(). Copy what you need before advancing the reader, or use SOLReader::ToHit() for the header fields.

Definition at line 410 of file BinaryUtils.hpp.

Member Enumeration Documentation

◆ DataType

enum SOLData::DataType : UChar_t

SOL block layout, which decides both the fields and the traces present.

Only ALL and OneTrace carry traces; the rest are header-only.

Enumerator
ALL 
OneTrace 
NoTrace 
Minimum 
MiniWithFineTime 
Raw 

Definition at line 418 of file BinaryUtils.hpp.

Constructor & Destructor Documentation

◆ SOLData()

SOLData::SOLData ( )

Construct with all fields zeroed and no traces.

Definition at line 361 of file BinaryUtils.cpp.

◆ ~SOLData()

SOLData::~SOLData ( )
inline

Definition at line 545 of file BinaryUtils.hpp.

Member Function Documentation

◆ clearTraces()

void SOLData::clearTraces ( )
inline

Release the trace buffer, invalidating every trace pointer.

Definition at line 537 of file BinaryUtils.hpp.

◆ getAnalog0()

const Int_t * SOLData::getAnalog0 ( ) const
inline

Pointer to the first analogue trace.

Returns
Pointer to getSamples() samples, or null if this block format has no such trace or the buffer is short.
Warning
Invalidated by clearTraces() and by the next SOLReader::ReadEvent().

Definition at line 477 of file BinaryUtils.hpp.

Referenced by Print().

◆ getAnalog1()

const Int_t * SOLData::getAnalog1 ( ) const
inline

Pointer to the second analogue trace.

Returns
Pointer to getSamples() samples, or null for anything but an ALL block.
Warning
Invalidated by clearTraces() and by the next SOLReader::ReadEvent().

Definition at line 494 of file BinaryUtils.hpp.

Referenced by Print().

◆ getDataTypeName()

TString SOLData::getDataTypeName ( ) const

Human-readable name for data_type.

Definition at line 374 of file BinaryUtils.cpp.

Referenced by Print().

◆ getDigital()

const UChar_t * SOLData::getDigital ( UInt_t ch) const
inline

Pointer to one digital probe trace.

Parameters
chProbe index, 0 to 3.
Returns
Pointer to getSamples() samples, or null if ch is out of range, this is not an ALL block, or the buffer is short.
Warning
Invalidated by clearTraces() and by the next SOLReader::ReadEvent().

Definition at line 511 of file BinaryUtils.hpp.

◆ getOneTrace()

const Int_t * SOLData::getOneTrace ( ) const
inline

Pointer to the single trace of a OneTrace block.

Returns
Pointer to getSamples() samples, or null for any other format.
Warning
Invalidated by clearTraces() and by the next SOLReader::ReadEvent().

Definition at line 527 of file BinaryUtils.hpp.

Referenced by Print().

◆ getSamples()

UInt_t SOLData::getSamples ( ) const
inline

Samples per trace in this block.

Definition at line 467 of file BinaryUtils.hpp.

Referenced by Print().

◆ hasTraces()

Bool_t SOLData::hasTraces ( ) const
inline

Whether this block carries traces.

Returns
kTRUE for ALL and OneTrace blocks with a non-zero length.

Definition at line 462 of file BinaryUtils.hpp.

Referenced by InitUtils::ConvertSOLBinToHits(), and Print().

◆ Print()

void SOLData::Print ( ) const

Definition at line 393 of file BinaryUtils.cpp.

Member Data Documentation

◆ agg_counter

UInt_t SOLData::agg_counter

Definition at line 443 of file BinaryUtils.hpp.

Referenced by Print(), and SOLData().

◆ ana_probe_type

UChar_t SOLData::ana_probe_type[2]

Definition at line 446 of file BinaryUtils.hpp.

Referenced by Print(), and SOLData().

◆ block_header

UShort_t SOLData::block_header

Raw block header word.

Definition at line 428 of file BinaryUtils.hpp.

Referenced by Print(), and SOLData().

◆ block_id

ULong64_t SOLData::block_id

Definition at line 445 of file BinaryUtils.hpp.

Referenced by SOLData().

◆ board_fail

UChar_t SOLData::board_fail

Definition at line 439 of file BinaryUtils.hpp.

Referenced by Print(), and SOLData().

◆ channel

UChar_t SOLData::channel

Definition at line 429 of file BinaryUtils.hpp.

Referenced by Print(), and SOLData().

◆ data_type

UChar_t SOLData::data_type

◆ dig_probe_type

UChar_t SOLData::dig_probe_type[4]

Definition at line 447 of file BinaryUtils.hpp.

Referenced by Print(), and SOLData().

◆ down_sampling

UChar_t SOLData::down_sampling

Definition at line 438 of file BinaryUtils.hpp.

Referenced by Print(), and SOLData().

◆ energy

UShort_t SOLData::energy

Definition at line 430 of file BinaryUtils.hpp.

Referenced by Print(), and SOLData().

◆ energy_short

UShort_t SOLData::energy_short

Definition at line 431 of file BinaryUtils.hpp.

Referenced by Print(), and SOLData().

◆ event_size

ULong64_t SOLData::event_size

Definition at line 442 of file BinaryUtils.hpp.

Referenced by Print(), and SOLData().

◆ fine_timestamp

UShort_t SOLData::fine_timestamp

Definition at line 433 of file BinaryUtils.hpp.

Referenced by Print(), and SOLData().

◆ flags_high

UShort_t SOLData::flags_high

Definition at line 434 of file BinaryUtils.hpp.

Referenced by Print(), and SOLData().

◆ flags_low

UShort_t SOLData::flags_low

Definition at line 435 of file BinaryUtils.hpp.

Referenced by Print(), and SOLData().

◆ flush

UChar_t SOLData::flush

Definition at line 440 of file BinaryUtils.hpp.

Referenced by Print(), and SOLData().

◆ is_psd

Bool_t SOLData::is_psd

Definition at line 437 of file BinaryUtils.hpp.

Referenced by Print(), and SOLData().

◆ timestamp

ULong64_t SOLData::timestamp

Definition at line 432 of file BinaryUtils.hpp.

Referenced by InitUtils::ConvertSOLBinToROOT(), Print(), and SOLData().

◆ trace_data

std::vector<Char_t> SOLData::trace_data

Raw trace bytes, exactly as written by the DAQ.

Prefer the typed accessors below to indexing this directly.

Definition at line 458 of file BinaryUtils.hpp.

Referenced by clearTraces(), getAnalog0(), getAnalog1(), getDigital(), and getOneTrace().

◆ trace_len

ULong64_t SOLData::trace_len

◆ trigger_thr

UShort_t SOLData::trigger_thr

Definition at line 441 of file BinaryUtils.hpp.

Referenced by Print(), and SOLData().


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