Geant4 9.6.0
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)
 
const G4MCTGenEventoperator= (const G4MCTGenEvent &right)
 
int AddGenEvent (const void *genevent)
 
int GetNofEvents () const
 
const void * GetGenEvent (int i)
 
void ClearEvent ()
 

Protected Attributes

std::vector< void * > eventList
 

Detailed Description

Definition at line 42 of file G4MCTGenEvent.hh.

Constructor & Destructor Documentation

◆ G4MCTGenEvent() [1/2]

G4MCTGenEvent::G4MCTGenEvent ( )

Definition at line 39 of file G4MCTGenEvent.cc.

41{
42}

◆ ~G4MCTGenEvent()

G4MCTGenEvent::~G4MCTGenEvent ( )
virtual

Definition at line 45 of file G4MCTGenEvent.cc.

47{
48 eventList.clear();
49}
std::vector< void * > eventList

◆ G4MCTGenEvent() [2/2]

G4MCTGenEvent::G4MCTGenEvent ( const G4MCTGenEvent right)
inline

Definition at line 66 of file G4MCTGenEvent.hh.

67{
68 *this= right;
69}

Member Function Documentation

◆ AddGenEvent()

int G4MCTGenEvent::AddGenEvent ( const void *  genevent)

Definition at line 52 of file G4MCTGenEvent.cc.

54{
55 eventList.push_back(const_cast<void*>(genevent));
56 return eventList.size();
57}

◆ ClearEvent()

void G4MCTGenEvent::ClearEvent ( )

Definition at line 77 of file G4MCTGenEvent.cc.

79{
80 eventList.clear();
81}

◆ GetGenEvent()

const void * G4MCTGenEvent::GetGenEvent ( int  i)

Definition at line 67 of file G4MCTGenEvent.cc.

69{
70 int size= eventList.size();
71 if(i>=0 && i<size) return eventList[i];
72 else return 0;
73}

◆ GetNofEvents()

int G4MCTGenEvent::GetNofEvents ( ) const

Definition at line 60 of file G4MCTGenEvent.cc.

62{
63 return eventList.size();
64}

◆ operator=()

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

Definition at line 71 of file G4MCTGenEvent.hh.

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

Member Data Documentation

◆ eventList

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

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