Geant4-11
G4MPIToolsManager.hh
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26
27// The manager class for MPI applications.
28
29// Author: Ivana Hrivnacova, 25/06/2015 (ivana@ipno.in2p3.fr)
30
31#ifndef G4MPIToolsManager_h
32#define G4MPIToolsManager_h 1
33
35#include "G4HnInformation.hh"
36#include "G4ios.hh"
37
38#include "tools/impi_world"
39#include "tools/histo/hmpi"
40
41#include <vector>
42#include <string_view>
43
45{
46 public:
48 tools::histo::hmpi* hmpi)
49 : fState(state), fHmpi(hmpi) {}
51 virtual ~G4MPIToolsManager() = default;
52
53 public:
54 // Methods
55 template <typename HT>
56 G4bool Merge(const std::vector<HT*>& htVector,
57 const std::vector<G4HnInformation*>& hnVector);
58 private:
59 // Methods
60 template <typename HT>
61 G4bool Send(G4int nofActiveT,
62 const std::vector<HT*>& htVector,
63 const std::vector<G4HnInformation*>& hnVector);
64
65 template <typename HT>
66 G4bool Receive(G4int nofActiveT,
67 const std::vector<HT*>& htVector,
68 const std::vector<G4HnInformation*>& hnVector);
69
70 // Static data members
71 static constexpr std::string_view fkClass { "G4MPIToolsManager" };
72
73 // Data members
75 tools::histo::hmpi* fHmpi;
76};
77
78// inline functions
79#include "G4MPIToolsManager.icc"
80
81#endif
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
virtual ~G4MPIToolsManager()=default
G4bool Receive(G4int nofActiveT, const std::vector< HT * > &htVector, const std::vector< G4HnInformation * > &hnVector)
const G4AnalysisManagerState & fState
static constexpr std::string_view fkClass
G4bool Send(G4int nofActiveT, const std::vector< HT * > &htVector, const std::vector< G4HnInformation * > &hnVector)
G4MPIToolsManager(const G4AnalysisManagerState &state, tools::histo::hmpi *hmpi)
tools::histo::hmpi * fHmpi
G4MPIToolsManager()=delete
G4bool Merge(const std::vector< HT * > &htVector, const std::vector< G4HnInformation * > &hnVector)