Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/Geant4/G4MPIToolsManager.hh was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 
0027 // The manager class for MPI applications.
0028 
0029 // Author: Ivana Hrivnacova, 25/06/2015  (ivana@ipno.in2p3.fr)
0030 
0031 #ifndef G4MPIToolsManager_h
0032 #define G4MPIToolsManager_h 1
0033 
0034 #include "G4AnalysisManagerState.hh"
0035 #include "G4HnInformation.hh"
0036 #include "G4ios.hh"
0037 
0038 #include "tools/impi_world"
0039 #include "tools/histo/hmpi"
0040 
0041 #include <vector>
0042 #include <string_view>
0043 
0044 class G4MPIToolsManager
0045 {
0046   public:
0047     G4MPIToolsManager(const G4AnalysisManagerState& state,
0048                       tools::histo::hmpi* hmpi)
0049     : fState(state), fHmpi(hmpi) {}
0050     G4MPIToolsManager() = delete;
0051     virtual ~G4MPIToolsManager() = default;
0052 
0053   public:
0054     // Methods
0055     template <typename HT>
0056     G4bool Merge(const std::vector<std::pair<HT*, G4HnInformation*>>& hnVector
0057 
0058 );
0059   private:
0060     // Methods
0061     template <typename HT>
0062     G4bool Send(G4int nofActiveT,
0063                 const std::vector<std::pair<HT*, G4HnInformation*>>& hnVector
0064 
0065 );
0066 
0067     template <typename HT>
0068     G4bool Receive(G4int nofActiveT,
0069                 const std::vector<std::pair<HT*, G4HnInformation*>>& hnVector
0070 
0071 );
0072 
0073     // Static data members
0074     static constexpr std::string_view fkClass { "G4MPIToolsManager" };
0075 
0076     // Data members
0077     const G4AnalysisManagerState& fState;
0078     tools::histo::hmpi*  fHmpi;
0079 };
0080 
0081 // inline functions
0082 #include "G4MPIToolsManager.icc"
0083 
0084 #endif