Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GeoModel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GeoModelDev
GeoModel
Commits
6fb102ba
Commit
6fb102ba
authored
9 months ago
by
Riccardo Maria Bianchi
Committed by
Johannes Junggeburth
9 months ago
Browse files
Options
Downloads
Patches
Plain Diff
move Elements to REAL DB records
parent
499c1042
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!327
New schema for the GeoModel SQLite database and updated I/O
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
GeoModelIO/GeoModelWrite/GeoModelWrite/WriteGeoModel.h
+3
-1
3 additions, 1 deletion
GeoModelIO/GeoModelWrite/GeoModelWrite/WriteGeoModel.h
GeoModelIO/GeoModelWrite/src/WriteGeoModel.cpp
+12
-4
12 additions, 4 deletions
GeoModelIO/GeoModelWrite/src/WriteGeoModel.cpp
with
15 additions
and
5 deletions
GeoModelIO/GeoModelWrite/GeoModelWrite/WriteGeoModel.h
+
3
−
1
View file @
6fb102ba
...
@@ -351,7 +351,7 @@ class WriteGeoModel : public GeoNodeAction {
...
@@ -351,7 +351,7 @@ class WriteGeoModel : public GeoNodeAction {
std
::
vector
<
std
::
vector
<
std
::
string
>>
m_physVols
;
std
::
vector
<
std
::
vector
<
std
::
string
>>
m_physVols
;
std
::
vector
<
std
::
vector
<
std
::
string
>>
m_fullPhysVols
;
std
::
vector
<
std
::
vector
<
std
::
string
>>
m_fullPhysVols
;
std
::
vector
<
std
::
vector
<
std
::
string
>>
m_materials
;
std
::
vector
<
std
::
vector
<
std
::
string
>>
m_materials
;
std
::
vector
<
std
::
vector
<
std
::
string
>>
m_elements
;
//
std::vector<std::vector<std::string>> m_elements;
std
::
vector
<
std
::
vector
<
std
::
string
>>
m_transforms
;
std
::
vector
<
std
::
vector
<
std
::
string
>>
m_transforms
;
std
::
vector
<
std
::
vector
<
std
::
string
>>
m_alignableTransforms
;
std
::
vector
<
std
::
vector
<
std
::
string
>>
m_alignableTransforms
;
std
::
vector
<
std
::
vector
<
std
::
string
>>
m_serialDenominators
;
std
::
vector
<
std
::
vector
<
std
::
string
>>
m_serialDenominators
;
...
@@ -361,6 +361,8 @@ class WriteGeoModel : public GeoNodeAction {
...
@@ -361,6 +361,8 @@ class WriteGeoModel : public GeoNodeAction {
std
::
vector
<
std
::
vector
<
std
::
string
>>
m_nameTags
;
std
::
vector
<
std
::
vector
<
std
::
string
>>
m_nameTags
;
std
::
vector
<
std
::
vector
<
std
::
string
>>
m_shapes
;
std
::
vector
<
std
::
vector
<
std
::
string
>>
m_shapes
;
DBRowsList
m_elements
;
DBRowsList
m_shapes_Box
;
DBRowsList
m_shapes_Box
;
DBRowsList
m_shapes_Tube
;
DBRowsList
m_shapes_Tube
;
DBRowsList
m_shapes_Cons
;
DBRowsList
m_shapes_Cons
;
...
...
This diff is collapsed.
Click to expand it.
GeoModelIO/GeoModelWrite/src/WriteGeoModel.cpp
+
12
−
4
View file @
6fb102ba
...
@@ -2041,10 +2041,18 @@ unsigned int WriteGeoModel::addMaterial(const std::string& name,
...
@@ -2041,10 +2041,18 @@ unsigned int WriteGeoModel::addMaterial(const std::string& name,
unsigned
int
WriteGeoModel
::
addElement
(
const
std
::
string
&
name
,
unsigned
int
WriteGeoModel
::
addElement
(
const
std
::
string
&
name
,
const
std
::
string
&
symbol
,
const
std
::
string
&
symbol
,
const
double
&
elZ
,
const
double
&
elA
)
{
const
double
&
elZ
,
const
double
&
elA
)
{
std
::
vector
<
std
::
vector
<
std
::
string
>>*
container
=
&
m_elements
;
// std::vector<std::vector<std::string>>* container = &m_elements;
std
::
vector
<
std
::
string
>
values
;
// std::vector<std::string> values;
values
.
insert
(
values
.
begin
(),
{
name
,
symbol
,
CppHelper
::
to_string_with_precision
(
elZ
),
// values.insert(values.begin(), {name, symbol, CppHelper::to_string_with_precision(elZ),
CppHelper
::
to_string_with_precision
(
elA
)});
// CppHelper::to_string_with_precision(elA)});
DBRowsList
*
container
=
&
m_elements
;
DBRowEntry
values
;
values
.
push_back
(
name
);
values
.
push_back
(
symbol
);
values
.
push_back
(
elZ
);
values
.
push_back
(
elA
);
return
addRecord
(
container
,
values
);
return
addRecord
(
container
,
values
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment