NSCL DDAS
12.1-001
Support for XIA DDAS at FRIB
|
Trigger class for DDAS. More...
#include <CMyTrigger.h>
Public Member Functions | |
CMyTrigger () | |
Default constructor. More... | |
~CMyTrigger () | |
Destructor. More... | |
virtual void | setup () |
Start the trigger timeout. More... | |
virtual void | teardown () |
Called as data taking ends. More... | |
virtual bool | operator() () |
operator() More... | |
virtual void | Initialize (int nummod) |
Setup the trigger and FIFO words array. More... | |
void | Reset () |
Control for determing if trigger should poll modules or pass control back to CEventSegment for processing the previous block of data. More... | |
unsigned int * | getWordsInModules () const |
Get the number of words in each module. More... | |
Trigger class for DDAS.
A trigger for DDAS systems intended to run inside a polling loop that asks the trigger if it has enough data to read out. The trigger logic is defined in the call operator which triggers a read for a crate of Pixie modules if any module in the crate exceeds its trigger threshold (FIFO threshold value).
CMyTrigger::CMyTrigger | ( | ) |
Default constructor.
If FIFO_THRESHOLD is defined and is a positive integer, it replaces the default value of m_fifoThreshold. The FIFO threshold is the number of 32-bit words that must be in the FIFO for the trigger to fire.
CMyTrigger::~CMyTrigger | ( | ) |
Destructor.
We need to deallocate memory used to store the FIFO words in each module.
|
inline |
Get the number of words in each module.
|
virtual |
Setup the trigger and FIFO words array.
nummod | The number of installed modules in the Pixie setup. Received from the event segment class. |
Delete and recreate the FIFO words array based on the number of modules.
|
virtual |
operator()
true | Good trigger, pass control back to the event segment. |
false | Not enough data to trigger. |
Defines the trigger logic. Trigger a read if the number of words in the external FIFO of any Pixie-16 module in a crate exceeds a defined threshold.
void CMyTrigger::Reset | ( | ) |
Control for determing if trigger should poll modules or pass control back to CEventSegment for processing the previous block of data.
Retrigger: always false.
|
virtual |
Start the trigger timeout.
|
virtual |
Called as data taking ends.
DDAS does not need any further signal as data taking end since this function is also called on a pause of data taking on't even think about desyncing modules here.