Geant4
11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
GUPI_entry.cc
Go to the documentation of this file.
1
/*
2
# <<BEGIN-copyright>>
3
# Copyright 2019, Lawrence Livermore National Security, LLC.
4
# This file is part of the gidiplus package (https://github.com/LLNL/gidiplus).
5
# gidiplus is licensed under the MIT license (see https://opensource.org/licenses/MIT).
6
# SPDX-License-Identifier: MIT
7
# <<END-copyright>>
8
*/
9
10
#include <fstream>
11
12
#include "
GUPI.hpp
"
13
14
namespace
GUPI
{
15
16
/*! \class Entry
17
* This is a base class inherit by other classes that are enties in a **Suite**.
18
*/
19
20
/* *********************************************************************************************************/
/**
21
* @param a_moniker [in] The **GNDS** node's name (i.e., moniker).
22
* @param a_attribute [in] Currently not used.
23
***********************************************************************************************************/
24
25
Entry::Entry
( std::string
const
&a_moniker, std::string
const
&a_keyName, std::string
const
&a_keyValue ) :
26
Ancestry
( a_moniker ),
27
m_keyName( a_keyName ),
28
m_keyValue( a_keyValue ) {
29
30
}
31
32
/* *********************************************************************************************************/
/**
33
* @param a_moniker [in] The **GNDS** node's name (i.e., moniker).
34
* @param a_attribute [in] Currently not used.
35
***********************************************************************************************************/
36
37
Entry::Entry
(
HAPI::Node
const
&a_node, std::string
const
&a_keyName ) :
38
Ancestry
( a_node.name( ) ),
39
m_keyName( a_keyName ),
40
m_keyValue( a_node.attribute_as_string( a_keyName.c_str( ) ) ) {
41
42
}
43
44
/* *********************************************************************************************************/
/**
45
***********************************************************************************************************/
46
47
Entry::~Entry
( ) {
48
49
}
50
51
/* *********************************************************************************************************/
/**
52
* This method serializes *this* for broadcasting as needed for MPI and GPUs. The method can count the number of required
53
* bytes, pack *this* or unpack *this* depending on *a_mode*.
54
*
55
* @param a_buffer [in] The buffer to read or write data to depending on *a_mode*.
56
* @param a_mode [in] Specifies the action of this method.
57
***********************************************************************************************************/
58
59
LUPI_HOST
void
Entry::serialize
(
LUPI::DataBuffer
&a_buffer,
LUPI::DataBuffer::Mode
a_mode ) {
60
61
Ancestry::serialize
( a_buffer, a_mode );
62
DATA_MEMBER_STD_STRING
( m_keyName, a_buffer, a_mode );
63
DATA_MEMBER_STD_STRING
( m_keyValue, a_buffer, a_mode );
64
}
65
66
}
GUPI.hpp
DATA_MEMBER_STD_STRING
#define DATA_MEMBER_STD_STRING(member, buf, mode)
Definition
LUPI_dataBuffer.hpp:310
LUPI_HOST
#define LUPI_HOST
Definition
LUPI_declareMacro.hpp:81
GUPI::Ancestry::serialize
virtual LUPI_HOST void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
Definition
GUPI_ancestry.cc:192
GUPI::Ancestry::Ancestry
Ancestry(std::string const &a_moniker, std::string const &a_attribute="")
Definition
GUPI_ancestry.cc:26
GUPI::Entry::serialize
LUPI_HOST void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
Definition
GUPI_entry.cc:59
GUPI::Entry::~Entry
~Entry()
Definition
GUPI_entry.cc:47
GUPI::Entry::Entry
Entry(std::string const &a_moniker, std::string const &a_keyName, std::string const &a_keyValue)
Definition
GUPI_entry.cc:25
HAPI::Node
Definition
HAPI.hpp:166
LUPI::DataBuffer
Definition
LUPI_dataBuffer.hpp:25
LUPI::DataBuffer::Mode
Mode
Definition
LUPI_dataBuffer.hpp:53
GUPI
Definition
GUPI.hpp:20
geant4-v11.4.0
source
processes
hadronic
models
lend
src
GUPI_entry.cc
Generated by
1.16.1