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

TRT_TR_Process: 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
*/
//#define ARTRU // Choice of TR generator
......@@ -112,12 +112,12 @@ void TRTTransitionRadiation::Initialize() {
ATH_MSG_FATAL ( "Can not access Detector Store " );
return;
};
DataHandle<StoredMaterialManager> sMaterialManager;
const StoredMaterialManager* sMaterialManager = nullptr;
if (StatusCode::SUCCESS != detStore->retrieve(sMaterialManager, std::string("MATERIALS"))) {
ATH_MSG_FATAL ( "Could not retrieve material manager from Detector Store" );
return;
};
AbsMaterialManager *materialManager = &*sMaterialManager;//TK: figure out why &* (overloaded * ?)
const AbsMaterialManager *materialManager = &*sMaterialManager;//TK: figure out why &* (overloaded * ?)
Geo2G4MaterialFactory geo2g4_material_fact;//Note - this is a very lightweight class!
G4Material *g4mat_Gas(geo2g4_material_fact.Build(materialManager->getMaterial("trt::CO2")));
......
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