eventDispenser
Loading...
Searching...
No Matches
Event Dispenser Example

Minimal end-to-end usage of EventDispenser. More...

Functions

int main (int argc, char *argv[])
 Example entry point.
 

Detailed Description

This example demonstrates the essential steps required to use EventDispenser:

Introduction

EventDispenser distributes a total event count across one or more run numbers. Each run number can represent different conditions (constants, translation tables, etc.). The distribution can be:

Details

This example configures options via eventDispenser::defineOptions() and builds a digitization routine map via gdynamicdigitization::dynamicRoutinesMap(). It then constructs EventDispenser, retrieves the computed run allocation, and processes events.

Note
This example is intentionally minimal. In a full application you would typically:
  • provide real digitization plugins,
  • configure additional options (e.g. variation),
  • and print or validate the run allocation before dispatching events.

Usage

Build this example together with the Event Dispenser module and its dependencies. Run with the module options, for example:

Author

© Maurizio Ungaro
e-mail: ungar.nosp@m.o@jl.nosp@m.ab.or.nosp@m.g

Function Documentation

◆ main()

int main ( int argc,
char * argv[] )

The example performs the following steps:

  1. Parse command-line options using eventDispenser::defineOptions().
  2. Create a digitization routine map (may be empty depending on build/runtime configuration).
  3. Construct EventDispenser and compute the run allocation.
  4. Call processEvents() to execute the per-run workflow.
Parameters
argcStandard command-line argument count.
argvStandard command-line argument vector.
Returns
EXIT_SUCCESS on success.

Definition at line 69 of file event_dispenser_example.cc.