JAPAn
Just Another Parity Analyzer
|
Ring buffer of subsystem snapshots for burp/stability handling. More...
#include <QwEventRing.h>
Public Member Functions | |
QwEventRing (QwOptions &options, QwSubsystemArrayParity &event) | |
virtual | ~QwEventRing () |
void | ProcessOptions (QwOptions &options) |
Process options. | |
void | push (QwSubsystemArrayParity &event) |
Add the subsystem to the ring. | |
QwSubsystemArrayParity & | pop () |
Return the last subsystem in the ring. | |
void | PrintRollingAverage () |
Print value of rolling average. | |
Bool_t | IsReady () |
Return the read status of the ring. | |
void | CheckBurpCut (Int_t thisevent) |
Int_t | GetNumberOfEvents () const |
Return the number of events in the ring. | |
void | Unwind () |
Unwind the ring until empty. | |
Static Public Member Functions | |
static void | DefineOptions (QwOptions &options) |
Define options. | |
Private Member Functions | |
QwEventRing () | |
Private Attributes | |
Int_t | fRING_SIZE |
Int_t | fNumberOfEvents |
Int_t | fNextToBeFilled |
Int_t | fNextToBeRead |
Bool_t | fPrintAfterUnwind |
Bool_t | bEVENT_READY |
Bool_t | bRING_READY |
std::vector< QwSubsystemArrayParity > | fEvent_Ring |
QwSubsystemArrayParity | fRollingAvg |
FILE * | out_file |
Bool_t | bStability |
int | holdoff |
int | countdown |
Int_t | fBurpExtent |
Int_t | fBurpPrecut |
QwSubsystemArrayParity | fBurpAvg |
Static Private Attributes | |
static const Bool_t | bDEBUG =kFALSE |
static const Bool_t | bDEBUG_Write =kFALSE |
Ring buffer of subsystem snapshots for burp/stability handling.
Maintains a sliding window of events to compute running averages, handle beam trips with holdoff, and apply burp cuts over extents.
Definition at line 28 of file QwEventRing.h.
|
private |
QwEventRing::QwEventRing | ( | QwOptions & | options, |
QwSubsystemArrayParity & | event ) |
Event ring buffer for burp detection and stability monitoring. Maintains a circular buffer of recent events, applies rolling averages for stability cuts, and implements burp detection with configurable extent and precut parameters. Documentation-only edits; runtime behavior unchanged. Constructor: initialize ring buffer with specified size and options.
Definition at line 14 of file QwEventRing.cc.
References bDEBUG_Write, bEVENT_READY, bRING_READY, countdown, fBurpAvg, fEvent_Ring, fNextToBeFilled, fNextToBeRead, fNumberOfEvents, fRING_SIZE, fRollingAvg, out_file, and ProcessOptions().
|
inlinevirtual |
Definition at line 41 of file QwEventRing.h.
void QwEventRing::CheckBurpCut | ( | Int_t | thisevent | ) |
Perform burp detection for the specified event, marking preceding events if a burp is detected and maintaining the burp average window.
Definition at line 224 of file QwEventRing.cc.
References bRING_READY, fBurpAvg, fBurpExtent, fBurpPrecut, fEvent_Ring, fRING_SIZE, and kPreserveError.
Referenced by push().
|
static |
Define options.
Define command-line options for ring buffer and burp detection parameters.
Definition at line 36 of file QwEventRing.cc.
References QwOptions::AddOptions().
Referenced by DefineOptionsParity().
|
inline |
Return the number of events in the ring.
Definition at line 65 of file QwEventRing.h.
References fNumberOfEvents.
Referenced by Unwind().
Bool_t QwEventRing::IsReady | ( | ) |
Return the read status of the ring.
Check if the ring buffer has events ready for retrieval.
Definition at line 216 of file QwEventRing.cc.
References bRING_READY.
Referenced by main().
QwSubsystemArrayParity & QwEventRing::pop | ( | ) |
Return the last subsystem in the ring.
Retrieve the next event from the ring buffer and deaccumulate from rolling average if stability monitoring is enabled.
Definition at line 193 of file QwEventRing.cc.
References bDEBUG, bDEBUG_Write, bRING_READY, bStability, QwLog::endl(), fEvent_Ring, fNextToBeRead, fNumberOfEvents, fRING_SIZE, fRollingAvg, out_file, and QwMessage.
Referenced by main(), and Unwind().
|
inline |
Print value of rolling average.
Definition at line 54 of file QwEventRing.h.
References fRollingAvg.
Referenced by Unwind().
void QwEventRing::ProcessOptions | ( | QwOptions & | options | ) |
Process options.
Process options and validate ring/burp parameter consistency.
Definition at line 67 of file QwEventRing.cc.
References bStability, QwLog::endl(), fBurpExtent, fBurpPrecut, fPrintAfterUnwind, fRING_SIZE, gQwOptions, holdoff, QwWarning, and VQwHardwareChannel::SetBurpHoldoff().
Referenced by QwEventRing().
void QwEventRing::push | ( | QwSubsystemArrayParity & | event | ) |
Add the subsystem to the ring.
Add an event to the ring buffer, applying stability cuts and burp detection. Updates rolling averages and marks events with beam trip or stability errors.
Definition at line 118 of file QwEventRing.cc.
References bDEBUG, bDEBUG_Write, bEVENT_READY, bRING_READY, bStability, CheckBurpCut(), countdown, QwLog::endl(), fEvent_Ring, fNextToBeFilled, fNumberOfEvents, fRING_SIZE, fRollingAvg, holdoff, kBCMErrorFlag, kBeamTripError, out_file, and QwMessage.
Referenced by main().
|
inline |
Unwind the ring until empty.
Definition at line 68 of file QwEventRing.h.
References QwLog::endl(), fPrintAfterUnwind, GetNumberOfEvents(), pop(), PrintRollingAverage(), and QwMessage.
Referenced by main().
|
staticprivate |
Definition at line 97 of file QwEventRing.h.
|
staticprivate |
Definition at line 98 of file QwEventRing.h.
Referenced by pop(), push(), and QwEventRing().
|
private |
Definition at line 86 of file QwEventRing.h.
Referenced by push(), and QwEventRing().
|
private |
Definition at line 89 of file QwEventRing.h.
Referenced by CheckBurpCut(), IsReady(), pop(), push(), and QwEventRing().
|
private |
Definition at line 101 of file QwEventRing.h.
Referenced by pop(), ProcessOptions(), and push().
|
private |
Definition at line 105 of file QwEventRing.h.
Referenced by push(), and QwEventRing().
|
private |
Definition at line 110 of file QwEventRing.h.
Referenced by CheckBurpCut(), and QwEventRing().
|
private |
Definition at line 108 of file QwEventRing.h.
Referenced by CheckBurpCut(), and ProcessOptions().
|
private |
Definition at line 109 of file QwEventRing.h.
Referenced by CheckBurpCut(), and ProcessOptions().
|
private |
Definition at line 91 of file QwEventRing.h.
Referenced by CheckBurpCut(), pop(), push(), and QwEventRing().
|
private |
Definition at line 81 of file QwEventRing.h.
Referenced by push(), and QwEventRing().
|
private |
Definition at line 82 of file QwEventRing.h.
Referenced by pop(), and QwEventRing().
|
private |
Definition at line 79 of file QwEventRing.h.
Referenced by GetNumberOfEvents(), pop(), push(), and QwEventRing().
|
private |
Definition at line 84 of file QwEventRing.h.
Referenced by ProcessOptions(), and Unwind().
|
private |
Definition at line 77 of file QwEventRing.h.
Referenced by CheckBurpCut(), pop(), ProcessOptions(), push(), and QwEventRing().
|
private |
Definition at line 93 of file QwEventRing.h.
Referenced by pop(), PrintRollingAverage(), push(), and QwEventRing().
|
private |
Definition at line 104 of file QwEventRing.h.
Referenced by ProcessOptions(), and push().
|
private |
Definition at line 96 of file QwEventRing.h.
Referenced by pop(), push(), and QwEventRing().