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

#include <G4MPIhistoMerger.hh>

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 ()
 

Detailed Description

Definition at line 38 of file G4MPIhistoMerger.hh.

Constructor & Destructor Documentation

G4MPIhistoMerger::G4MPIhistoMerger ( )

Definition at line 37 of file G4MPIhistoMerger.cc.

37  :
38 manager(0),destination(G4MPImanager::kRANK_MASTER),
39 verboseLevel(0) {}
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) {}
static constexpr double m
Definition: G4SIunits.hh:129
tuple v
Definition: test.py:18

Member Function Documentation

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 }
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:

void G4MPIhistoMerger::SetDestinationRank ( G4int  i)
inline

Definition at line 46 of file G4MPIhistoMerger.hh.

46 { destination = i; }
void G4MPIhistoMerger::SetScoringManager ( G4VAnalysisManager mgr)
inline

Definition at line 47 of file G4MPIhistoMerger.hh.

47 { manager = mgr; }
void G4MPIhistoMerger::SetVerbosity ( G4int  ver)
inline

Definition at line 48 of file G4MPIhistoMerger.hh.

48 { verboseLevel = ver; }

Here is the caller graph for this function:


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