Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4MCTGenEvent Class Reference

#include <G4MCTGenEvent.hh>

Public Member Functions

 G4MCTGenEvent ()
 
virtual ~G4MCTGenEvent ()
 
 G4MCTGenEvent (const G4MCTGenEvent &right)
 
G4MCTGenEventoperator= (const G4MCTGenEvent &right)
 
G4int AddGenEvent (const void *genevent)
 
G4int GetNofEvents () const
 
const void * GetGenEvent (G4int i)
 
void ClearEvent ()
 

Protected Attributes

std::vector< void * > eventList
 

Detailed Description

Definition at line 38 of file G4MCTGenEvent.hh.

Constructor & Destructor Documentation

◆ G4MCTGenEvent() [1/2]

G4MCTGenEvent::G4MCTGenEvent ( )

Definition at line 34 of file G4MCTGenEvent.cc.

35{
36}

◆ ~G4MCTGenEvent()

G4MCTGenEvent::~G4MCTGenEvent ( )
virtual

Definition at line 39 of file G4MCTGenEvent.cc.

40{
41 eventList.clear();
42}
std::vector< void * > eventList

◆ G4MCTGenEvent() [2/2]

G4MCTGenEvent::G4MCTGenEvent ( const G4MCTGenEvent right)
inline

Definition at line 64 of file G4MCTGenEvent.hh.

65{
66 *this = right;
67}

Member Function Documentation

◆ AddGenEvent()

G4int G4MCTGenEvent::AddGenEvent ( const void *  genevent)

Definition at line 45 of file G4MCTGenEvent.cc.

46{
47 eventList.push_back(const_cast<void*>(genevent));
48 return (G4int)eventList.size();
49}
int G4int
Definition: G4Types.hh:85

◆ ClearEvent()

void G4MCTGenEvent::ClearEvent ( )

Definition at line 68 of file G4MCTGenEvent.cc.

69{
70 eventList.clear();
71}

Referenced by G4MCTEvent::ClearEvent().

◆ GetGenEvent()

const void * G4MCTGenEvent::GetGenEvent ( G4int  i)

Definition at line 58 of file G4MCTGenEvent.cc.

59{
60 G4int size = (G4int)eventList.size();
61 if(i >= 0 && i < size)
62 return eventList[i];
63 else
64 return nullptr;
65}

◆ GetNofEvents()

G4int G4MCTGenEvent::GetNofEvents ( ) const

Definition at line 52 of file G4MCTGenEvent.cc.

53{
54 return (G4int)eventList.size();
55}

◆ operator=()

G4MCTGenEvent & G4MCTGenEvent::operator= ( const G4MCTGenEvent right)
inline

Definition at line 69 of file G4MCTGenEvent.hh.

70{
71 eventList = right.eventList; // shallow copy
72
73 return *this;
74}

Member Data Documentation

◆ eventList

std::vector<void*> G4MCTGenEvent::eventList
protected

The documentation for this class was generated from the following files: