Created attachment 409 [details] reproducible test case We spent some time to figure out why our custom action was not working. It seems when we declare a custom command in a class extending G4VUserPrimaryGeneratorAction the associate method is not called. The problem can be always reproduced and attached you find a very simple reproducible test case (base on example B5) you can use to figure it out. In our test case we modified the files: B5PrimaryGeneratorAction.hh B5PrimaryGeneratorAction.cc Calling the command: /B5/generator/echo 5 We expect to receive "The command was successfully called with value 5 param !!!" but we get nothing. In other classes, it runs without any problem. Best regards Dan
Hi Dan, I have installed your code and run the echo command, and I do see the correct output: /B5/generator/echo 5 The command was successfully called with value 5 param !!! So, unfortunately I can't reproduce the problem... I am running on my MacOS laptop. What is your platform? Do you call the /B5/generator/echo 5 interactively (from G4 prompt) or you run some .mac file? For me it works OK in both cases, but if you run with a .mac file, please send it, so I can also try. Cheers, Witek
It seems it is a problem of geant4.10.02.p02. With the last beta version (geant4-10.03.b01) the problem is resolved. You can close the bug if you think the fix does not need to be back-ported. Regards