Geant4-11
Public Member Functions | Protected Attributes
G4MCTGenEvent Class Reference

#include <G4MCTGenEvent.hh>

Public Member Functions

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

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

References 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 eventList.size();
49}

References eventList.

◆ ClearEvent()

void G4MCTGenEvent::ClearEvent ( )

Definition at line 68 of file G4MCTGenEvent.cc.

69{
70 eventList.clear();
71}

References eventList.

Referenced by G4MCTEvent::ClearEvent().

◆ GetGenEvent()

const void * G4MCTGenEvent::GetGenEvent ( G4int  i)

Definition at line 58 of file G4MCTGenEvent.cc.

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

References eventList.

◆ GetNofEvents()

G4int G4MCTGenEvent::GetNofEvents ( ) const

Definition at line 52 of file G4MCTGenEvent.cc.

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

References eventList.

◆ 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}

References eventList.

Field Documentation

◆ eventList

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

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