Skip to content

Commit 98aa8ba

Browse files
committed
1 parent 43962df commit 98aa8ba

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

fairroot/base/sim/FairModule.cxx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include "FairVolumeList.h" // for FairVolumeList
2727

2828
#include <TBuffer.h> // for TBuffer, operator<<, etc
29-
#include <TCollection.h> // for TIter
29+
#include <TCollection.h> // for TIter, TRangeDynCast
3030
#include <TDirectory.h> // for TDirectory::TContext
3131
#include <TFile.h> // for TFile
3232
#include <TGeoManager.h> // for TGeoManager, gGeoManager
@@ -198,7 +198,7 @@ void FairModule::SetGeometryFileName(TString fname, TString)
198198
fgeoName = "";
199199
}
200200

201-
void FairModule::ProcessNodes(TList* aList)
201+
void FairModule::ProcessNodes(TList* nodes)
202202
{
203203
if (FairMCApplicationState::kConstructGeometry != FairMCApplication::Instance()->GetState()) {
204204
LOG(fatal) << "Detected call to FairModule::ProcessNodes() \
@@ -211,14 +211,14 @@ void FairModule::ProcessNodes(TList* aList)
211211
vList = new FairVolumeList();
212212
}
213213

214-
TListIter iter(aList);
215-
FairGeoNode* node = nullptr;
216214
FairGeoNode* MotherNode = nullptr;
217215
FairRuntimeDb* rtdb = FairRun::Instance()->GetRuntimeDb();
218216
FairGeoParSet* par = static_cast<FairGeoParSet*>(rtdb->getContainer("FairGeoParSet"));
219217
TObjArray* fNodes = par->GetGeoNodes();
220-
while ((node = static_cast<FairGeoNode*>(iter.Next()))) {
221-
218+
for (auto node : TRangeDynCast<FairGeoNode>(nodes)) {
219+
if (!node) {
220+
continue;
221+
}
222222
node->calcLabTransform();
223223
MotherNode = node->getMotherNode();
224224
auto nodeTruncName = node->getTruncName();

0 commit comments

Comments
 (0)