G4Event Class Reference

#include <G4Event.hh>


Public Member Functions

 G4Event ()
 G4Event (G4int evID)
 ~G4Event ()
void * operator new (size_t)
void operator delete (void *anEvent)
G4int operator== (const G4Event &right) const
G4int operator!= (const G4Event &right) const
void Print () const
void Draw () const
void SetEventID (G4int i)
void SetHCofThisEvent (G4HCofThisEvent *value)
void SetDCofThisEvent (G4DCofThisEvent *value)
void SetTrajectoryContainer (G4TrajectoryContainer *value)
void SetEventAborted ()
void SetRandomNumberStatus (G4String &st)
void SetRandomNumberStatusForProcessing (G4String &st)
void KeepTheEvent (G4bool vl=true)
G4bool ToBeKept () const
G4int GetEventID () const
void AddPrimaryVertex (G4PrimaryVertex *aPrimaryVertex)
G4int GetNumberOfPrimaryVertex () const
G4PrimaryVertexGetPrimaryVertex (G4int i=0) const
G4HCofThisEventGetHCofThisEvent () const
G4DCofThisEventGetDCofThisEvent () const
G4TrajectoryContainerGetTrajectoryContainer () const
G4bool IsAborted () const
void SetUserInformation (G4VUserEventInformation *anInfo)
G4VUserEventInformationGetUserInformation () const
const G4StringGetRandomNumberStatus () const
const G4StringGetRandomNumberStatusForProcessing () const


Detailed Description

Definition at line 51 of file G4Event.hh.


Constructor & Destructor Documentation

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 }


Member Function Documentation

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().

00176       { return DC; }

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().

00140       { return eventID; }

G4HCofThisEvent* G4Event::GetHCofThisEvent (  )  const [inline]

Definition at line 173 of file G4Event.hh.

Referenced by G4DigiManager::GetHitsCollection(), G4PersistencyManager::Store(), and G4RunManager::UpdateScoring().

00174       { return HC; }

G4int G4Event::GetNumberOfPrimaryVertex (  )  const [inline]

Definition at line 152 of file G4Event.hh.

00153       { return numberOfPrimaryVertex; }

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]

Definition at line 177 of file G4Event.hh.

Referenced by G4TheRayTracer::GenerateColour().

00178       { return trajectoryContainer; }

G4VUserEventInformation* G4Event::GetUserInformation (  )  const [inline]

Definition at line 187 of file G4Event.hh.

00187 { return userInfo; }

G4bool G4Event::IsAborted (  )  const [inline]

Definition at line 183 of file G4Event.hh.

00183 { return eventAborted; }

void G4Event::KeepTheEvent ( G4bool  vl = true  )  [inline]

Definition at line 133 of file G4Event.hh.

00134       { keepTheEvent = vl; }

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 }

G4int G4Event::operator!= ( const G4Event right  )  const

Definition at line 80 of file G4Event.cc.

References eventID.

00081 {
00082   return ( eventID != right.eventID );
00083 }

G4int G4Event::operator== ( const G4Event right  )  const

Definition at line 75 of file G4Event.cc.

References eventID.

00076 {
00077   return ( eventID == right.eventID );
00078 }

void G4Event::Print (  )  const

Definition at line 85 of file G4Event.cc.

References G4cout, and G4endl.

00086 {
00087   G4cout << "G4Event " << eventID << G4endl;
00088 }

void G4Event::SetDCofThisEvent ( G4DCofThisEvent value  )  [inline]

Definition at line 117 of file G4Event.hh.

Referenced by G4DigiManager::SetDigiCollection().

00118       { DC = value; }

void G4Event::SetEventAborted (  )  [inline]

Definition at line 121 of file G4Event.hh.

Referenced by G4RunManager::AbortEvent(), and G4RunManager::AbortRun().

00122       { eventAborted = true; }

void G4Event::SetEventID ( G4int  i  )  [inline]

Definition at line 113 of file G4Event.hh.

00114       { eventID =  i; }

void G4Event::SetHCofThisEvent ( G4HCofThisEvent value  )  [inline]

Definition at line 115 of file G4Event.hh.

00116       { HC = value; }

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]

Definition at line 119 of file G4Event.hh.

00120       { trajectoryContainer = value; }

void G4Event::SetUserInformation ( G4VUserEventInformation anInfo  )  [inline]

Definition at line 186 of file G4Event.hh.

00186 { userInfo = anInfo; }

G4bool G4Event::ToBeKept (  )  const [inline]

Definition at line 135 of file G4Event.hh.

Referenced by G4RunManager::StackPreviousEvent().

00136       { return keepTheEvent; }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:51:56 2013 for Geant4 by  doxygen 1.4.7