40 G4Run* aRun =
nullptr;
41 for (
auto& ru : *
this) {
42 auto anotherRun = ru->GenerateRun();
43 if (aRun !=
nullptr && anotherRun !=
nullptr) {
45 "More than one registered UserRunAction return an instance"
46 " of G4Run, not allowed.");
49 if (anotherRun !=
nullptr) aRun = anotherRun;
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::unique_ptr< G4UserRunAction > G4UserRunActionUPtr
G4Run * GenerateRun() override
void BeginOfRunAction(const G4Run *aRun) override
void SetMaster(G4bool val=true) override
void EndOfRunAction(const G4Run *aRun) override
virtual void SetMaster(G4bool val=true)