Geant4  10.02.p03
G4PhononTrackMap Class Reference

#include <G4PhononTrackMap.hh>

Collaboration diagram for G4PhononTrackMap:

Public Types

typedef std::map< const G4Track *, G4ThreeVectorTrkIDKmap
 

Public Member Functions

void SetK (const G4Track *track, const G4ThreeVector &K)
 
void SetK (const G4Track &track, const G4ThreeVector &K)
 
const G4ThreeVectorGetK (const G4Track *track) const
 
const G4ThreeVectorGetK (const G4Track &track) const
 
G4bool Find (const G4Track *track) const
 
G4bool Find (const G4Track &track) const
 
void RemoveTrack (const G4Track *track)
 
void Clear ()
 

Static Public Member Functions

static G4PhononTrackMapGetPhononTrackMap ()
 
static G4PhononTrackMapGetInstance ()
 

Static Public Attributes

static G4ThreadLocal G4PhononTrackMaptheTrackMap = 0
 

Private Member Functions

 G4PhononTrackMap ()
 
 ~G4PhononTrackMap ()
 

Private Attributes

TrkIDKmap theMap
 

Detailed Description

Definition at line 41 of file G4PhononTrackMap.hh.

Member Typedef Documentation

◆ TrkIDKmap

typedef std::map<const G4Track*, G4ThreeVector> G4PhononTrackMap::TrkIDKmap

Definition at line 43 of file G4PhononTrackMap.hh.

Constructor & Destructor Documentation

◆ G4PhononTrackMap()

G4PhononTrackMap::G4PhononTrackMap ( )
inlineprivate

Definition at line 71 of file G4PhononTrackMap.hh.

71 { Clear(); } // Ensure map is empty
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~G4PhononTrackMap()

G4PhononTrackMap::~G4PhononTrackMap ( )
inlineprivate

Definition at line 72 of file G4PhononTrackMap.hh.

72 {;}

Member Function Documentation

◆ Clear()

void G4PhononTrackMap::Clear ( )

Definition at line 52 of file G4PhononTrackMap.cc.

52  {
53  theMap.clear(); // Remove all entries from map
54 }
Here is the caller graph for this function:

◆ Find() [1/2]

G4bool G4PhononTrackMap::Find ( const G4Track *  track) const

Definition at line 60 of file G4PhononTrackMap.cc.

60  {
61  return (!track || theMap.find(track) != theMap.end());
62 }
Here is the caller graph for this function:

◆ Find() [2/2]

G4bool G4PhononTrackMap::Find ( const G4Track &  track) const
inline

Definition at line 60 of file G4PhononTrackMap.hh.

60 { return Find(&track); }
G4bool Find(const G4Track *track) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetInstance()

static G4PhononTrackMap* G4PhononTrackMap::GetInstance ( void  )
inlinestatic

Definition at line 48 of file G4PhononTrackMap.hh.

48 { return GetPhononTrackMap(); }
static G4PhononTrackMap * GetPhononTrackMap()
Here is the call graph for this function:

◆ GetK() [1/2]

const G4ThreeVector & G4PhononTrackMap::GetK ( const G4Track *  track) const

Definition at line 82 of file G4PhononTrackMap.cc.

82  {
83  TrkIDKmap::const_iterator entry = theMap.find(track);
84  return (entry != theMap.end()) ? entry->second : nullVec;
85 }
Here is the caller graph for this function:

◆ GetK() [2/2]

const G4ThreeVector& G4PhononTrackMap::GetK ( const G4Track &  track) const
inline

Definition at line 56 of file G4PhononTrackMap.hh.

56 { return GetK(&track); }
const G4ThreeVector & GetK(const G4Track *track) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetPhononTrackMap()

G4PhononTrackMap * G4PhononTrackMap::GetPhononTrackMap ( )
static

Definition at line 47 of file G4PhononTrackMap.cc.

47  {
49  return theTrackMap;
50 }
static G4ThreadLocal G4PhononTrackMap * theTrackMap
Here is the call graph for this function:
Here is the caller graph for this function:

◆ RemoveTrack()

void G4PhononTrackMap::RemoveTrack ( const G4Track *  track)

Definition at line 67 of file G4PhononTrackMap.cc.

67  {
68  TrkIDKmap::iterator entry = theMap.find(track);
69  if (entry != theMap.end()) theMap.erase(entry);
70 }
Here is the caller graph for this function:

◆ SetK() [1/2]

void G4PhononTrackMap::SetK ( const G4Track *  track,
const G4ThreeVector K 
)

Definition at line 75 of file G4PhononTrackMap.cc.

75  {
76  if (track) theMap[track] = K;
77 }
Here is the caller graph for this function:

◆ SetK() [2/2]

void G4PhononTrackMap::SetK ( const G4Track &  track,
const G4ThreeVector K 
)
inline

Definition at line 52 of file G4PhononTrackMap.hh.

52 { SetK(&track, K); }
void SetK(const G4Track *track, const G4ThreeVector &K)
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ theMap

TrkIDKmap G4PhononTrackMap::theMap
private

Definition at line 68 of file G4PhononTrackMap.hh.

◆ theTrackMap

G4ThreadLocal G4PhononTrackMap * G4PhononTrackMap::theTrackMap = 0
static

Definition at line 44 of file G4PhononTrackMap.hh.


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