G4BlockingList Class Reference

#include <G4BlockingList.hh>


Public Member Functions

 G4BlockingList (G4int maxDefault=kBlockingListMaxDefault, G4int stride=kBlockingListStride)
 ~G4BlockingList ()
void Reset ()
void FullyReset ()
void Enlarge (const G4int nv)
G4int Length () const
void BlockVolume (const G4int v)
G4bool IsBlocked (const G4int v) const


Detailed Description

Definition at line 58 of file G4BlockingList.hh.


Constructor & Destructor Documentation

G4BlockingList::G4BlockingList ( G4int  maxDefault = kBlockingListMaxDefault,
G4int  stride = kBlockingListStride 
)

Definition at line 36 of file G4BlockingList.cc.

00037   : fBlockTagNo(1), fStride(stride), fBlockingList(maxDefault,0)
00038 {
00039 }

G4BlockingList::~G4BlockingList (  ) 

Definition at line 43 of file G4BlockingList.cc.

00044 {
00045 }


Member Function Documentation

void G4BlockingList::BlockVolume ( const G4int  v  )  [inline]

Definition at line 39 of file G4BlockingList.icc.

Referenced by G4VoxelNavigation::ComputeStep(), G4ParameterisedNavigation::ComputeStep(), and G4VoxelSafety::SafetyForVoxelNode().

00040 {
00041   fBlockingList[vol] = fBlockTagNo;
00042 }

void G4BlockingList::Enlarge ( const G4int  nv  )  [inline]

Definition at line 61 of file G4BlockingList.icc.

Referenced by G4VoxelSafety::ComputeSafety(), G4VoxelNavigation::ComputeStep(), and G4ParameterisedNavigation::ComputeStep().

00062 {
00063   G4int len=fBlockingList.size();
00064   if ( len<nv )
00065   {
00066     G4int newlen = (nv/fStride+1)*fStride;
00067     fBlockingList.resize(newlen);
00068     for (G4int i=len; i<newlen; i++)
00069     {
00070       fBlockingList[i] = 0;
00071     }
00072   }
00073 }

void G4BlockingList::FullyReset (  ) 

Definition at line 49 of file G4BlockingList.cc.

Referenced by Reset().

00050 {
00051   fBlockTagNo = 1;
00052   for ( G4int i=fBlockingList.size()-1; i>=0; i-- )
00053   {
00054     fBlockingList[i] = 0;
00055   }  
00056 }

G4bool G4BlockingList::IsBlocked ( const G4int  v  )  const [inline]

Definition at line 44 of file G4BlockingList.icc.

Referenced by G4VoxelNavigation::ComputeStep(), G4ParameterisedNavigation::ComputeStep(), and G4VoxelSafety::SafetyForVoxelNode().

00045 {
00046   return ( fBlockingList[vol]==fBlockTagNo ) ? true : false;
00047 }

G4int G4BlockingList::Length (  )  const [inline]

Definition at line 34 of file G4BlockingList.icc.

00035 {
00036   return fBlockingList.size();
00037 }

void G4BlockingList::Reset (  )  [inline]

Definition at line 49 of file G4BlockingList.icc.

References FullyReset(), and kBlockTagNoMax.

Referenced by G4VoxelSafety::ComputeSafety(), G4VoxelNavigation::ComputeStep(), and G4ParameterisedNavigation::ComputeStep().

00050 {
00051   if ( fBlockTagNo!=kBlockTagNoMax )
00052   {
00053     fBlockTagNo += 1;
00054   }
00055   else
00056   {
00057     FullyReset();
00058   }    
00059 }


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