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
14647610
Commit
14647610
authored
1 year ago
by
Johannes Junggeburth
Browse files
Options
Downloads
Patches
Plain Diff
GeoLogVol - Use GeoIntusivePtr instead of manual refernce counting
parent
818df80e
No related branches found
No related tags found
1 merge request
!227
GeoLogVol - Use GeoIntusivePtr instead of manual refernce counting
Pipeline
#6588461
passed
1 year ago
Stage: step-A
Stage: step-B
Stage: step-C
Stage: step-D
Stage: step-E
Changes
2
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
GeoModelCore/GeoModelKernel/GeoModelKernel/GeoLogVol.h
+15
-24
15 additions, 24 deletions
GeoModelCore/GeoModelKernel/GeoModelKernel/GeoLogVol.h
GeoModelCore/GeoModelKernel/src/GeoLogVol.cxx
+2
-12
2 additions, 12 deletions
GeoModelCore/GeoModelKernel/src/GeoLogVol.cxx
with
17 additions
and
36 deletions
GeoModelCore/GeoModelKernel/GeoModelKernel/GeoLogVol.h
+
15
−
24
View file @
14647610
/*
/*
Copyright (C) 2002-20
17
CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-20
23
CERN for the benefit of the ATLAS collaboration
*/
*/
#ifndef GEOMODELKERNEL_GEOLOGVOL_H
#ifndef GEOMODELKERNEL_GEOLOGVOL_H
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
#include
"GeoModelKernel/GeoShape.h"
#include
"GeoModelKernel/GeoShape.h"
#include
"GeoModelKernel/RCBase.h"
#include
"GeoModelKernel/RCBase.h"
#include
"GeoModelKernel/GeoIntrusivePtr.h"
#include
"GeoModelKernel/GeoMaterial.h"
#include
"GeoModelKernel/GeoMaterial.h"
#include
<vector>
#include
<vector>
...
@@ -23,44 +24,34 @@ class GeoLogVol : public RCBase
...
@@ -23,44 +24,34 @@ class GeoLogVol : public RCBase
GeoLogVol
(
const
std
::
string
&
Name
,
const
GeoShape
*
Shape
,
const
GeoMaterial
*
Material
);
GeoLogVol
(
const
std
::
string
&
Name
,
const
GeoShape
*
Shape
,
const
GeoMaterial
*
Material
);
// Returns the name of the logical volume.
// Returns the name of the logical volume.
const
std
::
string
&
getName
()
const
;
const
std
::
string
&
getName
()
const
{
return
m_name
;
}
// Returns the shape of the logical volume.
// Returns the shape of the logical volume.
const
GeoShape
*
getShape
()
const
;
const
GeoShape
*
getShape
()
const
{
return
m_shape
;
}
// Returns the material of the logical volume.
// Returns the material of the logical volume.
const
GeoMaterial
*
getMaterial
()
const
;
const
GeoMaterial
*
getMaterial
()
const
{
return
m_material
;
}
protected
:
protected
:
virtual
~
GeoLogVol
();
virtual
~
GeoLogVol
()
=
default
;
private
:
private
:
GeoLogVol
(
const
GeoLogVol
&
right
);
GeoLogVol
&
operator
=
(
const
GeoLogVol
&
right
);
// The name of the logical volume.
// The name of the logical volume.
std
::
string
m_name
;
std
::
string
m_name
{}
;
// Material composition of this volume.
// Material composition of this volume.
const
GeoMaterial
*
m_material
;
GeoIntrusivePtr
<
const
GeoMaterial
>
m_material
{}
;
// Shape of this volume.
// Shape of this volume.
const
GeoShape
*
m_shape
;
GeoIntrusivePtr
<
const
GeoShape
>
m_shape
{}
;
};
};
inline
const
std
::
string
&
GeoLogVol
::
getName
()
const
{
return
m_name
;
}
inline
const
GeoShape
*
GeoLogVol
::
getShape
()
const
{
return
m_shape
;
}
inline
const
GeoMaterial
*
GeoLogVol
::
getMaterial
()
const
{
return
m_material
;
}
#endif
#endif
This diff is collapsed.
Click to expand it.
GeoModelCore/GeoModelKernel/src/GeoLogVol.cxx
+
2
−
12
View file @
14647610
/*
/*
Copyright (C) 2002-20
17
CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-20
23
CERN for the benefit of the ATLAS collaboration
*/
*/
#include
"GeoModelKernel/GeoLogVol.h"
#include
"GeoModelKernel/GeoLogVol.h"
...
@@ -7,15 +7,5 @@
...
@@ -7,15 +7,5 @@
GeoLogVol
::
GeoLogVol
(
const
std
::
string
&
Name
,
const
GeoShape
*
Shape
,
const
GeoMaterial
*
Material
)
GeoLogVol
::
GeoLogVol
(
const
std
::
string
&
Name
,
const
GeoShape
*
Shape
,
const
GeoMaterial
*
Material
)
:
m_name
(
Name
)
:
m_name
(
Name
)
,
m_material
(
Material
)
,
m_material
(
Material
)
,
m_shape
(
Shape
)
,
m_shape
(
Shape
){}
{
m_material
->
ref
();
m_shape
->
ref
();
}
GeoLogVol
::~
GeoLogVol
()
{
m_material
->
unref
();
m_shape
->
unref
();
}
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