You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit brings the possibility to run
"o2-sim" as service/daemon, in the sense that its
lifetime extends that of a simple production of events.
This has the advantage that we may initialize the simulator
once for the simulation of many (different) batches of events.
The main benefits are:
a) Reduced initialization overhead for
- transport of multiple timeframes
- transport of multiple signal types
(which can be combined in digitization)
See example /run/SimExamples/SimAsService_basic
b) Enabling efficient biasing with the stop-go mechanism.
Use the service in multiple stages:
- transport part of event
- trigger on output
- continue with rest of triggered events
See example /run/SimExamples/SimAsService_biasing1
The new mechanism is used via:
1. Launch and init o2-sim in service mode:
- `o2-sim --asservice -e TGeant4 ...`
2. A separate client (python) script that talks to
the service (via ZMQ):
- `o2-sim-client.py "-n 20 -g pythia8 -o foo`
Some accompanying changes here are
* restructuring of o2sim json setup
* allowing to define hooks acting on generator trigger decisions
* some restructuring of communication between actors (needs further improvement)
* sim workers now have a notion of their ID
Note that the feature can be used. But further improvements (stability, error handling)
are needed and foreseen.
"generator,g", bpo::value<std::string>()->default_value("boxgen"), "Event generator to be used.")(
28
28
"trigger,t", bpo::value<std::string>()->default_value(""), "Event generator trigger to be used.")(
29
29
"modules,m", bpo::value<std::vector<std::string>>()->multitoken()->default_value(std::vector<std::string>({"all"}), "all modules"), "list of detectors")(
30
-
"skipModules", bpo::value<std::vector<std::string>>()->multitoken()->default_value(std::vector<std::string>({""}), ""), "list of detectors to skip (precendence over -m")("nEvents,n", bpo::value<unsignedint>()->default_value(1), "number of events")(
30
+
"skipModules", bpo::value<std::vector<std::string>>()->multitoken()->default_value(std::vector<std::string>({""}), ""), "list of detectors to skip (precendence over -m")(
31
+
"nEvents,n", bpo::value<unsignedint>()->default_value(1), "number of events")(
31
32
"startEvent", bpo::value<unsignedint>()->default_value(0), "index of first event to be used (when applicable)")(
0 commit comments