forked from celeritas-project/celeritas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ImportDataConverter.hh
61 lines (55 loc) · 1.76 KB
/
ImportDataConverter.hh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//----------------------------------*-C++-*----------------------------------//
// Copyright 2024 UT-Battelle, LLC, and other Celeritas developers.
// See the top-level COPYRIGHT file for details.
// SPDX-License-Identifier: (Apache-2.0 OR MIT)
//---------------------------------------------------------------------------//
//! \file celeritas/io/detail/ImportDataConverter.hh
//---------------------------------------------------------------------------//
#pragma once
#include "celeritas/Types.hh"
namespace celeritas
{
struct ImportData;
struct ImportElement;
struct ImportEmParameters;
struct ImportMaterial;
struct ImportModel;
struct ImportModelMaterial;
struct ImportMscModel;
struct ImportParticle;
struct ImportPhysicsTable;
struct ImportProcess;
namespace detail
{
//---------------------------------------------------------------------------//
/*!
* Convert imported data from one unit system to another.
*/
class ImportDataConverter
{
public:
// Construct with a unit system
explicit ImportDataConverter(UnitSystem usys);
//!@{
//! Convert imported data to the native unit type
void operator()(ImportData* data);
void operator()(ImportElement* data);
void operator()(ImportEmParameters* data);
void operator()(ImportMaterial* data);
void operator()(ImportModel* data);
void operator()(ImportModelMaterial* data);
void operator()(ImportMscModel* data);
void operator()(ImportParticle* data);
void operator()(ImportPhysicsTable* data);
void operator()(ImportProcess* data);
//!@}
private:
UnitSystem usys_;
double len_;
double numdens_;
double time_;
double xs_;
};
//---------------------------------------------------------------------------//
} // namespace detail
} // namespace celeritas