Commit 2b0a17bf authored by Shaun Roe's avatar Shaun Roe Committed by Graeme Stewart
Browse files

fix coverity 14763 (SiSpacePointFormation-01-00-06)

	* Fix coverity 14763
	* tag as SiSpacePointFormation-01-00-06

2014-12-18 David Quarrie <David.Quarrie@cern.ch>
	* cmt/requirements
		Add explicit cmake-specific dependency against VxVertex to avoid indirect dependency from InDetBeamSpotService
		which creates a component library and cmake (correctly) does not propagate such dependencies. This is
		transparent to CMT and checkreq.
	* Tagged as SiSpacePointFormation-01-00-05

2014-11-21 Shaun Roe
	* solve coverity defect reports
	* tag as SiSpacePointFormation-01-00-04

2014-10-27  Vakho Tsulaia  <tsulaia@cern.ch>

	* Migrating to xAOD::EventInfo

2014-10-19 David Quarrie <David.Quarrie@cern.ch>
	* cmt/requirements
...
(Long ChangeLog diff - truncated)
parent 7abd2dc9
...@@ -39,7 +39,6 @@ private: ...@@ -39,7 +39,6 @@ private:
const InDetDD::SiDetectorElementCollection& m_elements; const InDetDD::SiDetectorElementCollection& m_elements;
float m_epsilonWidth; //tolerance for strip overlap limits. float m_epsilonWidth; //tolerance for strip overlap limits.
int m_maxSCT; int m_maxSCT;
InDetDD::SiDetectorElementCollection* m_elemnts;
std::vector<SiElementProperties*>::const_iterator m_propertiesBegin; std::vector<SiElementProperties*>::const_iterator m_propertiesBegin;
}; };
......
...@@ -20,11 +20,16 @@ use GeoPrimitives GeoPrimitives-* DetectorDescription ...@@ -20,11 +20,16 @@ use GeoPrimitives GeoPrimitives-* DetectorDescription
private private
use AtlasDetDescr AtlasDetDescr-* DetectorDescription use AtlasDetDescr AtlasDetDescr-* DetectorDescription
use EventInfo EventInfo-* Event use xAODEventInfo xAODEventInfo-* Event/xAOD
use InDetBeamSpotService InDetBeamSpotService-* InnerDetector/InDetConditions use InDetBeamSpotService InDetBeamSpotService-* InnerDetector/InDetConditions
use InDetIdentifier InDetIdentifier-* InnerDetector/InDetDetDescr use InDetIdentifier InDetIdentifier-* InnerDetector/InDetDetDescr
#use TrkEventPrimitives TrkEventPrimitives-* Tracking/TrkEvent #use TrkEventPrimitives TrkEventPrimitives-* Tracking/TrkEvent
# Add explicit dependency against VxVertex to avoid indirect dependency from InDetBeamSpotService
# which creates a component library and cmake (correctly) does not propagate such dependencies. This
# is transparent to CMT and checkreq.
apply_pattern cmake_add_dependency package=Tracking/TrkEvent/VxVertex
public public
# needed by trigger using some classes # needed by trigger using some classes
......
...@@ -18,7 +18,7 @@ namespace InDet{ ...@@ -18,7 +18,7 @@ namespace InDet{
SiElementProperties::SiElementProperties(const IdentifierHash& idHash, SiElementProperties::SiElementProperties(const IdentifierHash& idHash,
const SCT_ID& idHelper, const SCT_ID& idHelper,
const InDetDD::SiDetectorElement& element, const InDetDD::SiDetectorElement& element,
float epsilonWidth) float epsilonWidth) : m_neighbours(),m_halfWidth(0)
{ {
// construct vector of neighbours of this wafer. // construct vector of neighbours of this wafer.
......
...@@ -16,41 +16,29 @@ ...@@ -16,41 +16,29 @@
namespace InDet{ namespace InDet{
SiElementPropertiesTable::SiElementPropertiesTable(const SCT_ID& idHelper, SiElementPropertiesTable::SiElementPropertiesTable(const SCT_ID& idHelper,
const InDetDD::SiDetectorElementCollection& elements, const InDetDD::SiDetectorElementCollection& elements,
float epsilonWidth) float epsilonWidth)
: m_elements (elements), : m_elements(elements),m_epsilonWidth(epsilonWidth){
m_epsilonWidth (epsilonWidth) m_maxSCT = idHelper.wafer_hash_max();
{ m_properties.reserve(m_maxSCT);
m_maxSCT = idHelper.wafer_hash_max(); for (int i = 0; i < m_maxSCT; ++i){
m_properties.reserve(m_maxSCT); IdentifierHash hash(i);
const InDetDD::SiDetectorElement* element = m_elements[hash];
for (int i = 0; i < m_maxSCT; ++i) if (element != 0){
{ SiElementProperties* props = new SiElementProperties(hash, idHelper,*element,epsilonWidth);
IdentifierHash hash(i); m_properties[i] = props;
const InDetDD::SiDetectorElement* element = m_elements[hash]; }else{
if (element != 0) m_properties[i] = 0;
{ }
SiElementProperties* props = new SiElementProperties(hash, }
idHelper,
*element,
epsilonWidth);
m_properties[i] = props;
}
else
{
m_properties[i] = 0;
}
}
} }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
SiElementPropertiesTable::~SiElementPropertiesTable() SiElementPropertiesTable::~SiElementPropertiesTable(){
{ for (int i=0; i < m_maxSCT; ++i){
for (int i=0; i < m_maxSCT; ++i) delete m_properties[i];m_properties[i] =0;
{ }
delete m_properties[i];
}
} }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
......
...@@ -40,8 +40,7 @@ ATLAS Collaboration ...@@ -40,8 +40,7 @@ ATLAS Collaboration
// general Atlas classes // general Atlas classes
#include "AtlasDetDescr/AtlasDetectorID.h" #include "AtlasDetDescr/AtlasDetectorID.h"
#include "EventInfo/EventID.h" #include "xAODEventInfo/EventInfo.h"
#include "EventInfo/EventInfo.h"
#include "InDetBeamSpotService/IBeamCondSvc.h" #include "InDetBeamSpotService/IBeamCondSvc.h"
#include "GaudiKernel/PropertyMgr.h" #include "GaudiKernel/PropertyMgr.h"
...@@ -56,6 +55,8 @@ SiTrackerSpacePointFinder::SiTrackerSpacePointFinder(const std::string& name, ...@@ -56,6 +55,8 @@ SiTrackerSpacePointFinder::SiTrackerSpacePointFinder(const std::string& name,
m_spacePointsSCTName ("SCT_SpacePoints"), m_spacePointsSCTName ("SCT_SpacePoints"),
m_spacePointsPixelName ("PixelSpacePoints"), m_spacePointsPixelName ("PixelSpacePoints"),
m_spacePointsOverlapName("OverlapSpacePoints"), m_spacePointsOverlapName("OverlapSpacePoints"),
m_Sct_clcontainer(nullptr),
m_Pixel_clcontainer(nullptr),
m_selectPixels (true), m_selectPixels (true),
m_selectSCTs( true), m_selectSCTs( true),
m_overlap (true), // process overlaps of SCT wafers. m_overlap (true), // process overlaps of SCT wafers.
...@@ -72,6 +73,7 @@ SiTrackerSpacePointFinder::SiTrackerSpacePointFinder(const std::string& name, ...@@ -72,6 +73,7 @@ SiTrackerSpacePointFinder::SiTrackerSpacePointFinder(const std::string& name,
m_iBeamCondSvc ("BeamCondSvc",name), m_iBeamCondSvc ("BeamCondSvc",name),
m_event (0), m_event (0),
m_numberOfEvents (0), m_numberOfEvents (0),
m_manager(0),
m_idHelper (0), m_idHelper (0),
m_idHelperPixel (0), m_idHelperPixel (0),
m_properties (0), m_properties (0),
...@@ -201,14 +203,14 @@ StatusCode SiTrackerSpacePointFinder::execute() ...@@ -201,14 +203,14 @@ StatusCode SiTrackerSpacePointFinder::execute()
ATH_MSG_DEBUG( "SiTrackerSpacePointFinder::execute()" ); ATH_MSG_DEBUG( "SiTrackerSpacePointFinder::execute()" );
// Put out info about event. // Put out info about event.
const DataHandle<EventInfo> eventInfo; const DataHandle<xAOD::EventInfo> eventInfo;
StatusCode sc = evtStore()->retrieve(eventInfo); StatusCode sc = evtStore()->retrieve(eventInfo);
if (sc.isFailure()) if (sc.isFailure())
{ {
ATH_MSG_ERROR( "Could not get event" ); ATH_MSG_ERROR( "Could not get event" );
return StatusCode::RECOVERABLE; return StatusCode::RECOVERABLE;
} }
ATH_MSG_DEBUG( "Event number event_" + intString(eventInfo->event_ID()->event_number()) ); ATH_MSG_DEBUG( "Event number event_" + intString(eventInfo->eventNumber()) );
} }
++m_numberOfEvents; ++m_numberOfEvents;
...@@ -553,10 +555,7 @@ checkForSCT_Points(const SCT_ClusterCollection* clusters1, ...@@ -553,10 +555,7 @@ checkForSCT_Points(const SCT_ClusterCollection* clusters1,
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
std::string SiTrackerSpacePointFinder::intString(int n) std::string SiTrackerSpacePointFinder::intString(int n)
{ {
char num[15]; return std::to_string(n);
sprintf(num,"%d",n);
std::string str(num);
return str;
} }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment