Uh oh!
There was an error while loading. Please reload this page.
Make GeneratorHybrid a singleton - #14737
Conversation
REQUEST FOR PRODUCTION RELEASES: This will add The following labels are available |
alibuild
commented
Oct 17, 2025
Error while checking build/O2/fullCI_slc9 for 4e4c801 at 2025-10-17 07:18: Full log here. |
sawenzel
left a comment
There was a problem hiding this comment.
This effectively makes the HybridGenerator a singleton since you can't have multiple instances in isolation (the generator members are global). I think it would then be better to just explicitly make the class a singleton to avoid static function annotations (or a mix between static and non-static).
Is there a concrete motivation behind this dev?
jackal1-66
commented
Oct 20, 2025
The idea is to make the generators declared in the hybrid configuration "environment"-aware. I thought of making it similar to the embedding mechanism we have right now (this would be the start of the development). An example of usage is shown in this external generator AliceO2Group/O2DPG#2159 which is the motivation behind this development. |
Would this work? I tried to keep it as simple as possible. I ran some tests with o2-sim standalone, o2-sim-dpl-eventgen and with a full O2DPG workflow and didn't encounter any issue. |
Uh oh!
There was an error while loading. Please reload this page.
* Make Generators list static * Made GeneratorHybrid a singleton
By making the generators list static we can provide info to the other generators in cocktails.
Currently each generator runs without knowing the information from the others in the hybrid configuration, but this will allow them to "communicate".
I tested it using an external generator which uses the GetParticles().size() as a baseline to change the number of generated particles (boxgen). It's only the first piece of the puzzle and more work is required to take care of different scenarios (like parallel simulations).