Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RunMerger Class Reference

#include <RunMerger.hh>

Inheritance diagram for RunMerger:
Collaboration diagram for RunMerger:

Public Member Functions

 RunMerger (const Run *arun, G4int destination=G4MPImanager::kRANK_MASTER, G4int verb=0)
 
- Public Member Functions inherited from G4VUserMPIrunMerger
 G4VUserMPIrunMerger ()
 
 G4VUserMPIrunMerger (const G4Run *aRun, G4int destination=G4MPImanager::kRANK_MASTER, G4int verbosity=0)
 
virtual ~G4VUserMPIrunMerger ()
 
void SetRun (G4Run *r)
 
void SetDestinationRank (G4int i)
 
void SetVerbosity (G4int ver)
 
virtual void Merge ()
 

Protected Member Functions

void Pack ()
 
G4RunUnPack ()
 
- Protected Member Functions inherited from G4VUserMPIrunMerger
void InputUserData (void *input_data, const MPI::Datatype &dt, int count)
 
void OutputUserData (void *input_data, const MPI::Datatype &dt, int count)
 
void SetupOutputBuffer (char *buff, G4int size, G4int position)
 
void DestroyBuffer ()
 
G4int GetPosition () const
 
char * GetBuffer () const
 
G4int GetBufferSize () const
 
void Send (const unsigned int destination)
 
void Receive (const unsigned int source)
 

Detailed Description

Definition at line 32 of file RunMerger.hh.

Constructor & Destructor Documentation

RunMerger::RunMerger ( const Run arun,
G4int  destination = G4MPImanager::kRANK_MASTER,
G4int  verb = 0 
)
inline

Definition at line 34 of file RunMerger.hh.

36  : G4VUserMPIrunMerger(arun,destination,verb ) , fMyRun(arun) {}

Member Function Documentation

void RunMerger::Pack ( )
protectedvirtual

Implements G4VUserMPIrunMerger.

Definition at line 30 of file RunMerger.cc.

30  {
31  //Very imporant, here fMyRun is const!
32  //Register a user-data in the user Run class with MPI merger
33  InputUserData(const_cast<int*>(&(fMyRun->fDummyCounter)),MPI::INT,1);
34 }
void InputUserData(void *input_data, const MPI::Datatype &dt, int count)

Here is the call graph for this function:

G4Run * RunMerger::UnPack ( )
protectedvirtual

Implements G4VUserMPIrunMerger.

Definition at line 37 of file RunMerger.cc.

37  {
38  //Create a dummy user-Run, used to contain data received via MPI
39  Run* aDummyRun = new Run;
40  OutputUserData(&(aDummyRun->fDummyCounter),MPI::INT,1);
41  return aDummyRun;
42 }
void OutputUserData(void *input_data, const MPI::Datatype &dt, int count)
Definition: Run.hh:46

Here is the call graph for this function:


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