Geant4  10.02
G4MPIscorerMerger Class Reference

#include <G4MPIscorerMerger.hh>

+ Collaboration diagram for G4MPIscorerMerger:

Public Member Functions

 G4MPIscorerMerger ()
 
 G4MPIscorerMerger (G4ScoringManager *mgr, G4int destination=G4MPImanager::kRANK_MASTER, G4int verbosity=0)
 
virtual ~G4MPIscorerMerger ()
 
void SetDestinationRank (G4int i)
 
void SetScoringManager (G4ScoringManager *mgr)
 
void SetVerbosity (G4int ver)
 
void Merge ()
 

Protected Member Functions

void SetupOutputBuffer (char *buff, G4int size, G4int position)
 
void DestroyBuffer ()
 
void Pack (const G4ScoringManager *)
 Pack all meshes into buffer. More...
 
void UnPackAndMerge (const G4ScoringManager *)
 
void Pack (const G4VScoringMesh *)
 Pack a single mesh. More...
 
void UnPackAndMerge (G4VScoringMesh *)
 
void Pack (const HitMap *)
 Pack a single score map. More...
 
HitMapUnPackHitMap (const G4String &detName, const G4String &colName)
 
G4int CalculatePackSize (const G4ScoringManager *) const
 
G4int CalculatePackSize (const G4VScoringMesh *) const
 
G4int CalculatePackSize (const HitMap *) const
 
void Send (const unsigned int destination)
 
void Receive (const unsigned int source)
 

Private Attributes

char * outputBuffer
 
G4int outputBufferSize
 
G4int outputBufferPosition
 
long bytesSent
 
G4bool ownsBuffer
 
G4ScoringManagerscoringManager
 
unsigned int commSize
 
unsigned int destinationRank
 
MPI::Intracomm comm
 
G4int verbose
 

Detailed Description

Definition at line 37 of file G4MPIscorerMerger.hh.

Constructor & Destructor Documentation

G4MPIscorerMerger::G4MPIscorerMerger ( )

Definition at line 34 of file G4MPIscorerMerger.cc.

G4MPIscorerMerger::G4MPIscorerMerger ( G4ScoringManager mgr,
G4int  destination = G4MPImanager::kRANK_MASTER,
G4int  verbosity = 0 
)

Definition at line 40 of file G4MPIscorerMerger.cc.

G4MPIscorerMerger::~G4MPIscorerMerger ( )
virtual

Definition at line 50 of file G4MPIscorerMerger.cc.

References outputBuffer, and ownsBuffer.

Member Function Documentation

G4int G4MPIscorerMerger::CalculatePackSize ( const G4ScoringManager sm) const
protected

Definition at line 393 of file G4MPIscorerMerger.cc.

References DMSG, G4ScoringManager::GetMesh(), and G4ScoringManager::GetNumberOfMesh().

Referenced by CalculatePackSize(), and Send().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4int G4MPIscorerMerger::CalculatePackSize ( const G4VScoringMesh mesh) const
protected

Definition at line 412 of file G4MPIscorerMerger.cc.

References CalculatePackSize(), DMSG, ele, G4VScoringMesh::GetScoreMap(), and name.

+ Here is the call graph for this function:

G4int G4MPIscorerMerger::CalculatePackSize ( const HitMap map) const
protected

Definition at line 429 of file G4MPIscorerMerger.cc.

References DMSG, and G4THitsMap< T >::GetSize().

+ Here is the call graph for this function:

void G4MPIscorerMerger::DestroyBuffer ( )
inlineprotected

Definition at line 59 of file G4MPIscorerMerger.hh.

References outputBuffer, outputBufferPosition, outputBufferSize, and ownsBuffer.

Referenced by Merge().

+ Here is the caller graph for this function:

void G4MPIscorerMerger::Merge ( )

Definition at line 87 of file G4MPIscorerMerger.cc.

References bytesSent, comm, commSize, destinationRank, DestroyBuffer(), DMSG, G4cout, G4endl, G4mpi::Merge(), Receive(), Send(), G4INCL::CrossSections::total(), and verbose.

Referenced by RunActionMaster::EndOfRunAction().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4MPIscorerMerger::Pack ( const G4ScoringManager sm)
protected

Pack all meshes into buffer.

Definition at line 223 of file G4MPIscorerMerger.cc.

References comm, DMSG, FatalException, G4Exception(), G4ScoringManager::GetMesh(), G4ScoringManager::GetNumberOfMesh(), outputBuffer, outputBufferPosition, and outputBufferSize.

Referenced by Pack(), and Send().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4MPIscorerMerger::Pack ( const G4VScoringMesh mesh)
protected

Pack a single mesh.

Definition at line 284 of file G4MPIscorerMerger.cc.

References comm, DMSG, ele, G4VScoringMesh::GetScoreMap(), name, G4InuclParticleNames::nn, outputBuffer, outputBufferPosition, outputBufferSize, and Pack().

+ Here is the call graph for this function:

void G4MPIscorerMerger::Pack ( const HitMap sm)
protected

Pack a single score map.

Definition at line 347 of file G4MPIscorerMerger.cc.

References comm, DMSG, G4FFGEnumerations::DOUBLE, G4THitsMap< T >::GetMap(), G4THitsMap< T >::GetSize(), G4FFGEnumerations::INT, outputBuffer, outputBufferPosition, and outputBufferSize.

+ Here is the call graph for this function:

void G4MPIscorerMerger::Receive ( const unsigned int  source)
protected

Definition at line 168 of file G4MPIscorerMerger.cc.

References buffer, comm, DMSG, G4MPImanager::kTAG_CMDSCR, outputBuffer, outputBufferSize, ownsBuffer, scoringManager, SetupOutputBuffer(), Status(), and UnPackAndMerge().

Referenced by Merge().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4MPIscorerMerger::Send ( const unsigned int  destination)
protected

Definition at line 196 of file G4MPIscorerMerger.cc.

References buffer, bytesSent, CalculatePackSize(), comm, DMSG, G4MPImanager::kTAG_CMDSCR, outputBuffer, outputBufferPosition, outputBufferSize, ownsBuffer, Pack(), scoringManager, and SetupOutputBuffer().

Referenced by Merge().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4MPIscorerMerger::SetDestinationRank ( G4int  i)
inline

Definition at line 46 of file G4MPIscorerMerger.hh.

References destinationRank.

void G4MPIscorerMerger::SetScoringManager ( G4ScoringManager mgr)
inline

Definition at line 47 of file G4MPIscorerMerger.hh.

References scoringManager.

void G4MPIscorerMerger::SetupOutputBuffer ( char *  buff,
G4int  size,
G4int  position 
)
inlineprotected

Definition at line 54 of file G4MPIscorerMerger.hh.

References outputBuffer, outputBufferPosition, outputBufferSize, and position.

Referenced by Receive(), and Send().

+ Here is the caller graph for this function:

void G4MPIscorerMerger::SetVerbosity ( G4int  ver)
inline

Definition at line 48 of file G4MPIscorerMerger.hh.

References verbose.

Referenced by RunActionMaster::EndOfRunAction().

+ Here is the caller graph for this function:

void G4MPIscorerMerger::UnPackAndMerge ( const G4ScoringManager sm)
protected

Definition at line 246 of file G4MPIscorerMerger.cc.

References comm, FatalException, G4Exception(), G4ScoringManager::GetMesh(), G4ScoringManager::GetNumberOfMesh(), outputBuffer, outputBufferPosition, and outputBufferSize.

Referenced by Receive().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4MPIscorerMerger::UnPackAndMerge ( G4VScoringMesh inmesh)
protected

Definition at line 317 of file G4MPIscorerMerger.cc.

References G4VScoringMesh::Accumulate(), comm, DMSG, G4VScoringMesh::GetWorldName(), name, outputBuffer, outputBufferPosition, outputBufferSize, and UnPackHitMap().

+ Here is the call graph for this function:

HitMap * G4MPIscorerMerger::UnPackHitMap ( const G4String detName,
const G4String colName 
)
protected

Definition at line 372 of file G4MPIscorerMerger.cc.

References comm, DMSG, G4FFGEnumerations::DOUBLE, G4FFGEnumerations::INT, outputBuffer, outputBufferPosition, outputBufferSize, and G4THitsMap< T >::set().

Referenced by UnPackAndMerge().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

long G4MPIscorerMerger::bytesSent
private

Definition at line 92 of file G4MPIscorerMerger.hh.

Referenced by Merge(), and Send().

MPI::Intracomm G4MPIscorerMerger::comm
private

Definition at line 97 of file G4MPIscorerMerger.hh.

Referenced by Merge(), Pack(), Receive(), Send(), UnPackAndMerge(), and UnPackHitMap().

unsigned int G4MPIscorerMerger::commSize
private

Definition at line 95 of file G4MPIscorerMerger.hh.

Referenced by Merge().

unsigned int G4MPIscorerMerger::destinationRank
private

Definition at line 96 of file G4MPIscorerMerger.hh.

Referenced by Merge(), and SetDestinationRank().

char* G4MPIscorerMerger::outputBuffer
private
G4int G4MPIscorerMerger::outputBufferPosition
private
G4int G4MPIscorerMerger::outputBufferSize
private
G4bool G4MPIscorerMerger::ownsBuffer
private

Definition at line 93 of file G4MPIscorerMerger.hh.

Referenced by DestroyBuffer(), Receive(), Send(), and ~G4MPIscorerMerger().

G4ScoringManager* G4MPIscorerMerger::scoringManager
private

Definition at line 94 of file G4MPIscorerMerger.hh.

Referenced by Receive(), Send(), and SetScoringManager().

G4int G4MPIscorerMerger::verbose
private

Definition at line 98 of file G4MPIscorerMerger.hh.

Referenced by Merge(), and SetVerbosity().


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