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

#include <G4MCCIndexConversionTable.hh>

Public Member Functions

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

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}

References vecNewIndex.

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}

References vecNewIndex.

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}

References vecNewIndex.

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}

References vecNewIndex.

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] = new_value;
96}

References vecNewIndex.

Referenced by G4ProductionCutsTable::CheckMaterialCutsCoupleInfo().

◆ size()

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

Definition at line 107 of file G4MCCIndexConversionTable.hh.

108{
109 return vecNewIndex.size();
110}

References vecNewIndex.

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

Field Documentation

◆ vecNewIndex

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

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