Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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<std::pair<HT*, G4HnInformation*>>& hnVector
57
58);
59 private:
60 // Methods
61 template <typename HT>
62 G4bool Send(G4int nofActiveT,
63 const std::vector<std::pair<HT*, G4HnInformation*>>& hnVector
64
65);
66
67 template <typename HT>
68 G4bool Receive(G4int nofActiveT,
69 const std::vector<std::pair<HT*, G4HnInformation*>>& hnVector
70
71);
72
73 // Static data members
74 static constexpr std::string_view fkClass { "G4MPIToolsManager" };
75
76 // Data members
77 const G4AnalysisManagerState& fState;
78 tools::histo::hmpi* fHmpi;
79};
80
81// inline functions
82#include "G4MPIToolsManager.icc"
83
84#endif
bool G4bool
Definition G4Types.hh:86
int G4int
Definition G4Types.hh:85
virtual ~G4MPIToolsManager()=default
G4MPIToolsManager(const G4AnalysisManagerState &state, tools::histo::hmpi *hmpi)
G4MPIToolsManager()=delete
G4bool Merge(const std::vector< std::pair< HT *, G4HnInformation * > > &hnVector)