Import Geant4 11.0.0.beta source tree
This commit is contained in:
@@ -23,54 +23,46 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// G4MultiRunAction
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
// G4MultiRunAction.hh
|
||||
//
|
||||
// Created on: Jan 17, 2016
|
||||
// Author: adotti
|
||||
//
|
||||
//
|
||||
// class description:
|
||||
// This class extends G4UserRunAction and allows multiple
|
||||
// user-defined tracking actions to be used in the same job.
|
||||
// The class is a vector of user-defined tracking actions.
|
||||
// This class owns and manages the dependent user-actions.
|
||||
// Usage:
|
||||
// There is no need to explicitly use this class as long as the
|
||||
// user actions are set via G4UserActionInitialization::SetUserAction
|
||||
// that can be called several times. Explicitly this is what is happening:
|
||||
// In user-defined action initialization:
|
||||
// G4MultiRunAction* action = new G4MultiRunAction;
|
||||
// action->push_back( G4UserRunActionUPtr( new MyUserRunAction );
|
||||
// [... add as many as needed ...]
|
||||
// SetUserAction( action );
|
||||
// ---------------------------------------------------------------
|
||||
//
|
||||
// This class extends G4UserRunAction and allows multiple user-defined
|
||||
// tracking actions to be used in the same job.
|
||||
// The class is a vector of user-defined tracking actions.
|
||||
// This class owns and manages the dependent user-actions.
|
||||
// There is no need to explicitly use this class as long as the user-actions
|
||||
// are set via G4UserActionInitialization::SetUserAction() that can be called
|
||||
// several times. In particular, this is what is happening in a user-defined
|
||||
// action initialization:
|
||||
// G4MultiRunAction* action = new G4MultiRunAction;
|
||||
// action->push_back( G4UserRunActionUPtr( new MyUserRunAction );
|
||||
// [... add as many as needed ...]
|
||||
// SetUserAction( action );
|
||||
|
||||
#ifndef G4MULTIRUNACTION_HH_
|
||||
#define G4MULTIRUNACTION_HH_
|
||||
// Author: A.Dotti, 17 January 2016
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4MultiRunAction_hh
|
||||
#define G4MultiRunAction_hh 1
|
||||
|
||||
#include "G4UserRunAction.hh"
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "G4UserRunAction.hh"
|
||||
|
||||
using G4UserRunActionUPtr = std::unique_ptr<G4UserRunAction>;
|
||||
using G4UserRunActionVector = std::vector<G4UserRunActionUPtr>;
|
||||
|
||||
class G4MultiRunAction
|
||||
: public G4UserRunAction
|
||||
, public G4UserRunActionVector
|
||||
class G4MultiRunAction : public G4UserRunAction, public G4UserRunActionVector
|
||||
{
|
||||
public:
|
||||
G4MultiRunAction() = default;
|
||||
virtual ~G4MultiRunAction() = default;
|
||||
virtual G4Run* GenerateRun() override;
|
||||
virtual void BeginOfRunAction(const G4Run* aRun) override;
|
||||
virtual void EndOfRunAction(const G4Run* aRun) override;
|
||||
virtual void SetMaster(G4bool val = true) override;
|
||||
public:
|
||||
|
||||
G4MultiRunAction() = default;
|
||||
virtual ~G4MultiRunAction() = default;
|
||||
virtual G4Run* GenerateRun() override;
|
||||
virtual void BeginOfRunAction(const G4Run* aRun) override;
|
||||
virtual void EndOfRunAction(const G4Run* aRun) override;
|
||||
virtual void SetMaster(G4bool val = true) override;
|
||||
};
|
||||
|
||||
#endif /* SOURCE_RUN_INCLUDE_G4MULTIRUNACTION_HH_ */
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user