Skip to content
Snippets Groups Projects
Commit 174ea7f4 authored by Administrator's avatar Administrator Committed by Florian Uhlig
Browse files

Fix runtime warnings from TGeant3

While accessing geometry information from TGeant3 a level outside of the
geometry hierarchy was requested.
Exit from loop when needed information is found.

refs #3092
parent 01be99b1
No related branches found
No related tags found
1 merge request!1515Fix runtime warnings from TGeant3
Pipeline #25821 passed
......@@ -120,10 +120,15 @@ int32_t CbmFsdGeoHandler::GetCurrentAddress(TVirtualMC* vmc) const
Int_t upstreamOffset = 0;
while (((TString) vmc->CurrentVolOffName(upstreamOffset)).Length() > 0) {
if (((TString) vmc->CurrentVolOffName(upstreamOffset)).Contains(fUnitStr))
if (((TString) vmc->CurrentVolOffName(upstreamOffset)).Contains(fUnitStr)) {
vmc->CurrentVolOffID(upstreamOffset, unitID);
if (((TString) vmc->CurrentVolOffName(upstreamOffset)).Contains(fModuleStr))
}
if (((TString) vmc->CurrentVolOffName(upstreamOffset)).Contains(fModuleStr)) {
vmc->CurrentVolOffID(upstreamOffset, moduleID);
}
// if module and unit information was found one can
// exit the loop
if (moduleID > -1 && unitID > -1) { break; }
upstreamOffset++;
}
......
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