Commit d7c66706 authored by Atlas-Software Librarian's avatar Atlas-Software Librarian Committed by Graeme Stewart
Browse files

'CMakeLists.txt' (MuonIdHelpersAlgs-00-04-08)

	* Tagging MuonIdHelpersAlgs-00-04-08.
	* AthenaBaseComps migration.
parent 671732c1
################################################################################
# Package: MuonIdHelpersAlgs
################################################################################
# Declare the package name:
atlas_subdir( MuonIdHelpersAlgs )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Control/AthenaBaseComps
Control/StoreGate
DetectorDescription/Identifier
GaudiKernel
PRIVATE
MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry
MuonSpectrometer/MuonDigitContainer
MuonSpectrometer/MuonIdHelpers )
# Component(s) in the package:
atlas_add_library( MuonIdHelpersAlgsLib
src/*.cxx
PUBLIC_HEADERS MuonIdHelpersAlgs
LINK_LIBRARIES AthenaBaseComps Identifier GaudiKernel StoreGateLib SGtests MuonIdHelpersLib
PRIVATE_LINK_LIBRARIES MuonReadoutGeometry MuonDigitContainer )
atlas_add_component( MuonIdHelpersAlgs
src/components/*.cxx
LINK_LIBRARIES AthenaBaseComps StoreGateLib SGtests Identifier GaudiKernel MuonReadoutGeometry MuonDigitContainer MuonIdHelpersLib MuonIdHelpersAlgsLib )
# Install files from the package:
atlas_install_joboptions( share/*.py )
......@@ -7,7 +7,7 @@
#include <vector>
#include "GaudiKernel/Algorithm.h"
#include "AthenaBaseComps/AthAlgorithm.h"
#include "StoreGate/ActiveStoreSvc.h"
#include "Identifier/Identifier.h"
......@@ -20,7 +20,7 @@ class MuonDetectorManager;
/////////////////////////////////////////////////////////////////////////////
class CscHashId: public Algorithm {
class CscHashId: public AthAlgorithm {
public:
......@@ -37,7 +37,6 @@ private:
private:
StoreGateSvc * m_EvtStore;
const CscIdHelper * m_cscId;
const MuonGM::MuonDetectorManager * m_muon_mgr;
......
......@@ -7,7 +7,7 @@
#include <vector>
#include "GaudiKernel/Algorithm.h"
#include "AthenaBaseComps/AthAlgorithm.h"
#include "Identifier/Identifier.h"
class StoreGateSvc;
......@@ -24,7 +24,7 @@ class MuonDetectorManager;
/////////////////////////////////////////////////////////////////////////////
class TestMuonIdHelpers:public Algorithm {
class TestMuonIdHelpers : public AthAlgorithm {
public:
......@@ -52,8 +52,7 @@ private:
BooleanProperty m_testRPC;
BooleanProperty m_testTGC;
ActiveStoreSvc * m_activeStore;
StoreGateSvc * m_EvtStore;
ServiceHandle<ActiveStoreSvc> m_activeStore;
const MdtIdHelper * m_mdtId;
const CscIdHelper * m_cscId;
const RpcIdHelper * m_rpcId;
......
......@@ -7,6 +7,7 @@ use AtlasPolicy AtlasPolicy-*
use GaudiInterface GaudiInterface-* External
use StoreGate StoreGate-* Control
use AthenaBaseComps AthenaBaseComps-* Control
use Identifier Identifier-* DetectorDescription
......
......@@ -28,8 +28,8 @@ using namespace std;
/////////////////////////////////////////////////////////////////////////////
CscHashId::CscHashId(const std::string& name, ISvcLocator* pSvcLocator) :
Algorithm(name, pSvcLocator),
m_EvtStore(NULL), m_cscId(NULL), m_muon_mgr(NULL)
AthAlgorithm(name, pSvcLocator),
m_cscId(NULL), m_muon_mgr(NULL)
{
}
......@@ -41,27 +41,12 @@ CscHashId::~CscHashId()
StatusCode CscHashId::initialize(){
MsgStream log(msgSvc(), name());
log << MSG::DEBUG << " in initialize()" << endreq;
ATH_MSG_DEBUG( " in initialize()" );
StoreGateSvc* detStore=0;
StatusCode sc = serviceLocator()->service("DetectorStore", detStore);
if (sc.isSuccess()) {
sc = detStore->retrieve( m_muon_mgr );
if (sc.isFailure()) {
log << MSG::ERROR << " Cannot retrieve MuonGeoModelMgr " << endreq;
return sc;
} else {
m_cscId = m_muon_mgr->cscIdHelper();
}
} else {
log << MSG::ERROR << " MuonDetDescrMgr not found in DetectorStore " << endreq;
return sc;
}
ATH_CHECK( detStore()->retrieve( m_muon_mgr ) );
m_cscId = m_muon_mgr->cscIdHelper();
return StatusCode::SUCCESS;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
......@@ -70,31 +55,19 @@ StatusCode CscHashId::initialize(){
StatusCode CscHashId::execute() {
static MsgStream log(msgSvc(), name());
log << MSG::DEBUG << "in execute()" << endreq;
StatusCode sc = StatusCode::SUCCESS;
sc = cscHash();
if (sc.isFailure()) {
log << MSG::ERROR << "Failed to execute CscHashId " << endreq;
}
return sc;
ATH_MSG_DEBUG( "in execute()" );
ATH_CHECK( cscHash() );
return StatusCode::SUCCESS;
}
StatusCode CscHashId::finalize() {
MsgStream log(msgSvc(), name());
log << MSG::DEBUG << "in finalize()" << endreq;
return StatusCode::SUCCESS;
ATH_MSG_DEBUG( "in finalize()" );
return StatusCode::SUCCESS;
}
StatusCode CscHashId::cscHash() {
StatusCode sc;
static MsgStream log(msgSvc(), name());
log << MSG::DEBUG << "in execute(): testing CSC IdHelper" << endreq;
ATH_MSG_DEBUG( "in execute(): testing CSC IdHelper" );
// Loop over csc detector elements and add in the hash ids
std::vector<Identifier> modules = m_cscId->idVector();
......@@ -126,15 +99,14 @@ StatusCode CscHashId::cscHash() {
}
}
else {
log << MSG::ERROR << "Unable to set csc hash id for det elem "
<< "context begin_index = " << moduleContext.begin_index()
<< " context end_index = " << moduleContext.end_index()
<< " the idenitifier is "
<< endreq;
ATH_MSG_ERROR( "Unable to set csc hash id for det elem "
<< "context begin_index = " << moduleContext.begin_index()
<< " context end_index = " << moduleContext.end_index()
<< " the identifier is " );
id.show();
}
} else {
log << MSG::ERROR << "Invalid CSC id " << endreq;
ATH_MSG_ERROR( "Invalid CSC id " );
id.show();
}
}
......
Supports Markdown
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