Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GeoModelIO
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Jira
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
GeoModelDev
GeoModelIO
Commits
1c5af6c5
Commit
1c5af6c5
authored
5 years ago
by
Riccardo Maria Bianchi
Browse files
Options
Downloads
Patches
Plain Diff
cleaning code and renaming containers and methods
parent
4693ad7f
No related branches found
No related tags found
1 merge request
!9
Implements parallel I/O (Read, for the moment) & starts dropping Qt5
Pipeline
#1668691
failed
5 years ago
Stage: dependencies
Stage: build
Changes
2
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
GeoModelRead/GeoModelRead/ReadGeoModel.h
+12
-36
12 additions, 36 deletions
GeoModelRead/GeoModelRead/ReadGeoModel.h
GeoModelRead/src/ReadGeoModel.cpp
+41
-376
41 additions, 376 deletions
GeoModelRead/src/ReadGeoModel.cpp
with
53 additions
and
412 deletions
GeoModelRead/GeoModelRead/ReadGeoModel.h
+
12
−
36
View file @
1c5af6c5
...
@@ -111,10 +111,7 @@ private:
...
@@ -111,10 +111,7 @@ private:
GeoBox
*
buildDummyShape
();
GeoBox
*
buildDummyShape
();
void
loopOverAllChildrenInBunches
();
void
loopOverAllChildrenInBunches
();
void
loopOverAllChildrenInBunchesNew
();
void
loopOverAllChildren
(
QStringList
keys
);
void
processParentChildren
(
const
QString
&
parentKey
);
void
processChild
(
GeoVPhysVol
*
parentVol
,
bool
&
isRootVolume
,
const
QStringList
&
child
);
void
processChild
(
GeoVPhysVol
*
parentVol
,
bool
&
isRootVolume
,
const
QStringList
&
child
);
void
loopOverAllChildrenRecords
(
std
::
vector
<
std
::
vector
<
std
::
string
>>
records
);
void
loopOverAllChildrenRecords
(
std
::
vector
<
std
::
vector
<
std
::
string
>>
records
);
...
@@ -125,7 +122,6 @@ private:
...
@@ -125,7 +122,6 @@ private:
GeoVPhysVol
*
parseChildren
(
GeoVPhysVol
*
vol
,
QMap
<
unsigned
int
,
QStringList
>
children
,
int
depth
=
0
);
GeoVPhysVol
*
parseChildren
(
GeoVPhysVol
*
vol
,
QMap
<
unsigned
int
,
QStringList
>
children
,
int
depth
=
0
);
GeoVPhysVol
*
buildVPhysVolInstance
(
const
unsigned
int
id
,
const
unsigned
int
tableId
,
const
unsigned
int
copyNumber
);
GeoVPhysVol
*
buildVPhysVolInstance
(
const
unsigned
int
id
,
const
unsigned
int
tableId
,
const
unsigned
int
copyNumber
);
// GeoVPhysVol* buildNewVPhysVolInstance(const unsigned int id, const unsigned int tableId, const unsigned int copyNumber);
GeoVPhysVol
*
buildVPhysVol
(
const
unsigned
int
id
,
const
unsigned
int
tableId
,
unsigned
int
logVol_ID
=
0
);
GeoVPhysVol
*
buildVPhysVol
(
const
unsigned
int
id
,
const
unsigned
int
tableId
,
unsigned
int
logVol_ID
=
0
);
GeoLogVol
*
buildLogVol
(
const
unsigned
int
id
);
GeoLogVol
*
buildLogVol
(
const
unsigned
int
id
);
...
@@ -229,48 +225,29 @@ private:
...
@@ -229,48 +225,29 @@ private:
// callback handles
// callback handles
unsigned
long
*
m_progress
;
unsigned
long
*
m_progress
;
// data containers
//! containers to store the list of GeoModel nodes coming from the DB
// QHash<QString, QMap<unsigned int, QStringList>> m_allchildren; // key = "parentId:parentTable", item = list of children parameters, inserted by child position
std
::
vector
<
std
::
vector
<
std
::
string
>>
m_physVols
;
std
::
vector
<
std
::
vector
<
std
::
string
>>
m_allchildrenStd
;
std
::
vector
<
std
::
vector
<
std
::
string
>>
m_fullPhysVols
;
std
::
vector
<
std
::
vector
<
std
::
string
>>
m_transforms
;
std
::
vector
<
std
::
vector
<
std
::
string
>>
m_alignableTransforms
;
QHash
<
unsigned
int
,
QStringList
>
m_functions
;
std
::
vector
<
std
::
vector
<
std
::
string
>>
m_serialDenominators
;
// std::vector<std::vector<std::string>> m_functions;
std
::
vector
<
std
::
vector
<
std
::
string
>>
m_serialTransformers
;
std
::
vector
<
std
::
vector
<
std
::
string
>>
m_physVolsStd
;
std
::
vector
<
std
::
vector
<
std
::
string
>>
m_fullPhysVolsStd
;
std
::
vector
<
std
::
vector
<
std
::
string
>>
m_transformsStd
;
std
::
vector
<
std
::
vector
<
std
::
string
>>
m_alignableTransformsStd
;
std
::
vector
<
std
::
vector
<
std
::
string
>>
m_serialDenominatorsStd
;
std
::
vector
<
std
::
vector
<
std
::
string
>>
m_serialTransformersStd
;
std
::
vector
<
std
::
vector
<
std
::
string
>>
m_nameTags
;
std
::
vector
<
std
::
vector
<
std
::
string
>>
m_nameTags
;
std
::
vector
<
std
::
vector
<
std
::
string
>>
m_logVols
;
std
::
vector
<
std
::
vector
<
std
::
string
>>
m_logVols
;
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_shapes
;
std
::
vector
<
std
::
vector
<
std
::
string
>>
m_shapes
;
QHash
<
unsigned
int
,
QStringList
>
m_functions
;
// std::vector<std::vector<std::string>> m_functions;
std
::
vector
<
std
::
vector
<
std
::
string
>>
m_allchildren
;
// QHash<unsigned int, QString> m_tableID_toTableName; // to look for node's type name starting from a table ID
// QHash<QString, unsigned int> m_tableName_toTableID; // to look for table ID starting from node's type name
std
::
unordered_map
<
unsigned
int
,
std
::
string
>
m_tableID_toTableName
;
// to look for node's type name starting from a table ID
std
::
unordered_map
<
unsigned
int
,
std
::
string
>
m_tableID_toTableName
;
// to look for node's type name starting from a table ID
std
::
unordered_map
<
std
::
string
,
unsigned
int
>
m_tableName_toTableID
;
// to look for table ID starting from node's type name
std
::
unordered_map
<
std
::
string
,
unsigned
int
>
m_tableName_toTableID
;
// to look for table ID starting from node's type name
QStringList
m_root_vol_data
;
QStringList
m_root_vol_data
;
// QHash<QString, GeoGraphNode*> m_memMap;
//! memory chaches
// std::unordered_map<unsigned int, GeoShape*> m_memMapShapes;
// std::unordered_map<unsigned int, GeoTransform*> m_memMapTransforms;
// std::unordered_map<unsigned int, GeoLogVol*> m_memMapLogs;
// std::unordered_map<unsigned int, GeoMaterial*> m_memMapMats;
// std::unordered_map<unsigned int, GeoElement*> m_memMapEls;
// std::unordered_map<unsigned int, GeoPhysVol*> m_memMapPhysVols;
// std::unordered_map<unsigned int, GeoFullPhysVol*> m_memMapFullPhysVols;
// std::unordered_map<unsigned int, TRANSFUNCTION> m_memMapFuncs;
std
::
vector
<
GeoPhysVol
*>
m_memMapPhysVols
;
std
::
vector
<
GeoPhysVol
*>
m_memMapPhysVols
;
std
::
vector
<
GeoFullPhysVol
*>
m_memMapFullPhysVols
;
std
::
vector
<
GeoFullPhysVol
*>
m_memMapFullPhysVols
;
std
::
vector
<
GeoTransform
*>
m_memMapTransforms
;
std
::
vector
<
GeoTransform
*>
m_memMapTransforms
;
...
@@ -282,11 +259,10 @@ private:
...
@@ -282,11 +259,10 @@ private:
std
::
vector
<
GeoMaterial
*>
m_memMapMaterials
;
std
::
vector
<
GeoMaterial
*>
m_memMapMaterials
;
std
::
vector
<
GeoElement
*>
m_memMapElements
;
std
::
vector
<
GeoElement
*>
m_memMapElements
;
// std::vector<TRANSFUNCTION> m_memMapFunctions; // FIXME: implement cache for Functions
// std::vector<TRANSFUNCTION> m_memMapFunctions; // FIXME: implement cache for Functions
std
::
unordered_map
<
unsigned
int
,
GeoShape
*>
m_memMapShapes
;
// we need keys, because shapes are not built following the ID order
std
::
unordered_map
<
unsigned
int
,
GeoShape
*>
m_memMapShapes
;
// we need keys, because shapes are not built following the ID order
std
::
unordered_map
<
std
::
string
,
GeoGraphNode
*>
m_memMap
;
// we need keys, to keep track of the volume's copyNumber
std
::
unordered_map
<
std
::
string
,
GeoGraphNode
*>
m_memMap
;
// we need keys, to keep track of the volume's copyNumber
//! container to store unknown shapes
std
::
set
<
std
::
string
>
m_unknown_shapes
;
std
::
set
<
std
::
string
>
m_unknown_shapes
;
};
};
...
...
This diff is collapsed.
Click to expand it.
GeoModelRead/src/ReadGeoModel.cpp
+
41
−
376
View file @
1c5af6c5
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