Geant4  10.02.p03
G4MPIhistoMerger Class Reference

#include <G4MPIhistoMerger.hh>

Collaboration diagram for G4MPIhistoMerger:

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 38 of file G4MPIhistoMerger.hh.

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 41 of file G4MPIhistoMerger.cc.

42  : manager(m), destination(dest),verboseLevel(v) {}
G4VAnalysisManager * manager
static const double m
Definition: G4SIunits.hh:128

Member Function Documentation

◆ Merge()

void G4MPIhistoMerger::Merge ( )

Definition at line 44 of file G4MPIhistoMerger.cc.

45 {
46  if ( verboseLevel > 0 ) {
47  G4cout << "Starting merging of histograms" << G4endl;
48  }
49 
50  MPI::Intracomm comm = MPI::COMM_WORLD.Dup();
51 
52  G4bool verbose = ( verboseLevel > 1 );
54  //const MPI::Intracomm* comm = &COMM_G4COMMAND_;
55  tools::mpi::hmpi* hmpi = new tools::mpi::hmpi(G4cout, destination, tag,
56  comm, verbose);
57  if ( ! manager->Merge(hmpi) ) {
58  G4cout<<" Merge FAILED"<<G4endl;
59  }
60 
61  delete hmpi;
62 
63  if ( verboseLevel > 0 ) {
64  G4cout << "End merging of histograms" << G4endl;
65  }
66  comm.Free();
67 }
G4VAnalysisManager * manager
Definition: xmlparse.cc:187
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
bool G4bool
Definition: G4Types.hh:79
#define G4endl
Definition: G4ios.hh:61
G4bool Merge(tools::histo::hmpi *hmpi)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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; }
G4VAnalysisManager * manager

◆ SetVerbosity()

void G4MPIhistoMerger::SetVerbosity ( G4int  ver)
inline

Definition at line 48 of file G4MPIhistoMerger.hh.

48 { verboseLevel = ver; }
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ destination

G4int G4MPIhistoMerger::destination
private

Definition at line 54 of file G4MPIhistoMerger.hh.

◆ manager

G4VAnalysisManager* G4MPIhistoMerger::manager
private

Definition at line 53 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: