44 G4Run* aRun =
nullptr;
45 for (
auto& ru : *
this ) {
46 auto anotherRun = ru->GenerateRun();
47 if ( aRun !=
nullptr && anotherRun !=
nullptr ) {
49 "More than one registered UserRunAction return an instance"\
50 " of G4Run, not allowed.");
59 std::for_each( begin() , end() ,
65 std::for_each( begin() , end() ,
72 std::for_each( begin() , end() ,
virtual void EndOfRunAction(const G4Run *aRun) override
std::unique_ptr< G4UserRunAction > G4UserRunActionUPtr
virtual void SetMaster(G4bool val=true)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
virtual G4Run * GenerateRun() override
virtual void SetMaster(G4bool val=true) override
virtual void BeginOfRunAction(const G4Run *aRun) override