Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -39,7 +39,6 @@ private:
const InDetDD::SiDetectorElementCollection& m_elements;
float m_epsilonWidth; //tolerance for strip overlap limits.
int m_maxSCT;
InDetDD::SiDetectorElementCollection* m_elemnts;
std::vector<SiElementProperties*>::const_iterator m_propertiesBegin;
};
......
......@@ -20,11 +20,16 @@ use GeoPrimitives GeoPrimitives-* DetectorDescription
private
use AtlasDetDescr AtlasDetDescr-* DetectorDescription
use EventInfo EventInfo-* Event
use xAODEventInfo xAODEventInfo-* Event/xAOD
use InDetBeamSpotService InDetBeamSpotService-* InnerDetector/InDetConditions
use InDetIdentifier InDetIdentifier-* InnerDetector/InDetDetDescr
#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
# needed by trigger using some classes
......
......@@ -18,7 +18,7 @@ namespace InDet{
SiElementProperties::SiElementProperties(const IdentifierHash& idHash,
const SCT_ID& idHelper,
const InDetDD::SiDetectorElement& element,
float epsilonWidth)
float epsilonWidth) : m_neighbours(),m_halfWidth(0)
{
// construct vector of neighbours of this wafer.
......
......@@ -16,41 +16,29 @@
namespace InDet{
SiElementPropertiesTable::SiElementPropertiesTable(const SCT_ID& idHelper,
const InDetDD::SiDetectorElementCollection& elements,
float epsilonWidth)
: m_elements (elements),
m_epsilonWidth (epsilonWidth)
{
m_maxSCT = idHelper.wafer_hash_max();
m_properties.reserve(m_maxSCT);
for (int i = 0; i < m_maxSCT; ++i)
{
IdentifierHash hash(i);
const InDetDD::SiDetectorElement* element = m_elements[hash];
if (element != 0)
{
SiElementProperties* props = new SiElementProperties(hash,
idHelper,
*element,
epsilonWidth);
m_properties[i] = props;
}
else
{
m_properties[i] = 0;
}
}
SiElementPropertiesTable::SiElementPropertiesTable(const SCT_ID& idHelper,
const InDetDD::SiDetectorElementCollection& elements,
float epsilonWidth)
: m_elements(elements),m_epsilonWidth(epsilonWidth){
m_maxSCT = idHelper.wafer_hash_max();
m_properties.reserve(m_maxSCT);
for (int i = 0; i < m_maxSCT; ++i){
IdentifierHash hash(i);
const InDetDD::SiDetectorElement* element = m_elements[hash];
if (element != 0){
SiElementProperties* props = new SiElementProperties(hash, idHelper,*element,epsilonWidth);
m_properties[i] = props;
}else{
m_properties[i] = 0;
}
}
}
//--------------------------------------------------------------------------
SiElementPropertiesTable::~SiElementPropertiesTable()
{
for (int i=0; i < m_maxSCT; ++i)
{
delete m_properties[i];
}
SiElementPropertiesTable::~SiElementPropertiesTable(){
for (int i=0; i < m_maxSCT; ++i){
delete m_properties[i];m_properties[i] =0;
}
}
//--------------------------------------------------------------------------
......
......@@ -40,8 +40,7 @@ ATLAS Collaboration
// general Atlas classes
#include "AtlasDetDescr/AtlasDetectorID.h"
#include "EventInfo/EventID.h"
#include "EventInfo/EventInfo.h"
#include "xAODEventInfo/EventInfo.h"
#include "InDetBeamSpotService/IBeamCondSvc.h"
#include "GaudiKernel/PropertyMgr.h"
......@@ -56,6 +55,8 @@ SiTrackerSpacePointFinder::SiTrackerSpacePointFinder(const std::string& name,
m_spacePointsSCTName ("SCT_SpacePoints"),
m_spacePointsPixelName ("PixelSpacePoints"),
m_spacePointsOverlapName("OverlapSpacePoints"),
m_Sct_clcontainer(nullptr),
m_Pixel_clcontainer(nullptr),
m_selectPixels (true),
m_selectSCTs( true),
m_overlap (true), // process overlaps of SCT wafers.
......@@ -72,6 +73,7 @@ SiTrackerSpacePointFinder::SiTrackerSpacePointFinder(const std::string& name,
m_iBeamCondSvc ("BeamCondSvc",name),
m_event (0),
m_numberOfEvents (0),
m_manager(0),
m_idHelper (0),
m_idHelperPixel (0),
m_properties (0),
......@@ -201,14 +203,14 @@ StatusCode SiTrackerSpacePointFinder::execute()
ATH_MSG_DEBUG( "SiTrackerSpacePointFinder::execute()" );
// Put out info about event.
const DataHandle<EventInfo> eventInfo;
const DataHandle<xAOD::EventInfo> eventInfo;
StatusCode sc = evtStore()->retrieve(eventInfo);
if (sc.isFailure())
{
ATH_MSG_ERROR( "Could not get event" );
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;
......@@ -553,10 +555,7 @@ checkForSCT_Points(const SCT_ClusterCollection* clusters1,
//--------------------------------------------------------------------------
std::string SiTrackerSpacePointFinder::intString(int n)
{
char num[15];
sprintf(num,"%d",n);
std::string str(num);
return str;
return std::to_string(n);
}
//--------------------------------------------------------------------------
......
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