ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4MPIscorerMerger Class Reference

#include <geant4/tree/geant4-10.6-release/examples/extended/parallel/MPI/source/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.
 
void UnPackAndMerge (const G4ScoringManager *)
 
void Pack (const G4VScoringMesh *)
 Pack a single mesh.
 
void UnPackAndMerge (G4VScoringMesh *)
 
void Pack (const HitStatDoubleMap *)
 Pack a single score map.
 
HitStatDoubleMapUnPackHitStatDoubleMap (const G4String &detName, const G4String &colName)
 
G4int CalculatePackSize (const G4ScoringManager *) const
 
G4int CalculatePackSize (const G4VScoringMesh *) const
 
G4int CalculatePackSize (const HitStatDoubleMap *) 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 40 of file G4MPIscorerMerger.hh.

View newest version in sPHENIX GitHub at line 40 of file G4MPIscorerMerger.hh

Constructor & Destructor Documentation

G4MPIscorerMerger::G4MPIscorerMerger ( )

Definition at line 73 of file G4MPIscorerMerger.cc.

View newest version in sPHENIX GitHub at line 73 of file G4MPIscorerMerger.cc

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

Definition at line 79 of file G4MPIscorerMerger.cc.

View newest version in sPHENIX GitHub at line 79 of file G4MPIscorerMerger.cc

G4MPIscorerMerger::~G4MPIscorerMerger ( )
virtual

Definition at line 89 of file G4MPIscorerMerger.cc.

View newest version in sPHENIX GitHub at line 89 of file G4MPIscorerMerger.cc

References outputBuffer, and ownsBuffer.

Member Function Documentation

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

Definition at line 475 of file G4MPIscorerMerger.cc.

View newest version in sPHENIX GitHub at line 475 of file G4MPIscorerMerger.cc

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

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 494 of file G4MPIscorerMerger.cc.

View newest version in sPHENIX GitHub at line 494 of file G4MPIscorerMerger.cc

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

+ Here is the call graph for this function:

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

Definition at line 520 of file G4MPIscorerMerger.cc.

View newest version in sPHENIX GitHub at line 520 of file G4MPIscorerMerger.cc

References DMSG, G4VTHitsMap< T, Map_t >::GetSize(), and int().

+ Here is the call graph for this function:

void G4MPIscorerMerger::DestroyBuffer ( )
inlineprotected

Definition at line 62 of file G4MPIscorerMerger.hh.

View newest version in sPHENIX GitHub at line 62 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 123 of file G4MPIscorerMerger.cc.

View newest version in sPHENIX GitHub at line 123 of file G4MPIscorerMerger.cc

References bytesSent, comm, commSize, destinationRank, DestroyBuffer(), DMSG, G4cout, G4endl, G4MPImanager::GetActiveSize(), G4MPImanager::GetComm(), G4MPImanager::GetManager(), G4MPImanager::GetRank(), 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 259 of file G4MPIscorerMerger.cc.

View newest version in sPHENIX GitHub at line 259 of file G4MPIscorerMerger.cc

References comm, DMSG, FatalException, G4Exception(), G4ScoringManager::GetMesh(), G4ScoringManager::GetNumberOfMesh(), MPI_Pack(), 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 320 of file G4MPIscorerMerger.cc.

View newest version in sPHENIX GitHub at line 320 of file G4MPIscorerMerger.cc

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

+ Here is the call graph for this function:

void G4MPIscorerMerger::Pack ( const HitStatDoubleMap sm)
protected

Pack a single score map.

Definition at line 408 of file G4MPIscorerMerger.cc.

View newest version in sPHENIX GitHub at line 408 of file G4MPIscorerMerger.cc

References comm, DMSG, e, G4VTHitsMap< T, Map_t >::GetMap(), G4VTHitsMap< T, Map_t >::GetSize(), G4FFGEnumerations::INT, MPI_Pack(), outputBuffer, outputBufferPosition, outputBufferSize, Acts::Test::transform, and verbose.

+ Here is the call graph for this function:

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

Definition at line 205 of file G4MPIscorerMerger.cc.

View newest version in sPHENIX GitHub at line 205 of file G4MPIscorerMerger.cc

References 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 233 of file G4MPIscorerMerger.cc.

View newest version in sPHENIX GitHub at line 233 of file G4MPIscorerMerger.cc

References 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 49 of file G4MPIscorerMerger.hh.

View newest version in sPHENIX GitHub at line 49 of file G4MPIscorerMerger.hh

References destinationRank.

void G4MPIscorerMerger::SetScoringManager ( G4ScoringManager mgr)
inline

Definition at line 50 of file G4MPIscorerMerger.hh.

View newest version in sPHENIX GitHub at line 50 of file G4MPIscorerMerger.hh

References scoringManager.

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

Definition at line 57 of file G4MPIscorerMerger.hh.

View newest version in sPHENIX GitHub at line 57 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 51 of file G4MPIscorerMerger.hh.

View newest version in sPHENIX GitHub at line 51 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 282 of file G4MPIscorerMerger.cc.

View newest version in sPHENIX GitHub at line 282 of file G4MPIscorerMerger.cc

References comm, FatalException, G4Exception(), G4ScoringManager::GetMesh(), G4ScoringManager::GetNumberOfMesh(), MPI_Unpack(), 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 351 of file G4MPIscorerMerger.cc.

View newest version in sPHENIX GitHub at line 351 of file G4MPIscorerMerger.cc

References G4VScoringMesh::Accumulate(), comm, DMSG, G4VScoringMesh::GetWorldName(), MPI_Unpack(), outputBuffer, outputBufferPosition, outputBufferSize, and UnPackHitStatDoubleMap().

+ Here is the call graph for this function:

HitStatDoubleMap * G4MPIscorerMerger::UnPackHitStatDoubleMap ( const G4String detName,
const G4String colName 
)
protected

Definition at line 451 of file G4MPIscorerMerger.cc.

View newest version in sPHENIX GitHub at line 451 of file G4MPIscorerMerger.cc

References comm, DMSG, G4FFGEnumerations::INT, MPI_Unpack(), outputBuffer, outputBufferPosition, outputBufferSize, G4VTHitsMap< T, Map_t >::set(), and verbose.

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 98 of file G4MPIscorerMerger.hh.

View newest version in sPHENIX GitHub at line 98 of file G4MPIscorerMerger.hh

Referenced by Merge(), and Send().

MPI::Intracomm G4MPIscorerMerger::comm
private

Definition at line 103 of file G4MPIscorerMerger.hh.

View newest version in sPHENIX GitHub at line 103 of file G4MPIscorerMerger.hh

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

unsigned int G4MPIscorerMerger::commSize
private

Definition at line 101 of file G4MPIscorerMerger.hh.

View newest version in sPHENIX GitHub at line 101 of file G4MPIscorerMerger.hh

Referenced by Merge().

unsigned int G4MPIscorerMerger::destinationRank
private

Definition at line 102 of file G4MPIscorerMerger.hh.

View newest version in sPHENIX GitHub at line 102 of file G4MPIscorerMerger.hh

Referenced by Merge(), and SetDestinationRank().

char* G4MPIscorerMerger::outputBuffer
private

Definition at line 95 of file G4MPIscorerMerger.hh.

View newest version in sPHENIX GitHub at line 95 of file G4MPIscorerMerger.hh

Referenced by DestroyBuffer(), Pack(), Receive(), Send(), SetupOutputBuffer(), UnPackAndMerge(), UnPackHitStatDoubleMap(), and ~G4MPIscorerMerger().

G4int G4MPIscorerMerger::outputBufferPosition
private

Definition at line 97 of file G4MPIscorerMerger.hh.

View newest version in sPHENIX GitHub at line 97 of file G4MPIscorerMerger.hh

Referenced by DestroyBuffer(), Pack(), Send(), SetupOutputBuffer(), UnPackAndMerge(), and UnPackHitStatDoubleMap().

G4int G4MPIscorerMerger::outputBufferSize
private

Definition at line 96 of file G4MPIscorerMerger.hh.

View newest version in sPHENIX GitHub at line 96 of file G4MPIscorerMerger.hh

Referenced by DestroyBuffer(), Pack(), Receive(), Send(), SetupOutputBuffer(), UnPackAndMerge(), and UnPackHitStatDoubleMap().

G4bool G4MPIscorerMerger::ownsBuffer
private

Definition at line 99 of file G4MPIscorerMerger.hh.

View newest version in sPHENIX GitHub at line 99 of file G4MPIscorerMerger.hh

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

G4ScoringManager* G4MPIscorerMerger::scoringManager
private

Definition at line 100 of file G4MPIscorerMerger.hh.

View newest version in sPHENIX GitHub at line 100 of file G4MPIscorerMerger.hh

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

G4int G4MPIscorerMerger::verbose
private

Definition at line 104 of file G4MPIscorerMerger.hh.

View newest version in sPHENIX GitHub at line 104 of file G4MPIscorerMerger.hh

Referenced by Merge(), Pack(), SetVerbosity(), and UnPackHitStatDoubleMap().


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