Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
athena
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Peter Sherwood
athena
Commits
f609c590
Commit
f609c590
authored
6 years ago
by
Scott Snyder
Committed by
scott snyder
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
BeamPipeGeoModel: Another attempt to fix coverity 113158.
coverity: possible null pointer dereference. Former-commit-id:
e9ee2aef
parent
67c24440
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
AtlasGeometryCommon/BeamPipeGeoModel/CMakeLists.txt
+2
-1
2 additions, 1 deletion
AtlasGeometryCommon/BeamPipeGeoModel/CMakeLists.txt
AtlasGeometryCommon/BeamPipeGeoModel/src/BeamPipeDetectorFactory.cxx
+12
-3
12 additions, 3 deletions
...ryCommon/BeamPipeGeoModel/src/BeamPipeDetectorFactory.cxx
with
14 additions
and
4 deletions
AtlasGeometryCommon/BeamPipeGeoModel/CMakeLists.txt
+
2
−
1
View file @
f609c590
...
@@ -14,6 +14,7 @@ atlas_depends_on_subdirs( PUBLIC
...
@@ -14,6 +14,7 @@ atlas_depends_on_subdirs( PUBLIC
Control/CLIDSvc
Control/CLIDSvc
Control/SGTools
Control/SGTools
Control/StoreGate
Control/StoreGate
Control/AthenaKernel
DetectorDescription/GeoModel/GeoModelInterfaces
DetectorDescription/GeoModel/GeoModelInterfaces
GaudiKernel
)
GaudiKernel
)
...
@@ -27,7 +28,7 @@ atlas_add_library( BeamPipeGeoModelLib
...
@@ -27,7 +28,7 @@ atlas_add_library( BeamPipeGeoModelLib
PUBLIC_HEADERS BeamPipeGeoModel
PUBLIC_HEADERS BeamPipeGeoModel
INCLUDE_DIRS
${
Boost_INCLUDE_DIRS
}
${
CORAL_INCLUDE_DIRS
}
INCLUDE_DIRS
${
Boost_INCLUDE_DIRS
}
${
CORAL_INCLUDE_DIRS
}
LINK_LIBRARIES
${
Boost_LIBRARIES
}
${
CORAL_LIBRARIES
}
GeoModelKernel GeoModelUtilities StoreGateLib SGtests
LINK_LIBRARIES
${
Boost_LIBRARIES
}
${
CORAL_LIBRARIES
}
GeoModelKernel GeoModelUtilities StoreGateLib SGtests
PRIVATE_LINK_LIBRARIES SGTools GaudiKernel
)
PRIVATE_LINK_LIBRARIES SGTools
AthenaKernel
GaudiKernel
)
atlas_add_component
(
BeamPipeGeoModel
atlas_add_component
(
BeamPipeGeoModel
src/components/*.cxx
src/components/*.cxx
...
...
This diff is collapsed.
Click to expand it.
AtlasGeometryCommon/BeamPipeGeoModel/src/BeamPipeDetectorFactory.cxx
+
12
−
3
View file @
f609c590
...
@@ -25,6 +25,9 @@
...
@@ -25,6 +25,9 @@
#include
"RDBAccessSvc/IRDBRecordset.h"
#include
"RDBAccessSvc/IRDBRecordset.h"
#include
"RDBAccessSvc/IRDBAccessSvc.h"
#include
"RDBAccessSvc/IRDBAccessSvc.h"
#include
"AthenaKernel/getMessageSvc.h"
#include
"GaudiKernel/MsgStream.h"
#include
<iomanip>
#include
<iomanip>
#include
<vector>
#include
<vector>
...
@@ -240,9 +243,15 @@ void BeamPipeDetectorFactory::addSections(GeoPhysVol* parent, int region)
...
@@ -240,9 +243,15 @@ void BeamPipeDetectorFactory::addSections(GeoPhysVol* parent, int region)
GeoNameTag
*
ntSection
=
new
GeoNameTag
(
name
);
GeoNameTag
*
ntSection
=
new
GeoNameTag
(
name
);
if
(
addToFirstSection
&&
secNum
!=
1
)
{
if
(
addToFirstSection
&&
secNum
!=
1
)
{
//std::cout << "Placing section " << secNum << " in Section1" << std::endl;
if
(
!
pvMotherSection
)
{
pvMotherSection
->
add
(
ntSection
);
MsgStream
gLog
(
Athena
::
getMessageSvc
(),
"BeamPipeDetectorFactory"
);
pvMotherSection
->
add
(
pvSection
);
gLog
<<
MSG
::
ERROR
<<
"Logic error building beam pipe."
<<
endmsg
;
}
else
{
//std::cout << "Placing section " << secNum << " in Section1" << std::endl;
pvMotherSection
->
add
(
ntSection
);
pvMotherSection
->
add
(
pvSection
);
}
}
else
{
}
else
{
//std::cout << "Placing section " << secNum << " in mother envelope" << std::endl;
//std::cout << "Placing section " << secNum << " in mother envelope" << std::endl;
parent
->
add
(
ntSection
);
parent
->
add
(
ntSection
);
...
...
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