A class to read and fetch trace data from Pixie-16 modules.
More...
#include <CPixieTraceUtilities.h>
A class to read and fetch trace data from Pixie-16 modules.
This class provides a ctypes-friendly interface to acquire "validated" (traces which are likely to contain a good signal pulse) and unvalidated traces. The class also provides methods to access the trace data.
- Todo:
- Instead of validated traces can we process the trace using the fast filter parameters and wait for a real trigger?
◆ CPixieTraceUtilities()
| CPixieTraceUtilities::CPixieTraceUtilities |
( |
| ) |
|
◆ ~CPixieTraceUtilities()
| CPixieTraceUtilities::~CPixieTraceUtilities |
( |
| ) |
|
◆ GetLastErrorMessage()
| const char * CPixieTraceUtilities::GetLastErrorMessage |
( |
| ) |
|
|
inline |
Get the reason text from the most recent failed operation.
- Returns
- Pointer to the stored message; empty string if none.
◆ GetTraceData()
| unsigned short * CPixieTraceUtilities::GetTraceData |
( |
| ) |
|
|
inline |
Return the trace data.
- Returns
- Pointer to the underlying trace storage.
◆ GetTraceLength()
| int CPixieTraceUtilities::GetTraceLength |
( |
int |
module, |
|
|
int |
channel |
|
) |
| |
Get the trace length for a given module/channel.
- Parameters
-
| module | Module number. |
| channel | Channel number. |
- Returns
- Trace length in samples.
- Return values
-
| < | 0 XIA error code, could not read trace length. |
Boundary translation only. Get the trace length and return it as an integer. The caller assumes responsibility for making sure the module number is valid.
◆ ReadFastTrace()
| int CPixieTraceUtilities::ReadFastTrace |
( |
int |
module, |
|
|
int |
channel |
|
) |
| |
Read an unvalidated ADC trace from single channel.
- Parameters
-
| module | Module number. |
| channel | Channel number on module for trace read. |
- Returns
- int
- Return values
-
| 0 | Success. |
| < | 0 XIA API error code. |
| CPIXIEERROR_TRACE_ACQUIRE | Other acquisition errors (trace empty, offline generator failures). |
Read an ADC trace without signal validation.
◆ ReadTrace()
| int CPixieTraceUtilities::ReadTrace |
( |
int |
module, |
|
|
int |
channel |
|
) |
| |
Read a validated ADC trace from single channel.
- Parameters
-
| module | Module number. |
| channel | Channel number on module for trace read. |
- Returns
- int
- Return values
-
| 0 | Success. |
| < | 0 XIA API error code. |
| CPIXIEERROR_TRACE_ACQUIRE | Other acquisition errors (trace empty, offline generator failures). |
Traces are "validated" (not triggered!) if:
- The max/min value exceeds the median value +/- 10*SD where SD is the standard deviation estimated from the median absolute deviation.
- The max/min value differs from the median value by at least m_validAmplitude ADC units.
- Todo:
- (ASC 6/14/24): Improved baseline estimation for validation.
◆ SetLastErrorMessage()
| void CPixieTraceUtilities::SetLastErrorMessage |
( |
const char * |
msg | ) |
|
|
inline |
Set the last error message. Used by the extern "C" shims when their catch-all fires.
- Parameters
-
◆ SetUseGenerator()
| void CPixieTraceUtilities::SetUseGenerator |
( |
bool |
mode | ) |
|
|
inline |
Set the flag for offline mode using the data generator.
- Parameters
-
| mode | The generator flag is set to this input value. |
The documentation for this class was generated from the following files: