Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
G4MPIhistoMerger Class Reference

#include <Doxymodules_parallel.h>

Public Member Functions

 G4MPIhistoMerger ()
 
 G4MPIhistoMerger (G4VAnalysisManager *mgr, G4int destination=G4MPImanager::kRANK_MASTER, G4int verbosity=0)
 
void SetDestinationRank (G4int i)
 
void SetScoringManager (G4VAnalysisManager *mgr)
 
void SetVerbosity (G4int ver)
 
void Merge ()
 

Private Attributes

G4VAnalysisManagermanager
 
G4int destination
 
G4int verboseLevel
 

Detailed Description

Definition at line 62 of file Doxymodules_parallel.h.

Constructor & Destructor Documentation

◆ G4MPIhistoMerger() [1/2]

G4MPIhistoMerger::G4MPIhistoMerger ( )

◆ G4MPIhistoMerger() [2/2]

G4MPIhistoMerger::G4MPIhistoMerger ( G4VAnalysisManager mgr,
G4int  destination = G4MPImanager::kRANK_MASTER,
G4int  verbosity = 0 
)

Definition at line 42 of file G4MPIhistoMerger.cc.

43 : manager(m), destination(dest),verboseLevel(v) {}

Member Function Documentation

◆ SetDestinationRank()

void G4MPIhistoMerger::SetDestinationRank ( G4int  i)
inline

Definition at line 46 of file G4MPIhistoMerger.hh.

46{ destination = i; }

◆ SetScoringManager()

void G4MPIhistoMerger::SetScoringManager ( G4VAnalysisManager mgr)
inline

Definition at line 47 of file G4MPIhistoMerger.hh.

47{ manager = mgr; }

◆ SetVerbosity()

void G4MPIhistoMerger::SetVerbosity ( G4int  ver)
inline

Definition at line 48 of file G4MPIhistoMerger.hh.

48{ verboseLevel = ver; }

◆ Merge()

void G4MPIhistoMerger::Merge ( )

Definition at line 45 of file G4MPIhistoMerger.cc.

46{
47 if ( verboseLevel > 0 ) {
48 G4cout << "Starting merging of histograms" << G4endl;
49 }
50
51 const MPI::Intracomm* parentComm = G4MPImanager::GetManager()->GetComm();
52 MPI::Intracomm comm = parentComm->Dup();
53
54 G4bool verbose = ( verboseLevel > 1 );
55 G4int tag = G4MPImanager::kTAG_HISTO;
56 //const MPI::Intracomm* comm = &COMM_G4COMMAND_;
57 toolx::mpi::hmpi* hmpi
58 = new toolx::mpi::hmpi(G4cout, destination, tag, comm, verbose);
59 if ( ! manager->Merge(hmpi) ) {
60 G4cout<<" Merge FAILED"<<G4endl;
61 }
62
63 delete hmpi;
64
65 if ( verboseLevel > 0 ) {
66 G4cout << "End merging of histograms" << G4endl;
67 }
68 comm.Free();
69}
static G4MPImanager * GetManager()
const MPI::Intracomm * GetComm() const

Member Data Documentation

◆ manager

G4VAnalysisManager* G4MPIhistoMerger::manager
private

Definition at line 53 of file G4MPIhistoMerger.hh.

◆ destination

G4int G4MPIhistoMerger::destination
private

Definition at line 54 of file G4MPIhistoMerger.hh.

◆ verboseLevel

G4int G4MPIhistoMerger::verboseLevel
private

Definition at line 55 of file G4MPIhistoMerger.hh.


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

Applications | User Support | Publications | Collaboration