Skip to content
Snippets Groups Projects
Commit 26e356af authored by Johnny Raine's avatar Johnny Raine Committed by Graeme Stewart
Browse files

Using AthBaseComps detStore() (SiTrigSpacePointFormation-00-07-14)

	* src/SiTrigSpacePointFinder.cxx
	removed creation of deStore, replaced with AthBaseComps access to detStore()

	* tagged as SiTrigSpacePointFormation-00-07-14

2015-01-12  Johnny Raine <Johnny.Raine@cern.ch>
	* SiTrigSpacePointFinder/SiTrigSpacePointFinder.h, src/SCT_TrigSpacePointTool.h:
	updated inheritance from AlgTool to AthAlgTool.

	* src/SiTrigSpacePointFinder.cxx, src/SCT_TrigSpacePointTool.h:
	updated inheritance from AlgTool to AthAlgTool, using AthMessaging instead of
	directly creating MsgStream objects, and now utilise AthMsgStreamMacros
	for displaying message only if it matches current level.

	* tagged as SiTrigSpacePointFormation-00-07-13

2014-11-09  David Quarrie  <David.Quarrie@cern.ch>
        * cmt/requirements
                Specify to cmake that this package has private header files (transpafrent to CMT)
        * Tagged as SiTrigSpacePointFormation-00-07-12
...
(Long ChangeLog diff - truncated)
parent de9cf5db
No related branches found
No related tags found
No related merge requests found
......@@ -10,9 +10,11 @@ use InDetPrepRawData InDetPrepRawData-* InnerDetector/InDetRecEvent
use TrigInterfaces TrigInterfaces-* Trigger/TrigSteer
use GaudiInterface GaudiInterface-* External
# Inform cmake that this package has private header files (transparent to CMT)
apply_pattern cmake_add_command command="include_directories(src)"
library SiTrigSpacePointFormation *.cxx components/*.cxx
apply_pattern component_library
library SiTrigSpacePointFormation \
*.cxx components/*.cxx
private
#use AthenaKernel AthenaKernel-* Control
......@@ -27,6 +29,7 @@ use TrigSteeringEvent TrigSteeringEvent-* Trigger/TrigEvent
use InDetIdentifier InDetIdentifier-* InnerDetector/InDetDetDescr
use InDetReadoutGeometry InDetReadoutGeometry-* InnerDetector/InDetDetDescr
use EventPrimitives EventPrimitives-* Event
use AthenaBaseComps AthenaBaseComps-* Control
#needed for a header in src
macro_append includes " -I../src "
......
......@@ -2,7 +2,6 @@
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#include "GaudiKernel/AlgTool.h"
#include "SCT_TrigSpacePointTool.h"
// For processing clusters
......@@ -30,7 +29,7 @@ namespace InDet {
SCT_TrigSpacePointTool::SCT_TrigSpacePointTool(const std::string &type,
const std::string &name,
const IInterface *parent) :
AlgTool(type,name,parent),
AthAlgTool(type,name,parent),
m_overlapLimitOpposite(2.8),// overlap limit for opposite-neighbour.
m_overlapLimitPhi(5.64), // overlap limit for phi-neighbours.
m_overlapLimitEtaMin(1.68), // low overlap limit for eta-neighbours.
......@@ -80,15 +79,14 @@ SCT_TrigSpacePointTool::~SCT_TrigSpacePointTool()
{}
//--------------------------------------------------------------------------
StatusCode SCT_TrigSpacePointTool::initialize() {
MsgStream log(msgSvc(), name());
StatusCode sc;
sc = AlgTool::initialize();
sc = AthAlgTool::initialize();
// check StoreGate service
sc = service ("StoreGateSvc", m_storeGate);
if (sc.isFailure()){
log<< MSG::FATAL<< "StoreGate service not found"<<endreq;
msg(MSG::FATAL) << "StoreGate service not found"<<endreq;
return StatusCode::FAILURE;
}
......@@ -96,20 +94,20 @@ StatusCode SCT_TrigSpacePointTool::initialize() {
StoreGateSvc* detStore(0);
sc = service("DetectorStore", detStore);
if (sc.isFailure()) {
log << MSG::FATAL << "Detector service not found !" << endreq;
msg(MSG::FATAL) << "Detector service not found !" << endreq;
return StatusCode::FAILURE;
}
sc = detStore->retrieve(m_manager,"SCT");
if (sc.isFailure()) {
log << MSG::FATAL << "Cannot retrieve SCT_DetectorManager!"
msg(MSG::FATAL) << "Cannot retrieve SCT_DetectorManager!"
<< endreq;
return StatusCode::FAILURE;
}
// Get the SCT Helper
if (detStore->retrieve(m_idHelper, "SCT_ID").isFailure()){
log << MSG::FATAL << "Cannot retrieve SCT_ID helper"<< endreq;
msg(MSG::FATAL) << "Cannot retrieve SCT_ID helper"<< endreq;
return StatusCode::FAILURE;
}
......@@ -123,7 +121,7 @@ StatusCode SCT_TrigSpacePointTool::initialize() {
*elements,
m_epsWidth);
if (sc.isFailure()) {
log << MSG::FATAL << "Cannot retrieve detector elements"
msg(MSG::FATAL) << "Cannot retrieve detector elements"
<< endreq;
return StatusCode::FAILURE;
}
......@@ -131,7 +129,7 @@ StatusCode SCT_TrigSpacePointTool::initialize() {
sc = toolSvc()->retrieveTool(m_SiSpacePointMakerToolName,
m_SiSpacePointMakerTool, this);
if (sc.isFailure()) {
log << MSG::FATAL << "Unable to locate SiSpacePointMakerTool "
msg(MSG::FATAL) << "Unable to locate SiSpacePointMakerTool "
<< m_SiSpacePointMakerToolName << endreq;
return StatusCode::FAILURE;
}
......@@ -139,10 +137,10 @@ StatusCode SCT_TrigSpacePointTool::initialize() {
if (!m_overrideBS){
if ( m_iBeamCondSvc.retrieve().isFailure()){
log << MSG::ERROR << "Could not find BeamCondSvc." << m_iBeamCondSvc << endreq;
msg(MSG::ERROR) << "Could not find BeamCondSvc." << m_iBeamCondSvc << endreq;
return sc;
} else {
log << MSG::INFO << "Retrieved beam spot service " << m_iBeamCondSvc << endreq;
msg(MSG::INFO) << "Retrieved beam spot service " << m_iBeamCondSvc << endreq;
}
}
......@@ -150,7 +148,7 @@ StatusCode SCT_TrigSpacePointTool::initialize() {
}
//--------------------------------------------------------------------------
StatusCode SCT_TrigSpacePointTool::finalize() {
StatusCode sc = AlgTool::finalize();
StatusCode sc = AthAlgTool::finalize();
delete m_properties; m_properties=0;
return sc;
}
......@@ -173,25 +171,22 @@ addSCT_SpacePoints(const SCT_ClusterCollection* clusCollection,
SpacePointCollection* spacepointCollection,
SpacePointOverlapCollection* overlapColl) {
MsgStream log(msgSvc(), name());
m_Sct_clcontainer = clusterContainer;
m_spacepointoverlapCollection = overlapColl;
if(!m_Sct_clcontainer || m_Sct_clcontainer->size() <1){
log << MSG::ERROR << " Received an invalid cluster container "
msg(MSG::ERROR) << " Received an invalid cluster container "
<< endreq;
return;
}
if(!clusCollection){
log << MSG::ERROR << " Received an invalid cluster collection "
msg(MSG::ERROR) << " Received an invalid cluster collection "
<< endreq;
return;
}
if(clusCollection->size()==0){
log << MSG::ERROR << " Received empty cluster collection" << endreq;
msg(MSG::ERROR) << " Received empty cluster collection" << endreq;
return;
}
......
......@@ -26,7 +26,7 @@
#ifndef SCT_TrigSpacePointTool_H
#define SCT_TrigSpacePointTool_H
#include "GaudiKernel/AlgTool.h"
#include "AthenaBaseComps/AthAlgTool.h"
#include "GaudiKernel/MsgStream.h"
#include "Identifier/IdentifierHash.h"
......@@ -63,7 +63,7 @@ namespace InDet {
class SCT_TrigSpacePointTool : virtual public ITrigSCT_SpacePointTool,
public AlgTool {
public AthAlgTool {
public:
......
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