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
Merge requests
!412
Query is nothing else than a std::optional but just came earlier
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Query is nothing else than a std::optional but just came earlier
QueryAsStdOpt
into
main
Overview
2
Commits
5
Pipelines
3
Changes
15
Merged
Johannes Junggeburth
requested to merge
QueryAsStdOpt
into
main
4 months ago
Overview
2
Commits
5
Pipelines
3
Changes
15
Expand
Turn query into an std::optional. For now let's keep the extra methods but should be phased out on a longer term
Add the volumeId as attribute of the getChildrenWithTrf return structs
Add sorter struct to classify two materials as equivalent.
Edited
4 months ago
by
Johannes Junggeburth
0
0
Merge request reports
Compare
main
version 1
5b4c1484
4 months ago
main (base)
and
latest version
latest version
79d85ed6
5 commits,
4 months ago
version 1
5b4c1484
3 commits,
4 months ago
15 files
+
289
−
207
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
15
Search (e.g. *.vue) (Ctrl+P)
GeoModelCore/GeoModelHelpers/GeoModelHelpers/GeoMaterialSorter.h
0 → 100644
+
33
−
0
Options
/*
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
#ifndef GeoModelHelpers_GeoMaterialSorter_H
#define GeoModelHelpers_GeoMaterialSorter_H
#include
"GeoModelKernel/GeoMaterial.h"
#include
"GeoModelKernel/GeoElement.h"
#include
"GeoModelKernel/GeoIntrusivePtr.h"
#include
<set>
/// @brief Helper struct to deuplicate equivalent materials with different naming
struct
GeoMaterialSorter
{
/** @brief Comparison operator returing whether Material A is smaller than Material B */
bool
operator
()(
const
GeoMaterial
*
a
,
const
GeoMaterial
*
b
)
const
;
/** @brief Comparison operator returing whether the Element A is smaller than Element B */
bool
operator
()(
const
GeoElement
*
a
,
const
GeoElement
*
b
)
const
;
/// @brief Compares 2 GeoMaterials
/// @param a : Pointer to material A
/// @param b : Pointer to material B
/// @return Returns 0 if no defining material property could be found that differs
/// Returns -1 if the first defining & differing property of A is smaller
/// Returns 1 otherwise
int
compare
(
const
GeoMaterial
*
a
,
const
GeoMaterial
*
b
)
const
;
int
compare
(
const
GeoElement
*
a
,
const
GeoElement
*
b
)
const
;
};
/// @brief
/// @tparam ShapeType
using
GeoMaterialSet
=
std
::
set
<
GeoIntrusivePtr
<
const
GeoMaterial
>
,
GeoMaterialSorter
>
;
#endif
\ No newline at end of file
Loading