Skip to content
Snippets Groups Projects
Commit f1768efa authored by Atlas-Software Librarian's avatar Atlas-Software Librarian Committed by Graeme Stewart
Browse files

'CMakeLists.txt' (TrkCaloClusterROI-01-00-01)

	* Fix coverity defects
13100 09/07/2014 (Medium) Uninitialized scalar field :/Tracking/TrkEvent/TrkCaloClusterROI/src/CaloClusterROI.cxx in function "CaloClusterROI"
13101 09/07/2014 (Medium) Uninitialized scalar field :/Tracking/TrkEvent/TrkCaloClusterROI/src/CaloClusterROI.cxx in function "CaloClusterROI"
	* update copy/assignment operators to include m_energy,m_phiWidth,m_etaWidth
	* tag as TrkCaloClusterROI-01-00-01
  * tag as  TrkCaloClusterROI-01-00-00
parent 7525fe78
No related branches found
No related tags found
No related merge requests found
################################################################################
# Package: TrkCaloClusterROI
################################################################################
# Declare the package name:
atlas_subdir( TrkCaloClusterROI )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Control/CLIDSvc
Control/DataModel
Control/SGTools
DetectorDescription/GeoPrimitives
Event/EventPrimitives
PRIVATE
Tracking/TrkDetDescr/TrkSurfaces
Tracking/TrkEvent/TrkEventPrimitives )
# External dependencies:
find_package( Eigen )
find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
# Component(s) in the package:
atlas_add_library( TrkCaloClusterROI
src/*.cxx
PUBLIC_HEADERS TrkCaloClusterROI
INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS}
PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
LINK_LIBRARIES ${EIGEN_LIBRARIES} DataModel SGTools GeoPrimitives EventPrimitives
PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} TrkSurfaces TrkEventPrimitives )
......@@ -20,7 +20,7 @@ Trk::CaloClusterROI::CaloClusterROI( const Trk::LocalParameters* locpars,
double widtheta)
:
m_localParams(locpars),
m_globalpos(0),
m_globalpos(nullptr),
m_energy( energy ),
m_phiWidth( widthphi ),
m_etaWidth( widtheta )
......@@ -39,9 +39,12 @@ Trk::CaloClusterROI::~CaloClusterROI()
// default constructor:
Trk::CaloClusterROI::CaloClusterROI() :
m_localParams(0),
m_surface(0),
m_globalpos(0)
m_localParams(nullptr),
m_surface(nullptr),
m_globalpos(nullptr),
m_energy(0.0),
m_phiWidth(0.0),
m_etaWidth(0.0)
{
}
......@@ -49,7 +52,10 @@ Trk::CaloClusterROI::CaloClusterROI() :
Trk::CaloClusterROI::CaloClusterROI( const Trk::CaloClusterROI& cot) :
m_localParams( new Trk::LocalParameters(*cot.m_localParams) ),
m_surface( cot.m_surface? (cot.m_surface->isFree() ? cot.m_surface->clone():cot.m_surface) : 0),
m_globalpos( new Amg::Vector3D(*cot.m_globalpos) )
m_globalpos( new Amg::Vector3D(*cot.m_globalpos) ),
m_energy(cot.m_energy),
m_phiWidth(cot.m_phiWidth),
m_etaWidth(cot.m_etaWidth)
{
}
......@@ -69,6 +75,9 @@ Trk::CaloClusterROI& Trk::CaloClusterROI::operator=(const Trk::CaloClusterROI& c
m_localParams = new Trk::LocalParameters(*cot.m_localParams);
m_surface = (cot.m_surface? (cot.m_surface->isFree() ? cot.m_surface->clone():cot.m_surface) : 0);
m_globalpos = new Amg::Vector3D(*cot.m_globalpos);
m_energy=cot.m_energy;
m_phiWidth=cot.m_phiWidth;
m_etaWidth=cot.m_etaWidth;
}
return *this;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment