Pixie-16 utilities for QtScope.
More...
|
| template<typename T , typename R , typename Fn > |
| R | shimGuard (T *utils, const char *where, R fallback, Fn fn) |
| | Run fn() inside the boundary net; return fallback on any exception. T must provide SetLastErrorMessage(). More...
|
| |
| template<typename T , typename Fn > |
| void | shimGuardVoid (T *utils, const char *where, Fn fn) |
| | Same net for void shims. More...
|
| |
| template<typename Fn > |
| auto | shimGuardNew (const char *where, Fn fn) -> decltype(fn()) |
| | Net for the constructors: no object exists yet to store a message in, so log and return nullptr (the Python init must check). More...
|
| |
Pixie-16 utilities for QtScope.
This utility library is used by QtScope. It contains a number of classes which call other parts of the DDAS code to boot and manage the modules. This library defines an API by which the pure-Python QtScope code can interact with the C/C++ FRIBDAQ and XIA API code needed to run a system of Pixie modules.
◆ shimGuard()
template<typename T , typename R , typename Fn >
| R shimGuard |
( |
T * |
utils, |
|
|
const char * |
where, |
|
|
R |
fallback, |
|
|
Fn |
fn |
|
) |
| |
Run fn() inside the boundary net; return fallback on any exception. T must provide SetLastErrorMessage().
- Parameters
-
| utils | Pointer to the utility class instance. |
| where | String indicating the location of the error. |
| fallback | Value to return on failure. |
| fn | Function to execute within the guard. |
- Returns
- Result of the function or fallback value.
◆ shimGuardNew()
template<typename Fn >
| auto shimGuardNew |
( |
const char * |
where, |
|
|
Fn |
fn |
|
) |
| -> decltype(fn()) |
Net for the constructors: no object exists yet to store a message in, so log and return nullptr (the Python init must check).
- Parameters
-
| where | String indicating the location of the error. |
| fn | Function to execute within the guard. |
- Returns
- Result of the function or nullptr.
◆ shimGuardVoid()
template<typename T , typename Fn >
| void shimGuardVoid |
( |
T * |
utils, |
|
|
const char * |
where, |
|
|
Fn |
fn |
|
) |
| |
Same net for void shims.
- Parameters
-
| utils | Pointer to the utility class instance. |
| where | String indicating the location of the error. |
| fn | Function to execute within the guard. |
◆ CPIXIEERROR_INVALID_CONFIG
| constexpr int CPIXIEERROR_INVALID_CONFIG = -1000 |
|
constexpr |
Invalid configuration: ConfigurationParser cannot generate valid config.
◆ CPIXIEERROR_INVALID_MODULE
| constexpr int CPIXIEERROR_INVALID_MODULE = -1002 |
|
constexpr |
Invalid module number: Attempted to perform an operation on an invalid module.
◆ CPIXIEERROR_NOT_BOOTED
| constexpr int CPIXIEERROR_NOT_BOOTED = -1001 |
|
constexpr |
System not booted: Attempted to perform an operation that requires the system to be booted.
◆ CPIXIEERROR_TRACE_ACQUIRE
| constexpr int CPIXIEERROR_TRACE_ACQUIRE = -1003 |
|
constexpr |
Error during trace acquisition: trace length cannot be read from module, trace is empty, or generator returns empty trace.
◆ SHIM_UNEXPECTED_ERROR
| constexpr int SHIM_UNEXPECTED_ERROR = -1999 |
|
constexpr |
Sentinel returned by int shims on an unexpected (unhandled) exception.