Skip to content
Snippets Groups Projects
Commit 44a9502c authored by Scott Snyder's avatar Scott Snyder Committed by scott snyder
Browse files

MuonGeoModel: Avoid use of non-bound DataHandle.

Deprecating use of non-bound DataHandle, especially non-const.
Also adding const for materials.
parent 3a6e3f12
No related branches found
No related tags found
No related merge requests found
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
*/
/***************************************************************************
......@@ -537,63 +537,6 @@ namespace MuonGM {
}
}
// static void ProcessCSC(const DataHandle<CtbhgeotbWcsc> dhwcsc, const CtbhgeotbWcsc::WCSC * wcsc,
// std::string s)
// {
// MsgStream log(Athena::getMessageSvc(), "MuGM:ProcessCSC");
// Technology* t=NULL;
// t = MYSQL::GetPointer()->GetTechnology(s);
// if ( t != NULL ) return;
// CSC *csc=new CSC(s);
// ncsc++;
// std::cerr << " TECH. A new CSC named " <<s<<" ncsc = "<<ncsc<<std::endl;
// if (ncsc >1)
// {
// log<<MSG::FATAL<<" More than 1 CSC technology in the TB layout ? EXIT";
// return;
// }
// csc->numOfLayers=wcsc->laycsc;
// csc->totalThickness=wcsc->ttotal*CLHEP::cm;
// csc->thickness=csc->totalThickness;
// csc->honeycombthick=wcsc->tnomex*CLHEP::cm;
// csc->g10thick=wcsc->tlag10*CLHEP::cm; //csc->g10thick=0.0820*CLHEP::cm;
// // wire spacing
// csc->wirespacing =wcsc->wispa*CLHEP::cm;
// // anode-cathode distance
// csc->anocathodist=wcsc->dancat*CLHEP::cm;
// // gapbetwcathstrips
// csc->gapbetwcathstrips=wcsc->gstrip*CLHEP::cm;
// // precision (Radial) strip pitch
// csc->cathreadoutpitch=wcsc->pcatr*CLHEP::cm; // it was not used before but set by hand in CscReadoutEl.
// // Azimuthal strip pitch
// csc->phireadoutpitch =wcsc->pcata*CLHEP::cm;
// // number of strips
// csc->nEtastrips = 192;
// csc->nPhistrips = 48;
// // precision (Radial) strip width
// csc->readoutstripswidth = wcsc->wrestr*CLHEP::cm;
// // Azimuthal strip width
// csc->phistripwidth = wcsc->wflstr*CLHEP::cm; // CTB and layout Q interpretation
// //
// // dead materials
// csc->rectwasherthick=wcsc->trrwas*CLHEP::cm;
// csc->roxacellwith = 54.96*CLHEP::mm; // CTB and layout Q: must be computed
// csc->roxwirebargap=wcsc->groxwi*CLHEP::cm;
// csc->fullgasgapwirewidth=wcsc->wgasba*CLHEP::cm;
// csc->fullwirefixbarwidth=wcsc->wfixwi*CLHEP::cm;
// csc->wirebarposx=wcsc->pba1wi*CLHEP::cm;
// csc->wirebarposy=wcsc->pba2wi*CLHEP::cm;
// csc->wirebarposz=wcsc->pba3wi*CLHEP::cm;
// }
template <class TYPEdhwspa, class TYPEwspa>
static void ProcessSPA(const TYPEdhwspa dhwspa, const TYPEwspa * wspa,
std::string s)
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
*/
#ifndef RDBReaderAtlas_H
......@@ -11,7 +11,6 @@
#include <vector>
#include "MuonGeoModel/DBReader.h"
#include "StoreGate/DataHandle.h"
#include "MuonGMdbObjects/DblQ00IAcsc.h"
#include "MuonGMdbObjects/DblQ00Xtomo.h"
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
*/
......@@ -195,35 +195,35 @@ namespace MuonGM {
// if (m_idhfromconverters != 0)
// {
const DataHandle<MdtIdHelper> mdtidh;
const MdtIdHelper* mdtidh = nullptr;
sc = m_pDetStore->retrieve(mdtidh,"MDTIDHELPER");
if (sc.isFailure())log<<MSG::ERROR<<" not found MDT "<<endmsg;
else log<<MSG::INFO<<"MDTIDHELPER retrieved from DetStore"<<endmsg;
m_manager->set_mdtIdHelper(mdtidh);
const DataHandle<RpcIdHelper> rpcidh;
const RpcIdHelper* rpcidh = nullptr;
sc = m_pDetStore->retrieve(rpcidh,"RPCIDHELPER");
if (sc.isFailure() )log<<MSG::ERROR<<" not found RPC "<<endmsg;
else log<<MSG::INFO<<"RPCIDHELPER retrieved from DetStore"<<endmsg;
m_manager->set_rpcIdHelper(rpcidh);
const DataHandle<TgcIdHelper> tgcidh;
const TgcIdHelper* tgcidh = nullptr;
sc = m_pDetStore->retrieve(tgcidh,"TGCIDHELPER");
if (sc.isFailure() )log<<MSG::ERROR<<" not found TGC "<<endmsg;
else log<<MSG::INFO<<"TGCIDHELPER retrieved from DetStore"<<endmsg;
m_manager->set_tgcIdHelper(tgcidh);
const DataHandle<CscIdHelper> cscidh;
const CscIdHelper* cscidh = nullptr;
sc = m_pDetStore->retrieve(cscidh,"CSCIDHELPER");
if (sc.isFailure() )log<<MSG::ERROR<<" not found CSC "<<endmsg;
else log<<MSG::INFO<<"CSCIDHELPER retrieved from DetStore"<<endmsg;
m_manager->set_cscIdHelper(cscidh);
//for nSW
const DataHandle<sTgcIdHelper> stgcidh;
const sTgcIdHelper* stgcidh = nullptr;
sc = m_pDetStore->retrieve(stgcidh,"STGCIDHELPER");
if (sc.isFailure() )log<<MSG::ERROR<<" not found sTGC "<<endmsg;
else log<<MSG::INFO<<"STGCIDHELPER retrieved from DetStore"<<endmsg;
m_manager->set_stgcIdHelper(stgcidh);
const DataHandle<MmIdHelper> mmidh;
const MmIdHelper* mmidh = nullptr;
sc = m_pDetStore->retrieve(mmidh,"MMIDHELPER");
if (sc.isFailure() )log<<MSG::ERROR<<" not found MicroMegas "<<endmsg;
else log<<MSG::INFO<<"MMIDHELPER retrieved from DetStore"<<endmsg;
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
*/
#include "MuonGeoModel/MuonDetectorTool.h"
......@@ -237,7 +237,7 @@ MuonDetectorTool::create()
//
// Locate the top level experiment node
//
DataHandle<GeoModelExperiment> theExpt;
GeoModelExperiment* theExpt = nullptr;
ATH_CHECK( detStore()->retrieve( theExpt, "ATLAS" ) );
if (!m_useCscIntAlines) m_controlCscIntAlines = 0;
......@@ -281,12 +281,6 @@ MuonDetectorTool::create()
}
}
//
// Locate the material manager:
//
DataHandle<StoredMaterialManager> theMaterialManager;
ATH_CHECK( detStore()->retrieve(theMaterialManager, "MATERIALS") );
if (m_dumpMemoryBreakDown)
{
umem = GeoPerfUtils::getMem();
......@@ -340,7 +334,6 @@ MuonDetectorTool::create()
//
GeoPhysVol *world=&*theExpt->getPhysVol();
theFactory.create(world);
// ATH_MSG_INFO("CREATING MuonDetectorNode; MM=" << &*theMaterialManager );
} catch (const std::bad_alloc&) {
ATH_MSG_FATAL("Could not create new MuonDetectorNode!" );
return StatusCode::FAILURE;
......
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