Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
GIDI_gridded2d.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 "GIDI.hpp"
11#include <HAPI.hpp>
12
13namespace GIDI {
14
15namespace Functions {
16
17/*! \class Gridded2d
18 * Class for the GNDS <**gridded2d**> node.
19 */
20
21/* *********************************************************************************************************//**
22 * Constructed from data in a <**product**> node.
23 *
24 * @param a_construction [in] Used to pass user options to the constructor.
25 * @param a_node [in] The **HAPI::Node** to be parsed and used to construct the Gridded2d.
26 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
27 * @param a_parent [in] The parent GIDI::Suite.
28 ***********************************************************************************************************/
29
30Gridded2d::Gridded2d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent ) :
31 Function2dForm( a_construction, a_node, a_setupInfo, FormType::gridded2d, a_parent ),
32 m_array( a_node.child( GIDI_arrayChars ), a_setupInfo, a_construction.useSystem_strtod( ) ) {
33
34}
35
36/* *********************************************************************************************************//**
37 ***********************************************************************************************************/
38
42
43/* *********************************************************************************************************//**
44 * Fills the argument *a_writeInfo* with the XML lines that represent *this*. Recursively enters each sub-node.
45 *
46 * @param a_writeInfo [in/out] Instance containing incremental indentation and other information and stores the appended lines.
47 * @param a_indent [in] The amount to indent *this* node.
48 ***********************************************************************************************************/
49
50void Gridded2d::toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const {
51
52 std::string indent2 = a_writeInfo.incrementalIndent( a_indent );
53
54 a_writeInfo.addNodeStarter( a_indent, moniker( ) );
55 axes( ).toXMLList( a_writeInfo, indent2 );
56 m_array.toXMLList( a_writeInfo, indent2 );
57 a_writeInfo.addNodeEnder( moniker( ) );
58}
59
60} // End namespace Functions.
61
62} // End namespace GIDI.
#define GIDI_arrayChars
Definition GIDI.hpp:258
void toXMLList(GUPI::WriteInfo &a_writeInfo, std::string const &a_indent="") const
Definition GIDI_axes.cc:113
Function2dForm(std::string const &a_moniker, FormType a_type, ptwXY_interpolation a_interpolation, int a_index, double a_outerDomainValue)
Definition GIDI_form.cc:476
Axes const & axes() const
Definition GIDI.hpp:1012
void toXMLList(GUPI::WriteInfo &a_writeInfo, std::string const &a_indent) const
Gridded2d(Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent)
std::string const & moniker() const
Definition GUPI.hpp:102
void addNodeEnder(std::string const &a_moniker)
Definition GUPI.hpp:59
std::string incrementalIndent(std::string const &indent)
Definition GUPI.hpp:52
void addNodeStarter(std::string const &indent, std::string const &a_moniker, std::string const &a_attributes="")
Definition GUPI.hpp:55
Definition GIDI.hpp:32
FormType
Definition GIDI.hpp:118