Loading...
Searching...
No Matches
G4RootMpiPNtupleDescription.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// Structure containing the information related to Root MPI pntuple.
28// This class is temporarily provided with g4mpi,
29// it will be integrated in Geant4 analysis category in future.
30//
31// Author: Ivana Hrivnacova, 21/11/2018 (ivana@ipno.in2p3.fr)
32
33#ifndef G4RootMpiPNtupleDescription_h
34#define G4RootMpiPNtupleDescription_h 1
35
36#include "globals.hh"
37
38#include "G4TNtupleDescription.hh"
39#include "G4RootFileDef.hh"
40
41#include "tools/ntuple_booking"
42#include "tools/impi"
43#include "tools/wroot/impi_ntuple"
44#include "tools/wroot/ntuple"
45
46namespace tools {
47namespace wroot {
48class branch;
49class base_pntuple;
50}
51}
52
54
56{
57 public:
59 : fDescription(g4NtupleBooking) {}
60
62 {
63 if ( fDescription.GetIsNtupleOwner() ) delete fNtuple;
64 }
65
66 // Set methods
67 void SetNtuple(tools::wroot::impi_ntuple* intuple);
68 void SetBasePNtuple(tools::wroot::base_pntuple* basePNtuple);
69 void SetMainNtupleRank(G4int value);
70 void SetImpi(tools::impi* value);
71 void Reset();
72
73 // Get methods
75 tools::wroot::impi_ntuple* GetNtuple() const;
76 tools::wroot::base_pntuple* GetBasePNtuple() const;
77 std::vector<tools::wroot::branch*>& GetMainBranches();
78 G4int GetMainNtupleRank() const;
79
80 private:
82 tools::wroot::impi_ntuple* fNtuple { nullptr };
83 tools::wroot::base_pntuple* fBasePNtuple { nullptr };
84 std::vector<tools::wroot::branch*> fMainBranches;
85 G4int fMainNtupleRank { 0 };
86 tools::impi* fImpi { nullptr };
87};
88
89// inline function
90
92 tools::wroot::impi_ntuple* intuple)
93{ fNtuple = intuple; }
94
96 tools::wroot::base_pntuple* basePNtuple)
97{ fBasePNtuple = basePNtuple; }
98
100{ fMainNtupleRank = value; }
101
102inline void G4RootMpiPNtupleDescription::SetImpi(tools::impi* value)
103{ fImpi = value; }
104
106{
107 if ( fDescription.GetIsNtupleOwner() ) delete fNtuple;
108 fNtuple = nullptr;
109}
110
114
115inline tools::wroot::impi_ntuple*
118
119inline tools::wroot::base_pntuple*
122
123inline std::vector<tools::wroot::branch*>&
126
127inline G4int
130
131#endif
tools::wroot::base_pntuple * fBasePNtuple
tools::wroot::impi_ntuple * fNtuple
G4RootMpiPNtupleDescription(G4NtupleBooking *g4NtupleBooking)
std::vector< tools::wroot::branch * > fMainBranches
void SetNtuple(tools::wroot::impi_ntuple *intuple)
void SetBasePNtuple(tools::wroot::base_pntuple *basePNtuple)
tools::wroot::base_pntuple * GetBasePNtuple() const
tools::wroot::impi_ntuple * GetNtuple() const
std::vector< tools::wroot::branch * > & GetMainBranches()

Applications | User Support | Publications | Collaboration