Geant4  10.02.p03
G4MCCIndexConversionTable Class Reference

#include <G4MCCIndexConversionTable.hh>

Collaboration diagram for G4MCCIndexConversionTable:

Public Member Functions

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

Protected Types

typedef std::vector< G4intG4IntVector
 

Protected Attributes

G4IntVector vecNewIndex
 

Detailed Description

Definition at line 54 of file G4MCCIndexConversionTable.hh.

Member Typedef Documentation

◆ G4IntVector

typedef std::vector<G4int> G4MCCIndexConversionTable::G4IntVector
protected

Definition at line 82 of file G4MCCIndexConversionTable.hh.

Constructor & Destructor Documentation

◆ G4MCCIndexConversionTable()

G4MCCIndexConversionTable::G4MCCIndexConversionTable ( )

Definition at line 41 of file G4MCCIndexConversionTable.cc.

42 {
43 
44 }

◆ ~G4MCCIndexConversionTable()

G4MCCIndexConversionTable::~G4MCCIndexConversionTable ( )
virtual

Definition at line 46 of file G4MCCIndexConversionTable.cc.

47 {
48  vecNewIndex.clear();
49 }

Member Function Documentation

◆ GetIndex()

G4int G4MCCIndexConversionTable::GetIndex ( size_t  index) const
inline

Definition at line 106 of file G4MCCIndexConversionTable.hh.

107 {
108  if (index >= vecNewIndex.size()) return -1;
109  // get the index in the current production cut table
110  // for the indicated MCC in the file
111  return (vecNewIndex[index]);
112 }
Int_t index
Here is the caller graph for this function:

◆ IsUsed()

G4bool G4MCCIndexConversionTable::IsUsed ( size_t  index) const
inline

Definition at line 87 of file G4MCCIndexConversionTable.hh.

88 {
89  if (index >= vecNewIndex.size()) return false;
90 
91  // returns 'true' if the indicated MCC in the file
92  // is used in the current production cut table
93  return (vecNewIndex[index] >= 0);
94 }
Int_t index
Here is the caller graph for this function:

◆ Reset()

void G4MCCIndexConversionTable::Reset ( size_t  size)

Definition at line 51 of file G4MCCIndexConversionTable.cc.

52 {
53  // reset conversion table
54  vecNewIndex.clear();
55  vecNewIndex.resize(siz, -1);
56 }
Here is the caller graph for this function:

◆ SetNewIndex()

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

Definition at line 97 of file G4MCCIndexConversionTable.hh.

98 {
99  if (index >= vecNewIndex.size()) return;
100  // set the index in the current production cut table
101  // for the indicated MCC in the file
102  vecNewIndex[index]=new_value;
103 }
Int_t index
Here is the caller graph for this function:

◆ size()

size_t G4MCCIndexConversionTable::size ( ) const
inline

Definition at line 115 of file G4MCCIndexConversionTable.hh.

116 {
117  return vecNewIndex.size();
118 }
Here is the caller graph for this function:

Member Data Documentation

◆ vecNewIndex

G4IntVector G4MCCIndexConversionTable::vecNewIndex
protected

Definition at line 83 of file G4MCCIndexConversionTable.hh.


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