#include <G4Event.hh>
Definition at line 51 of file G4Event.hh.
G4Event::G4Event | ( | ) |
Definition at line 42 of file G4Event.cc.
00043 :eventID(0), 00044 thePrimaryVertex(0),numberOfPrimaryVertex(0), 00045 HC(0),DC(0),trajectoryContainer(0),eventAborted(false),userInfo(0), 00046 randomNumberStatus(0),validRandomNumberStatus(false), 00047 randomNumberStatusForProcessing(0),validRandomNumberStatusForProcessing(false), 00048 keepTheEvent(false) 00049 {;}
G4Event::G4Event | ( | G4int | evID | ) |
Definition at line 51 of file G4Event.cc.
00052 :eventID(evID), 00053 thePrimaryVertex(0),numberOfPrimaryVertex(0), 00054 HC(0),DC(0),trajectoryContainer(0),eventAborted(false),userInfo(0), 00055 randomNumberStatus(0),validRandomNumberStatus(false), 00056 randomNumberStatusForProcessing(0),validRandomNumberStatusForProcessing(false), 00057 keepTheEvent(false) 00058 {;}
G4Event::~G4Event | ( | ) |
Definition at line 60 of file G4Event.cc.
References G4TrajectoryContainer::clearAndDestroy().
00061 { 00062 if(thePrimaryVertex) delete thePrimaryVertex; 00063 if(HC) delete HC; 00064 if(DC) delete DC; 00065 if(trajectoryContainer) 00066 { 00067 trajectoryContainer->clearAndDestroy(); 00068 delete trajectoryContainer; 00069 } 00070 if(userInfo) delete userInfo; 00071 if(validRandomNumberStatus) delete randomNumberStatus; 00072 if(validRandomNumberStatusForProcessing) delete randomNumberStatusForProcessing; 00073 }
void G4Event::AddPrimaryVertex | ( | G4PrimaryVertex * | aPrimaryVertex | ) | [inline] |
Definition at line 142 of file G4Event.hh.
References G4PrimaryVertex::SetNext().
Referenced by G4AdjointPrimaryGeneratorAction::GeneratePrimaries(), G4SingleParticleSource::GeneratePrimaryVertex(), G4ParticleGun::GeneratePrimaryVertex(), G4HEPEvtInterface::GeneratePrimaryVertex(), and G4RayShooter::Shoot().
00143 { 00144 if( thePrimaryVertex == 0 ) 00145 { thePrimaryVertex = aPrimaryVertex; } 00146 else 00147 { thePrimaryVertex->SetNext( aPrimaryVertex ); } 00148 numberOfPrimaryVertex++; 00149 }
void G4Event::Draw | ( | ) | const |
Definition at line 90 of file G4Event.cc.
References G4VDigiCollection::DrawAllDigi(), G4VHitsCollection::DrawAllHits(), G4TrajectoryContainer::entries(), G4DCofThisEvent::GetCapacity(), G4HCofThisEvent::GetCapacity(), G4VVisManager::GetConcreteInstance(), G4DCofThisEvent::GetDC(), and G4HCofThisEvent::GetHC().
00091 { 00092 G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance(); 00093 if(!pVVisManager) return; 00094 00095 if(trajectoryContainer) 00096 { 00097 G4int n_traj = trajectoryContainer->entries(); 00098 for(G4int i=0;i<n_traj;i++) 00099 { (*trajectoryContainer)[i]->DrawTrajectory(); } 00100 } 00101 00102 if(HC) 00103 { 00104 G4int n_HC = HC->GetCapacity(); 00105 for(G4int j=0;j<n_HC;j++) 00106 { 00107 G4VHitsCollection * VHC = HC->GetHC(j); 00108 if(VHC) VHC->DrawAllHits(); 00109 } 00110 } 00111 00112 if(DC) 00113 { 00114 G4int n_DC = DC->GetCapacity(); 00115 for(G4int j=0;j<n_DC;j++) 00116 { 00117 G4VDigiCollection * VDC = DC->GetDC(j); 00118 if(VDC) VDC->DrawAllDigi(); 00119 } 00120 } 00121 }
G4DCofThisEvent* G4Event::GetDCofThisEvent | ( | ) | const [inline] |
Definition at line 175 of file G4Event.hh.
Referenced by G4DigiManager::GetDigiCollection(), G4DigiManager::SetDigiCollection(), and G4PersistencyManager::Store().
G4int G4Event::GetEventID | ( | ) | const [inline] |
Definition at line 139 of file G4Event.hh.
Referenced by G4TrajectoriesModel::DescribeYourselfTo(), G4Pevent::G4Pevent(), G4PersistencyManager::Retrieve(), G4RunManager::rndmSaveThisEvent(), and G4PersistencyManager::Store().
G4HCofThisEvent* G4Event::GetHCofThisEvent | ( | ) | const [inline] |
Definition at line 173 of file G4Event.hh.
Referenced by G4DigiManager::GetHitsCollection(), G4PersistencyManager::Store(), and G4RunManager::UpdateScoring().
G4int G4Event::GetNumberOfPrimaryVertex | ( | ) | const [inline] |
G4PrimaryVertex* G4Event::GetPrimaryVertex | ( | G4int | i = 0 |
) | const [inline] |
Definition at line 155 of file G4Event.hh.
References G4PrimaryVertex::GetNext().
Referenced by G4AdjointPrimaryGeneratorAction::GeneratePrimaries(), and G4PrimaryTransformer::GimmePrimaries().
00156 { 00157 if( i == 0 ) 00158 { return thePrimaryVertex; } 00159 else if( i > 0 && i < numberOfPrimaryVertex ) 00160 { 00161 G4PrimaryVertex* primaryVertex = thePrimaryVertex; 00162 for( G4int j=0; j<i; j++ ) 00163 { 00164 if( primaryVertex == 0 ) return 0; 00165 primaryVertex = primaryVertex->GetNext(); 00166 } 00167 return primaryVertex; 00168 } 00169 else 00170 { return 0; } 00171 }
const G4String& G4Event::GetRandomNumberStatus | ( | ) | const [inline] |
Definition at line 189 of file G4Event.hh.
References G4Exception(), and JustWarning.
00190 { 00191 if(!validRandomNumberStatus) 00192 { G4Exception( 00193 "G4Event::GetRandomNumberStatus","Event0701",JustWarning, 00194 "Random number status is not available for this event."); } 00195 return *randomNumberStatus; 00196 }
const G4String& G4Event::GetRandomNumberStatusForProcessing | ( | ) | const [inline] |
Definition at line 197 of file G4Event.hh.
References G4Exception(), and JustWarning.
00198 { 00199 if(!validRandomNumberStatusForProcessing) 00200 { G4Exception( 00201 "G4Event::GetRandomNumberStatusForProcessing","Event0702", 00202 JustWarning, 00203 "Random number status is not available for this event."); } 00204 return *randomNumberStatusForProcessing; 00205 }
G4TrajectoryContainer* G4Event::GetTrajectoryContainer | ( | ) | const [inline] |
G4VUserEventInformation* G4Event::GetUserInformation | ( | ) | const [inline] |
G4bool G4Event::IsAborted | ( | ) | const [inline] |
void G4Event::KeepTheEvent | ( | G4bool | vl = true |
) | [inline] |
void G4Event::operator delete | ( | void * | anEvent | ) | [inline] |
Definition at line 221 of file G4Event.hh.
References anEventAllocator.
00222 { 00223 anEventAllocator.FreeSingle((G4Event*)anEvent); 00224 }
void * G4Event::operator new | ( | size_t | ) | [inline] |
Definition at line 214 of file G4Event.hh.
References anEventAllocator.
00215 { 00216 void* anEvent; 00217 anEvent = (void*)anEventAllocator.MallocSingle(); 00218 return anEvent; 00219 }
Definition at line 80 of file G4Event.cc.
References eventID.
00081 { 00082 return ( eventID != right.eventID ); 00083 }
Definition at line 75 of file G4Event.cc.
References eventID.
00076 { 00077 return ( eventID == right.eventID ); 00078 }
void G4Event::Print | ( | ) | const |
void G4Event::SetDCofThisEvent | ( | G4DCofThisEvent * | value | ) | [inline] |
void G4Event::SetEventAborted | ( | ) | [inline] |
Definition at line 121 of file G4Event.hh.
Referenced by G4RunManager::AbortEvent(), and G4RunManager::AbortRun().
void G4Event::SetEventID | ( | G4int | i | ) | [inline] |
void G4Event::SetHCofThisEvent | ( | G4HCofThisEvent * | value | ) | [inline] |
void G4Event::SetRandomNumberStatus | ( | G4String & | st | ) | [inline] |
Definition at line 123 of file G4Event.hh.
Referenced by G4RunManager::GenerateEvent(), and G4EventManager::ProcessOneEvent().
00124 { 00125 randomNumberStatus = new G4String(st); 00126 validRandomNumberStatus = true; 00127 }
void G4Event::SetRandomNumberStatusForProcessing | ( | G4String & | st | ) | [inline] |
Definition at line 128 of file G4Event.hh.
00129 { 00130 randomNumberStatusForProcessing = new G4String(st); 00131 validRandomNumberStatusForProcessing = true; 00132 }
void G4Event::SetTrajectoryContainer | ( | G4TrajectoryContainer * | value | ) | [inline] |
void G4Event::SetUserInformation | ( | G4VUserEventInformation * | anInfo | ) | [inline] |
G4bool G4Event::ToBeKept | ( | ) | const [inline] |