Import Geant4 10.3.0.beta source tree
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Event.hh 85265 2014-10-27 09:00:58Z gcosmo $
|
||||
// $Id: G4Event.hh 94950 2016-01-07 11:53:14Z gcosmo $
|
||||
//
|
||||
//
|
||||
// class description:
|
||||
@@ -153,7 +153,7 @@ class G4Event
|
||||
// Returns the event ID
|
||||
inline void AddPrimaryVertex(G4PrimaryVertex* aPrimaryVertex)
|
||||
{
|
||||
if( thePrimaryVertex == 0 )
|
||||
if( thePrimaryVertex == nullptr )
|
||||
{ thePrimaryVertex = aPrimaryVertex; }
|
||||
else
|
||||
{ thePrimaryVertex->SetNext( aPrimaryVertex ); }
|
||||
@@ -173,13 +173,13 @@ class G4Event
|
||||
G4PrimaryVertex* primaryVertex = thePrimaryVertex;
|
||||
for( G4int j=0; j<i; j++ )
|
||||
{
|
||||
if( primaryVertex == 0 ) return 0;
|
||||
if( !primaryVertex ) return nullptr;
|
||||
primaryVertex = primaryVertex->GetNext();
|
||||
}
|
||||
return primaryVertex;
|
||||
}
|
||||
else
|
||||
{ return 0; }
|
||||
{ return nullptr; }
|
||||
}
|
||||
// Returns i-th primary vertex of the event.
|
||||
inline G4HCofThisEvent* GetHCofThisEvent() const
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4EventManager.hh 71031 2013-06-10 09:11:38Z gcosmo $
|
||||
// $Id: G4EventManager.hh 94950 2016-01-07 11:53:14Z gcosmo $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -71,8 +71,8 @@ class G4EventManager
|
||||
~G4EventManager();
|
||||
|
||||
private:
|
||||
G4EventManager(const G4EventManager &right);
|
||||
G4EventManager& operator=(const G4EventManager& right);
|
||||
G4EventManager(const G4EventManager &right) = delete;
|
||||
G4EventManager& operator=(const G4EventManager& right) = delete;
|
||||
|
||||
public: // with description
|
||||
void ProcessOneEvent(G4Event* anEvent);
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4MultiEventAction.hh 90212 2016-01-27 18:33:12Z adotti $
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
// G4MultiEventAction.hh
|
||||
//
|
||||
// Created on: Jan 17, 2016
|
||||
// Author: adotti
|
||||
//
|
||||
//
|
||||
// class description:
|
||||
// This class extends G4UserEventAction 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:
|
||||
// G4MultiEventAction* action = new G4MultiEventAction;
|
||||
// action->push_back( G4UserEventActionUPtr( new MyUserEventAction );
|
||||
// [... add as many as needed ...]
|
||||
// SetUserAction( action );
|
||||
// ---------------------------------------------------------------
|
||||
//
|
||||
|
||||
#ifndef G4MULTIEVENTACTION_HH_
|
||||
#define G4MULTIEVENTACTION_HH_
|
||||
|
||||
#include "G4UserEventAction.hh"
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
using G4UserEventActionUPtr=std::unique_ptr<G4UserEventAction>;
|
||||
using G4UserEventActionVector=std::vector<G4UserEventActionUPtr>;
|
||||
|
||||
class G4MultiEventAction : public G4UserEventAction , public G4UserEventActionVector
|
||||
{
|
||||
public:
|
||||
G4MultiEventAction() = default;
|
||||
virtual ~G4MultiEventAction() override = default;
|
||||
virtual void SetEventManager(G4EventManager* ) override;
|
||||
virtual void BeginOfEventAction(const G4Event* ) override;
|
||||
virtual void EndOfEventAction(const G4Event* ) override;
|
||||
};
|
||||
|
||||
#endif /* SOURCE_EVENT_INCLUDE_G4MULTIEVENTACTION_HH_ */
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleGun.hh 66892 2013-01-17 10:57:59Z gunter $
|
||||
// $Id: G4ParticleGun.hh 94950 2016-01-07 11:53:14Z gcosmo $
|
||||
//
|
||||
|
||||
#ifndef G4ParticleGun_h
|
||||
@@ -74,10 +74,10 @@ class G4ParticleGun:public G4VPrimaryGenerator
|
||||
virtual ~G4ParticleGun();
|
||||
|
||||
private:
|
||||
G4ParticleGun(const G4ParticleGun&);
|
||||
const G4ParticleGun & operator=(const G4ParticleGun&);
|
||||
G4int operator==(const G4ParticleGun&) const;
|
||||
G4int operator!=(const G4ParticleGun&) const;
|
||||
G4ParticleGun(const G4ParticleGun&) = delete;
|
||||
const G4ParticleGun & operator=(const G4ParticleGun&) = delete;
|
||||
G4int operator==(const G4ParticleGun&) const = delete;
|
||||
G4int operator!=(const G4ParticleGun&) const = delete;
|
||||
|
||||
public: // with description
|
||||
virtual void GeneratePrimaryVertex(G4Event* evt);
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UserEventAction.hh 66892 2013-01-17 10:57:59Z gunter $
|
||||
// $Id: G4UserEventAction.hh 95248 2016-02-02 09:37:04Z gcosmo $
|
||||
//
|
||||
//
|
||||
//
|
||||
@@ -53,7 +53,7 @@ class G4UserEventAction
|
||||
public:
|
||||
G4UserEventAction();
|
||||
virtual ~G4UserEventAction();
|
||||
inline void SetEventManager(G4EventManager* value)
|
||||
virtual void SetEventManager(G4EventManager* value)
|
||||
{ fpEventManager = value; }
|
||||
public: // with description
|
||||
virtual void BeginOfEventAction(const G4Event* anEvent);
|
||||
|
||||
Reference in New Issue
Block a user