Commit b1bf430b authored by Jochen Meyer's avatar Jochen Meyer Committed by Graeme Stewart
Browse files

addressing coverity defect (MuonGeoModel-01-08-12)

	* tagging MuonGeoModel-01-08-12
	* addressing coverity defect 11646

2015-05-11  Jochen Meyer  <jomeyer@mail.cern.ch>

	* tagging MuonGeoModel-01-08-11
	* addressing coverity defects 28671, 11646
parent 87b36dd8
......@@ -1733,7 +1733,7 @@ template <class TYPEdnacut, class TYPEacut, class TYPEdnalin, class TYPEalin,
Station* stat = mysql->GetStation(name);
if (stat == NULL)
{
if( c!= NULL ) delete c; c = NULL;
delete c; c = NULL;
log<<MSG::ERROR<<" station "
<<name<<" not found! "<<endreq;
continue;
......
......@@ -47,7 +47,7 @@ public:
inline void setCutoutsBogFlag(int );
inline void setCtbBisFlag(int );
inline void setRDBAccess(IRDBAccessSvc* access);
inline void setAltAsciiDBMap(const AltAsciiDBMap* asciidbmap);
inline void setAltAsciiDBMap(const AltAsciiDBMap asciidbmap);
inline void setUseRDB(int rdb);
inline void setControlAlines(int cA);
inline void setMinimalGeoFlag(int minimalGeo);
......@@ -98,7 +98,7 @@ private:
MuonDetectorManager* m_manager;
StoreGateSvc* m_pDetStore;
IRDBAccessSvc* m_pRDBAccess;
const AltAsciiDBMap* m_altAsciiDBMap;
AltAsciiDBMap m_altAsciiDBMap;
};
......@@ -113,7 +113,7 @@ void MuonDetectorFactory001::setCutoutsBogFlag(int flag) {m_includeCutoutsBog =
void MuonDetectorFactory001::setCtbBisFlag(int flag) {m_includeCtbBis = flag;}
void MuonDetectorFactory001::setUseRDB(int rdb) {m_rdb = rdb;}
void MuonDetectorFactory001::setRDBAccess(IRDBAccessSvc* access) {m_pRDBAccess = access;}
void MuonDetectorFactory001::setAltAsciiDBMap(const AltAsciiDBMap* asciidbmap) {m_altAsciiDBMap = asciidbmap;}
void MuonDetectorFactory001::setAltAsciiDBMap(AltAsciiDBMap asciidbmap) { std::swap(m_altAsciiDBMap,asciidbmap); }
void MuonDetectorFactory001::setControlAlines(int cA) {m_controlAlines = cA;}
void MuonDetectorFactory001::setMinimalGeoFlag(int minimalGeo) {m_minimalGeoFlag = minimalGeo;}
void MuonDetectorFactory001::setControlCscIntAlines(int cA) {m_controlCscIntAlines = cA;}
......
......@@ -89,7 +89,7 @@ namespace MuonGM {
m_minimalGeoFlag(0), m_controlCscIntAlines(0), m_dumpAlines(false), m_dumpCscIntAlines(false),
m_useCscIntAlinesFromGM(true), m_caching(0), m_cacheFillingFlag(0), m_mdtDeformationFlag(0),
m_mdtAsBuiltParaFlag(0), m_dumpMemoryBreakDown(false), m_muon(NULL), m_manager(NULL),
m_pDetStore(pDetStore), m_pRDBAccess(0), m_altAsciiDBMap(0)
m_pDetStore(pDetStore), m_pRDBAccess(0)
{
MsgStream log(Athena::getMessageSvc(), "MuonGeoModel");
m_muon = new MuonSystemDescription( "MuonSystem" );
......@@ -419,7 +419,7 @@ namespace MuonGM {
//dbr = new RDBReaderAtlas(m_pDetStore, m_pRDBAccess, OracleTag, OracleNode);
if (log.level()<=MSG::DEBUG) log<<MSG::DEBUG<<"calling RDBReaderAtlas with m_altAsciiDBMap"<<endreq;
dbr = new RDBReaderAtlas(m_pDetStore, m_pRDBAccess, OracleTag, OracleNode, m_dumpAlines, m_useCscIntAlinesFromGM, m_dumpCscIntAlines, m_altAsciiDBMap);
dbr = new RDBReaderAtlas(m_pDetStore, m_pRDBAccess, OracleTag, OracleNode, m_dumpAlines, m_useCscIntAlinesFromGM, m_dumpCscIntAlines, &m_altAsciiDBMap);
RDBReaderAtlas* thisDbr = (RDBReaderAtlas*)dbr;
thisDbr->setControlCscIntAlines(m_controlCscIntAlines);
......
......@@ -238,7 +238,7 @@ MuonDetectorTool::create( StoreGateSvc* detStore )
std::string detectorNode = MuonVersion.empty() ? "ATLAS" : "MuonSpectrometer";
msg(MSG::INFO)<<"Keys for Muon Switches are (key) " << detectorKey << " (node) " << detectorNode << endreq;
std::map<std::string,std::string>* altAsciiDBMap=0;
std::map<std::string,std::string> altAsciiDBMap = std::map<std::string,std::string>();
if ( MuonVersion == "CUSTOM" )
msg( MSG::WARNING )<< "Detector Information coming from a custom configuration !!" << endreq;
else
......@@ -263,11 +263,10 @@ MuonDetectorTool::create( StoreGateSvc* detStore )
// use ascii file to read in ASZT parameters
if (m_altAsztFile != "" || m_altCscIntAlinesFile != "" )
{
altAsciiDBMap=new std::map<std::string,std::string>;
if (m_altAsztFile != "" )
altAsciiDBMap->insert(std::make_pair("ASZT",m_altAsztFile));
altAsciiDBMap.insert(std::make_pair("ASZT",m_altAsztFile));
if (m_altCscIntAlinesFile != "")
altAsciiDBMap->insert(std::make_pair("IACSC",m_altCscIntAlinesFile));
altAsciiDBMap.insert(std::make_pair("IACSC",m_altCscIntAlinesFile));
}
}
......@@ -278,7 +277,6 @@ MuonDetectorTool::create( StoreGateSvc* detStore )
DataHandle<GeoModelExperiment> theExpt;
if (StatusCode::SUCCESS != detStore->retrieve( theExpt, "ATLAS" ))
{
if( altAsciiDBMap != NULL ) { delete altAsciiDBMap; altAsciiDBMap = NULL; }
msg(MSG::ERROR)
<< "Could not find GeoModelExperiment ATLAS"
<< endreq;
......@@ -312,7 +310,6 @@ MuonDetectorTool::create( StoreGateSvc* detStore )
<< " **** SelectedStJzz size =" << m_selectedStations.size()<<endreq
<< " **** SelectedStJff size =" << m_selectedStations.size()<<endreq
<< " **** while StationSelection = 1"<< endreq;
if( altAsciiDBMap != NULL ) { delete altAsciiDBMap; altAsciiDBMap = NULL; }
return( StatusCode::FAILURE );
}
for (unsigned int i=0; i<m_selectedStations.size() ; i++){
......@@ -485,11 +482,6 @@ MuonDetectorTool::create( StoreGateSvc* detStore )
// std::string afn = m_condDataTool->aLineFolderName();
// log << MSG::INFO << "A-line folder name is "<<afn << endreq;
if (altAsciiDBMap)
{
delete altAsciiDBMap;
altAsciiDBMap = 0;
}
}
if (m_dumpMemoryBreakDown)
......
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