#ifndef YOURRUNACTION_HH #define YOURRUNACTION_HH #include "G4UserRunAction.hh" class YourDetectorConstruction; class YourPrimaryGeneratorAction; class YourRun; class YourRunAction : public G4UserRunAction { public: YourRunAction(YourDetectorConstruction* det, YourPrimaryGeneratorAction* primegn); virtual ~YourRunAction(); // generate our own `YourRun` objects virtual G4Run* GenerateRun(); // ensure proper position of the gun --> Update... virtual void BeginOfRunAction(const G4Run*); // run summary write data virtual void EndOfRunAction(const G4Run*); private: YourDetectorConstruction* fDetector; YourPrimaryGeneratorAction* fPrimary; // keep ptr to the generated YourRun object YourRun* fRun; }; #endif // YOURRUNACTION_HH