LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
PyG4ParticleList Class Reference

Public Types

typedef std::vector< G4ParticleDefinition * > ParticleList
 
typedef ParticleList::iterator p_iterator
 

Public Member Functions

p_iterator p_begin ()
 
p_iterator p_end ()
 

Static Public Attributes

static ParticleList particleTableCache
 

Detailed Description

Definition at line 40 of file pyG4ParticleList.cc.

Member Typedef Documentation

typedef std::vector<G4ParticleDefinition*> PyG4ParticleList::ParticleList

Definition at line 42 of file pyG4ParticleList.cc.

Member Function Documentation

p_iterator PyG4ParticleList::p_begin ( )
inline

Definition at line 47 of file pyG4ParticleList.cc.

References util::size(), and value.

Referenced by export_PyG4ParticleList().

47  {
48  G4ParticleTable* particleTable= G4ParticleTable::GetParticleTable();
49  if(particleTableCache.size() != particleTable-> size() ) {
50  particleTableCache.clear();
51  G4ParticleTable::G4PTblDicIterator*
52  theParticleIterator= particleTable-> GetIterator();
53  theParticleIterator-> reset();
54  while( (*theParticleIterator)() ){
55  G4ParticleDefinition* particle= theParticleIterator-> value();
56  particleTableCache.push_back(particle);
57  }
58  }
59  return particleTableCache.begin();
60  }
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:101
static ParticleList particleTableCache
double value
Definition: spectrum.C:18
p_iterator PyG4ParticleList::p_end ( )
inline

Definition at line 62 of file pyG4ParticleList.cc.

References particleTableCache, util::size(), and value.

Referenced by export_PyG4ParticleList().

62  {
63  G4ParticleTable* particleTable= G4ParticleTable::GetParticleTable();
64  if(particleTableCache.size() != particleTable-> size() ) {
65  particleTableCache.clear();
66  G4ParticleTable::G4PTblDicIterator*
67  theParticleIterator= particleTable-> GetIterator();
68  theParticleIterator-> reset();
69  while( (*theParticleIterator)() ){
70  G4ParticleDefinition* particle= theParticleIterator-> value();
71  particleTableCache.push_back(particle);
72  }
73  }
74  return particleTableCache.end();
75  }
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:101
static ParticleList particleTableCache
double value
Definition: spectrum.C:18

Member Data Documentation

PyG4ParticleList::ParticleList PyG4ParticleList::particleTableCache
static

Definition at line 45 of file pyG4ParticleList.cc.

Referenced by p_end().


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