Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4MCCIndexConversionTable Class Reference

#include <G4MCCIndexConversionTable.hh>

Public Member Functions

 G4MCCIndexConversionTable ()
 
virtual ~G4MCCIndexConversionTable ()
 
void Reset (std::size_t size)
 
G4bool IsUsed (std::size_t index) const
 
void SetNewIndex (std::size_t index, std::size_t new_value)
 
G4int GetIndex (std::size_t index) const
 
std::size_t size () const
 

Protected Attributes

std::vector< G4intvecNewIndex
 

Detailed Description

Definition at line 45 of file G4MCCIndexConversionTable.hh.

Constructor & Destructor Documentation

◆ G4MCCIndexConversionTable()

G4MCCIndexConversionTable::G4MCCIndexConversionTable ( )

Definition at line 34 of file G4MCCIndexConversionTable.cc.

35{
36}

◆ ~G4MCCIndexConversionTable()

G4MCCIndexConversionTable::~G4MCCIndexConversionTable ( )
virtual

Definition at line 39 of file G4MCCIndexConversionTable.cc.

40{
41 vecNewIndex.clear();
42}

Member Function Documentation

◆ GetIndex()

G4int G4MCCIndexConversionTable::GetIndex ( std::size_t index) const
inline

Definition at line 99 of file G4MCCIndexConversionTable.hh.

100{
101 // get the index in the current production cut table
102 // for the indicated MCC in the file
103 return (index < vecNewIndex.size()) ? vecNewIndex[index] : -1;
104}

Referenced by G4ProductionCutsTable::RetrieveCutsInfo(), and G4PhysicsTableHelper::RetrievePhysicsTable().

◆ IsUsed()

G4bool G4MCCIndexConversionTable::IsUsed ( std::size_t index) const
inline

Definition at line 82 of file G4MCCIndexConversionTable.hh.

83{
84 // returns 'true' if the indicated MCC in the file
85 // is used in the current production cut table
86 return ((index < vecNewIndex.size()) && (vecNewIndex[index] >= 0));
87}

Referenced by G4ProductionCutsTable::RetrieveCutsInfo(), and G4PhysicsTableHelper::RetrievePhysicsTable().

◆ Reset()

void G4MCCIndexConversionTable::Reset ( std::size_t size)

Definition at line 45 of file G4MCCIndexConversionTable.cc.

46{
47 // reset conversion table
48 vecNewIndex.clear();
49 vecNewIndex.resize(siz, -1);
50}

Referenced by G4ProductionCutsTable::CheckMaterialCutsCoupleInfo().

◆ SetNewIndex()

void G4MCCIndexConversionTable::SetNewIndex ( std::size_t index,
std::size_t new_value )
inline

Definition at line 90 of file G4MCCIndexConversionTable.hh.

92{
93 // set the index in the current production cut table
94 // for the indicated MCC in the file
95 if (index < vecNewIndex.size()) vecNewIndex[index] = (G4int)new_value;
96}
int G4int
Definition G4Types.hh:85

Referenced by G4ProductionCutsTable::CheckMaterialCutsCoupleInfo().

◆ size()

std::size_t G4MCCIndexConversionTable::size ( ) const
inline

Member Data Documentation

◆ vecNewIndex

std::vector<G4int> G4MCCIndexConversionTable::vecNewIndex
protected

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