Skip to content

Commit aa6e983

Browse files
authored
Merge pull request #48288 from akritkbehera/geometry-version-compat-637
Updated ROOT geometry version compatibility
2 parents 4686af5 + 18fb2db commit aa6e983

File tree

1 file changed

+21
-20
lines changed

1 file changed

+21
-20
lines changed

Fireworks/Core/src/FWOverlapTableManager.cc

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,3 @@
1-
// -*- C++ -*-
2-
//
3-
// Package: Core
4-
// Class : FWOverlapTableManager
5-
//
6-
// Implementation:
7-
// [Notes on implementation]
8-
//
9-
// Original Author:
10-
// Created: Wed Jan 4 20:31:32 CET 2012
11-
//
12-
13-
// system include files
14-
15-
// user include files
161
#include "Fireworks/Core/src/FWOverlapTableManager.h"
172
#include "Fireworks/Core/src/FWOverlapTableView.h"
183
#include "Fireworks/Core/src/FWEveDigitSetScalableMarker.h"
@@ -34,7 +19,11 @@
3419

3520
#include "TStopwatch.h"
3621
#include "TTimer.h"
22+
#if ROOT_VERSION_CODE < ROOT_VERSION(6, 37, 0)
3723
#include "TGeoPainter.h"
24+
#else
25+
#include "TGeoChecker.h"
26+
#endif
3827
#include "TPRegexp.h"
3928

4029
FWOverlapTableManager::FWOverlapTableManager(FWOverlapTableView* v) : FWGeometryTableManagerBase(), m_browser(v) {}
@@ -90,7 +79,11 @@ void FWOverlapTableManager::importOverlaps(std::string iPath, double iPrecision)
9079

9180
int oldS = 0;
9281
timer->Start();
82+
#if ROOT_VERSION_CODE < ROOT_VERSION(6, 37, 0)
9383
geom->GetGeomPainter()->OpProgress(topVol->GetName(), icheck, ncheck, timer, kFALSE);
84+
#else
85+
geom->GetGeomChecker()->OpProgress(topVol->GetName(), icheck, ncheck, timer, kFALSE);
86+
#endif
9487
// topVol->CheckOverlaps(iPrecision);
9588
icheck++;
9689
TGeoIterator git(topVol);
@@ -99,7 +92,7 @@ void FWOverlapTableManager::importOverlaps(std::string iPath, double iPrecision)
9992
if (gGeoManager->GetListOfOverlaps()->GetEntriesFast()) {
10093
int newCnt = gGeoManager->GetListOfOverlaps()->GetEntriesFast();
10194
for (int i=0; i<newCnt; ++i) {
102-
addOverlapEntry((TGeoOverlap*)gGeoManager->GetListOfOverlaps()->At(i), new TGeoHMatrix(*geom->GetCurrentMatrix()), topNode, next);
95+
addOverlapEntry((TGeoOverlap*)gGeoManager->GetListOfOverlaps()->At(i), new TGeoHMatrix(*geom->GetCurrentMatrix()), topNode, next);
10396
}
10497
oldS= newCnt;
10598
}*/
@@ -136,7 +129,11 @@ void FWOverlapTableManager::importOverlaps(std::string iPath, double iPrecision)
136129
// overlap bits
137130
if (checkingOverlaps) {
138131
if (!node->GetVolume()->IsSelected()) {
132+
#if ROOT_VERSION_CODE < ROOT_VERSION(6, 37, 0)
139133
geom->GetGeomPainter()->OpProgress(node->GetVolume()->GetName(), icheck + 1, ncheck, timer, kFALSE);
134+
#else
135+
geom->GetGeomChecker()->OpProgress(node->GetVolume()->GetName(), icheck + 1, ncheck, timer, kFALSE);
136+
#endif
140137
node->GetVolume()->SelectVolume(kFALSE);
141138

142139
node->GetVolume()->CheckOverlaps(iPrecision);
@@ -184,7 +181,11 @@ void FWOverlapTableManager::importOverlaps(std::string iPath, double iPrecision)
184181
obj = (TNamed*)overlaps->At(i);
185182
obj->SetName(Form("ov%05d", i));
186183
}
184+
#if ROOT_VERSION_CODE < ROOT_VERSION(6, 37, 0)
187185
geom->GetGeomPainter()->OpProgress("Check overlaps:", icheck, ncheck, timer, kTRUE);
186+
#else
187+
geom->GetGeomChecker()->OpProgress("Check overlaps:", icheck, ncheck, timer, kTRUE);
188+
#endif
188189
Info("CheckOverlaps", "Number of illegal overlaps/extrusions : %d\n", novlps);
189190
delete timer;
190191
}
@@ -194,7 +195,7 @@ void FWOverlapTableManager::importOverlaps(std::string iPath, double iPrecision)
194195
void FWOverlapTableManager::addOverlapEntry(TGeoOverlap* ovl, int ovlIdx, Int_t parentIdx, TGeoHMatrix* motherm) {
195196
// printf("add %s \n", ovl->GetTitle());
196197
// get doughter indices of overlaps
197-
/*
198+
/*
198199
TPMERegexp re(" ", "o");
199200
re.Split(TString(ovl->GetTitle()));
200201
printf("add title %s \n", ovl->GetTitle());
@@ -368,9 +369,9 @@ void FWOverlapTableManager::getOverlapTitles(int idx, TString& txt) const {
368369
TGeoOverlap* ovl;
369370
TEveGeoManagerHolder gmgr( FWGeometryTableViewManager::getGeoMangeur());
370371
TIter next_ovl(gGeoManager->GetListOfOverlaps());
371-
while((ovl = (TGeoOverlap*)next_ovl()))
372+
while((ovl = (TGeoOverlap*)next_ovl()))
372373
ovl->IsOverlap() ? no++ : ne++;
373-
374+
374375
return Form("%s Ovl[%d] Ext[%d]", data.m_node->GetName(), no, ne);
375376
}
376377
else
@@ -491,4 +492,4 @@ void FWOverlapTableManager::setDaughtersSelfVisibility(int selectedIdx, bool v)
491492

492493
FWGeometryTableManagerBase::getNNodesTotal(parentNode->GetDaughter(n), dOff);
493494
}
494-
}
495+
}

0 commit comments

Comments
 (0)