|
Analysis-Utilities 26.9.9
C++/ROOT utilities for nuclear measurement data analysis
|
One decoded CoMPASS event, with header-bit and status-flag accessors. More...
#include <BinaryUtils.hpp>
Public Types | |
| enum | WaveformCode : UChar_t { INPUT = 1 , RC_CR = 2 , RC_CR2 = 3 , TRAPEZOID = 4 , BASELINE = 5 , THRESHOLD = 6 , CFD = 7 , TRAPEZOID_BASELINE = 8 , FAST_TRIANGLE = 33 , SMOOTHED_INPUT = 41 } |
| Which CoMPASS processing stage a stored waveform came from. More... | |
Public Member Functions | |
| Bool_t | hasEnergyCh () const |
| Whether the record carries an uncalibrated energy (header bit 0). | |
| Bool_t | hasEnergyCal () const |
| Whether the record carries a calibrated energy (header bit 1). | |
| Bool_t | hasEnergyShort () const |
| Whether the record carries a short-gate energy (header bit 2). | |
| Bool_t | hasWaveform () const |
| Whether the record carries waveform samples (header bit 3). | |
| UChar_t | getControlBits () const |
| The four header control bits as a nibble. | |
| Bool_t | hasDeadtime () const |
| Deadtime occurred before this event. | |
| Bool_t | hasTimestampRollover () const |
| The timestamp counter rolled over. | |
| Bool_t | hasTimestampResetExt () const |
| An external timestamp reset was applied. | |
| Bool_t | isFakeEvent () const |
| Synthetic event inserted by the acquisition. | |
| Bool_t | hasMemoryFull () const |
| Board memory was full. | |
| Bool_t | hasTriggerLost () const |
| At least one trigger was lost. | |
| Bool_t | hasNTriggersLost () const |
| The lost-trigger count field is present. | |
| Bool_t | hasSaturation () const |
| The input saturated within the integration gate. | |
| Bool_t | has1024Triggers () const |
| 1024 triggers have been counted. | |
| Bool_t | isFirstAfterBusy () const |
| First event after a busy period. | |
| Bool_t | isInputSaturating () const |
| The input is currently saturating. | |
| Bool_t | hasNTriggersCounted () const |
| The counted-trigger field is present. | |
| Bool_t | isNotMatchedTimeFilter () const |
| The event failed the coincidence time filter. | |
| Bool_t | hasFineTimestamp () const |
| A fine timestamp is available. | |
| Bool_t | isPileup () const |
| Pileup was detected. | |
| Bool_t | hasPLLLockLoss () const |
| The PLL lost lock. | |
| Bool_t | isOverTemperature () const |
| The board reported over-temperature. | |
| Bool_t | isADCShutdown () const |
| The ADC shut down. | |
| TString | getWaveformCodeName () const |
| Human-readable name for waveform_code. | |
| std::vector< TString > | getActiveFlags () const |
| Names of every status flag currently set in flags. | |
| void | Print () const |
| Print the whole event to stdout. | |
| void | PrintHeader () const |
| Print the header fields to stdout. | |
| void | PrintFlags () const |
| Print the active status flags to stdout. | |
| void | PrintWaveform () const |
| Print the waveform samples to stdout. | |
| CoMPASSData () | |
| Construct with all fields zeroed. | |
| virtual | ~CoMPASSData () |
Public Attributes | |
| UShort_t | header |
| Global header word; says which fields are valid. | |
| UShort_t | board |
| Digitiser board id. | |
| UShort_t | channel |
| Channel index on that board. | |
| ULong64_t | timestamp |
| Acquisition timestamp, in picoseconds. | |
| UShort_t | energy_ch |
| Energy in ADC channel units; valid if hasEnergyCh(). | |
| Double_t | energy_cal |
| Calibrated energy; valid if hasEnergyCal(). | |
| UShort_t | energy_short_ch |
| Short-gate energy; valid if hasEnergyShort(). | |
| UInt_t | flags |
| Status bits; see the flag constants above. | |
| UChar_t | waveform_code |
| Processing stage of samples; see WaveformCode. | |
| UInt_t | num_samples |
| Length of samples. | |
| TArrayS | samples |
| Waveform samples; valid if hasWaveform(). | |
Static Public Attributes | |
CoMPASS status flag bits, as found in #flags. | |
| static const UInt_t | DEADTIME_OCCURRED = 0x1 |
| static const UInt_t | TIMESTAMP_ROLLOVER = 0x2 |
| static const UInt_t | TIMESTAMP_RESET_EXT = 0x4 |
| static const UInt_t | FAKE_EVENT = 0x8 |
| static const UInt_t | MEMORY_FULL = 0x10 |
| static const UInt_t | TRIGGER_LOST = 0x20 |
| static const UInt_t | N_TRIGGERS_LOST = 0x40 |
| static const UInt_t | SATURATION_IN_GATE = 0x80 |
| static const UInt_t | TRIGGERS_1024_COUNTED = 0x100 |
| static const UInt_t | FIRST_AFTER_BUSY = 0x200 |
| static const UInt_t | INPUT_SATURATING = 0x400 |
| static const UInt_t | N_TRIGGERS_COUNTED = 0x800 |
| static const UInt_t | NOT_MATCHED_TIMEFILTER = 0x1000 |
| static const UInt_t | FINE_TIMESTAMP = 0x4000 |
| static const UInt_t | PILEUP = 0x8000 |
| static const UInt_t | PLL_LOCK_LOSS = 0x80000 |
| static const UInt_t | OVER_TEMPERATURE = 0x100000 |
| static const UInt_t | ADC_SHUTDOWN = 0x200000 |
One decoded CoMPASS event, with header-bit and status-flag accessors.
Which fields carry meaningful values is dictated by the file's global header, mirrored into header. Test it with hasEnergyCh() and friends before reading the corresponding member.
Definition at line 126 of file BinaryUtils.hpp.
| enum CoMPASSData::WaveformCode : UChar_t |
Which CoMPASS processing stage a stored waveform came from.
| Enumerator | |
|---|---|
| INPUT | |
| RC_CR | |
| RC_CR2 | |
| TRAPEZOID | |
| BASELINE | |
| THRESHOLD | |
| CFD | |
| TRAPEZOID_BASELINE | |
| FAST_TRIANGLE | |
| SMOOTHED_INPUT | |
Definition at line 129 of file BinaryUtils.hpp.
| CoMPASSData::CoMPASSData | ( | ) |
Construct with all fields zeroed.
Definition at line 4 of file BinaryUtils.cpp.
|
inlinevirtual |
Definition at line 244 of file BinaryUtils.hpp.
| std::vector< TString > CoMPASSData::getActiveFlags | ( | ) | const |
Names of every status flag currently set in flags.
Definition at line 40 of file BinaryUtils.cpp.
Referenced by PrintFlags().
|
inline |
The four header control bits as a nibble.
Definition at line 185 of file BinaryUtils.hpp.
| TString CoMPASSData::getWaveformCodeName | ( | ) | const |
Human-readable name for waveform_code.
Definition at line 13 of file BinaryUtils.cpp.
Referenced by PrintWaveform().
|
inline |
1024 triggers have been counted.
Definition at line 204 of file BinaryUtils.hpp.
Referenced by getActiveFlags().
|
inline |
Deadtime occurred before this event.
Definition at line 188 of file BinaryUtils.hpp.
Referenced by getActiveFlags().
|
inline |
Whether the record carries a calibrated energy (header bit 1).
Definition at line 179 of file BinaryUtils.hpp.
Referenced by Print(), and PrintHeader().
|
inline |
Whether the record carries an uncalibrated energy (header bit 0).
Definition at line 177 of file BinaryUtils.hpp.
Referenced by Print(), and PrintHeader().
|
inline |
Whether the record carries a short-gate energy (header bit 2).
Definition at line 181 of file BinaryUtils.hpp.
Referenced by Print(), and PrintHeader().
|
inline |
A fine timestamp is available.
Definition at line 216 of file BinaryUtils.hpp.
Referenced by getActiveFlags().
|
inline |
Board memory was full.
Definition at line 196 of file BinaryUtils.hpp.
Referenced by getActiveFlags().
|
inline |
The counted-trigger field is present.
Definition at line 210 of file BinaryUtils.hpp.
Referenced by getActiveFlags().
|
inline |
The lost-trigger count field is present.
Definition at line 200 of file BinaryUtils.hpp.
Referenced by getActiveFlags().
|
inline |
|
inline |
The input saturated within the integration gate.
Definition at line 202 of file BinaryUtils.hpp.
Referenced by getActiveFlags().
|
inline |
An external timestamp reset was applied.
Definition at line 192 of file BinaryUtils.hpp.
Referenced by getActiveFlags().
|
inline |
The timestamp counter rolled over.
Definition at line 190 of file BinaryUtils.hpp.
Referenced by getActiveFlags().
|
inline |
At least one trigger was lost.
Definition at line 198 of file BinaryUtils.hpp.
Referenced by getActiveFlags().
|
inline |
Whether the record carries waveform samples (header bit 3).
Definition at line 183 of file BinaryUtils.hpp.
Referenced by PrintHeader(), and PrintWaveform().
|
inline |
|
inline |
Synthetic event inserted by the acquisition.
Definition at line 194 of file BinaryUtils.hpp.
Referenced by getActiveFlags().
|
inline |
First event after a busy period.
Definition at line 206 of file BinaryUtils.hpp.
Referenced by getActiveFlags().
|
inline |
The input is currently saturating.
Definition at line 208 of file BinaryUtils.hpp.
Referenced by getActiveFlags().
|
inline |
The event failed the coincidence time filter.
Definition at line 212 of file BinaryUtils.hpp.
Referenced by getActiveFlags().
|
inline |
The board reported over-temperature.
Definition at line 222 of file BinaryUtils.hpp.
Referenced by getActiveFlags().
|
inline |
Pileup was detected.
Definition at line 218 of file BinaryUtils.hpp.
Referenced by getActiveFlags().
| void CoMPASSData::Print | ( | ) | const |
Print the whole event to stdout.
Print the whole event to stdout.
Print the block to stdout.
Definition at line 132 of file BinaryUtils.cpp.
| void CoMPASSData::PrintFlags | ( | ) | const |
Print the active status flags to stdout.
Definition at line 100 of file BinaryUtils.cpp.
Referenced by Print().
| void CoMPASSData::PrintHeader | ( | ) | const |
Print the header fields to stdout.
Definition at line 83 of file BinaryUtils.cpp.
Referenced by Print().
| void CoMPASSData::PrintWaveform | ( | ) | const |
Print the waveform samples to stdout.
Definition at line 116 of file BinaryUtils.cpp.
Referenced by Print().
|
static |
Definition at line 161 of file BinaryUtils.hpp.
Referenced by InitUtils::ConvertCoMPASSBinToROOT(), and isADCShutdown().
| UShort_t CoMPASSData::board |
Digitiser board id.
Definition at line 165 of file BinaryUtils.hpp.
Referenced by CoMPASSData(), and InitUtils::ConvertCoMPASSBinToROOT().
| UShort_t CoMPASSData::channel |
Channel index on that board.
Definition at line 166 of file BinaryUtils.hpp.
Referenced by CoMPASSData().
|
static |
Definition at line 144 of file BinaryUtils.hpp.
Referenced by hasDeadtime().
| Double_t CoMPASSData::energy_cal |
Calibrated energy; valid if hasEnergyCal().
Definition at line 169 of file BinaryUtils.hpp.
Referenced by CoMPASSData(), and Print().
| UShort_t CoMPASSData::energy_ch |
Energy in ADC channel units; valid if hasEnergyCh().
Definition at line 168 of file BinaryUtils.hpp.
Referenced by CoMPASSData(), and Print().
| UShort_t CoMPASSData::energy_short_ch |
Short-gate energy; valid if hasEnergyShort().
Definition at line 170 of file BinaryUtils.hpp.
Referenced by CoMPASSData(), and Print().
|
static |
Definition at line 147 of file BinaryUtils.hpp.
Referenced by InitUtils::ConvertCoMPASSBinToROOT(), and isFakeEvent().
|
static |
Definition at line 157 of file BinaryUtils.hpp.
Referenced by hasFineTimestamp().
|
static |
Definition at line 153 of file BinaryUtils.hpp.
Referenced by isFirstAfterBusy().
| UInt_t CoMPASSData::flags |
Status bits; see the flag constants above.
Definition at line 171 of file BinaryUtils.hpp.
Referenced by CoMPASSData(), has1024Triggers(), hasDeadtime(), hasFineTimestamp(), hasMemoryFull(), hasNTriggersCounted(), hasNTriggersLost(), hasPLLLockLoss(), hasSaturation(), hasTimestampResetExt(), hasTimestampRollover(), hasTriggerLost(), isADCShutdown(), isFakeEvent(), isFirstAfterBusy(), isInputSaturating(), isNotMatchedTimeFilter(), isOverTemperature(), isPileup(), and PrintFlags().
| UShort_t CoMPASSData::header |
Global header word; says which fields are valid.
Definition at line 164 of file BinaryUtils.hpp.
Referenced by CoMPASSData(), getControlBits(), hasEnergyCal(), hasEnergyCh(), hasEnergyShort(), hasWaveform(), and PrintHeader().
|
static |
Definition at line 154 of file BinaryUtils.hpp.
Referenced by InitUtils::ConvertCoMPASSBinToROOT(), and isInputSaturating().
|
static |
Definition at line 148 of file BinaryUtils.hpp.
Referenced by InitUtils::ConvertCoMPASSBinToROOT(), and hasMemoryFull().
|
static |
Definition at line 155 of file BinaryUtils.hpp.
Referenced by hasNTriggersCounted().
|
static |
Definition at line 150 of file BinaryUtils.hpp.
Referenced by hasNTriggersLost().
|
static |
Definition at line 156 of file BinaryUtils.hpp.
Referenced by isNotMatchedTimeFilter().
| UInt_t CoMPASSData::num_samples |
Length of samples.
Definition at line 173 of file BinaryUtils.hpp.
Referenced by CoMPASSData(), and PrintWaveform().
|
static |
Definition at line 160 of file BinaryUtils.hpp.
Referenced by InitUtils::ConvertCoMPASSBinToROOT(), and isOverTemperature().
|
static |
Definition at line 158 of file BinaryUtils.hpp.
Referenced by InitUtils::ConvertCoMPASSBinToROOT(), and isPileup().
|
static |
Definition at line 159 of file BinaryUtils.hpp.
Referenced by InitUtils::ConvertCoMPASSBinToROOT(), and hasPLLLockLoss().
| TArrayS CoMPASSData::samples |
Waveform samples; valid if hasWaveform().
Definition at line 174 of file BinaryUtils.hpp.
Referenced by PrintWaveform().
|
static |
Definition at line 151 of file BinaryUtils.hpp.
Referenced by InitUtils::ConvertCoMPASSBinToROOT(), and hasSaturation().
| ULong64_t CoMPASSData::timestamp |
Acquisition timestamp, in picoseconds.
Definition at line 167 of file BinaryUtils.hpp.
Referenced by CoMPASSData().
|
static |
Definition at line 146 of file BinaryUtils.hpp.
Referenced by hasTimestampResetExt().
|
static |
Definition at line 145 of file BinaryUtils.hpp.
Referenced by hasTimestampRollover().
|
static |
Definition at line 149 of file BinaryUtils.hpp.
Referenced by InitUtils::ConvertCoMPASSBinToROOT(), and hasTriggerLost().
|
static |
Definition at line 152 of file BinaryUtils.hpp.
Referenced by has1024Triggers().
| UChar_t CoMPASSData::waveform_code |
Processing stage of samples; see WaveformCode.
Definition at line 172 of file BinaryUtils.hpp.
Referenced by CoMPASSData(), getWaveformCodeName(), and PrintWaveform().