Commit 424bf261 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Introduce new StatusCodes

parent 1c58ee7b
......@@ -101,6 +101,20 @@ There are htree different kind of modules which can be defined:
The type of module determines the constructor used, the internal unique name and the supported configuration parameters.
For more details about the instantiation logic for the different types of modules, see Section~\ref{sec:module_instantiation}.
\subsection{Module Status Codes}
The \command{run()} function of each module returns a status code to the module manager, indicating the status of the module.
These codes can be used to e.g. request an end of the current run, or to signal problems in data processing.
The following status codes are currently supported:
\item{\command{Success}}: Indicates that the module successfully finished processing all data. The framework continues with the next module.
\item{\command{NoData}}: Indicates that the respective module did not find any data to process. The framework continues with the next module.
\item{\command{DeadTime}}: Indicates that the detector handled by the respective module currently is in data acquisition dead time. The framework skips all remaining modules for this event and continues with the subsequent event. By this, measurements such as efficiency are not affected by known inefficiencies during detector dead times.
\item{\command{EndRun}}: Allows the module to request a premature end of the run. This can e.g.\ be used by alignment modules to stop the run after they have accumulated enough tracks for the alignment procedure. The framework executes all modules for the current event and then enters the finalization stage.
\item{\command{Failure}}: Indicates that there was a severe problem when processing data in the respective module. The framework skips all remaining modules for this event end enters the finalization stage.
\subsection{Files of a Module}
Every module directory should at minimum contain the following documents (with \texttt{ModuleName} replaced by the name of the module):
......@@ -22,18 +22,14 @@ namespace corryvreckan {
* @brief Flags to signal the status of a module processing a given event
* These flags are to be used as return values for the Module::run() function to signal the framework the outcome of the
* event processing. Here, three different states are supported:
* - Success: the event processing finished successfully and the framework should continue processing this event with the
* next module.
* - NoData: there was no data found to process by this module. The framework should skip all following modules and
* proceed with the next event.
* - Failure: the module failed to process the event correctly or requests an end of the event processing for other
* reasons. The framework should stop processing events and call Module::finalise for all modules.
enum StatusCode {
* event processing.
enum class StatusCode {
Success, // < Module finished processing data successfully
NoData, // < Module did not receive any data to process
DeadTime, // < Module indicated that the respective detector is in deadtime
EndRun, // < Module requested pemature end of the run
Failure, // < Processing of data failed
/** Base class for all modules
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment