3434
3535#include " TStopwatch.h"
3636#include " TTimer.h"
37- #include " TGeoPainter.h"
3837#include " TPRegexp.h"
38+ #if ROOT_VERSION_CODE < ROOT_VERSION(6, 37, 0)
39+ #include " TGeoPainter.h"
40+ #else
41+ #include " TGeoChecker.h"
42+ #endif
3943
4044FWOverlapTableManager::FWOverlapTableManager (FWOverlapTableView* v) : FWGeometryTableManagerBase(), m_browser(v) {}
4145
@@ -90,7 +94,11 @@ void FWOverlapTableManager::importOverlaps(std::string iPath, double iPrecision)
9094
9195 int oldS = 0 ;
9296 timer->Start ();
97+ #if ROOT_VERSION_CODE < ROOT_VERSION(6, 37, 0)
9398 geom->GetGeomPainter ()->OpProgress (topVol->GetName (), icheck, ncheck, timer, kFALSE );
99+ #else
100+ geom->GetGeomChecker ()->OpProgress (topVol->GetName (), icheck, ncheck, timer, kFALSE );
101+ #endif
94102 // topVol->CheckOverlaps(iPrecision);
95103 icheck++;
96104 TGeoIterator git (topVol);
@@ -99,7 +107,7 @@ void FWOverlapTableManager::importOverlaps(std::string iPath, double iPrecision)
99107 if (gGeoManager->GetListOfOverlaps()->GetEntriesFast()) {
100108 int newCnt = gGeoManager->GetListOfOverlaps()->GetEntriesFast();
101109 for (int i=0; i<newCnt; ++i) {
102- addOverlapEntry((TGeoOverlap*)gGeoManager->GetListOfOverlaps()->At(i), new TGeoHMatrix(*geom->GetCurrentMatrix()), topNode, next);
110+ addOverlapEntry((TGeoOverlap*)gGeoManager->GetListOfOverlaps()->At(i), new TGeoHMatrix(*geom->GetCurrentMatrix()), topNode, next);
103111 }
104112 oldS= newCnt;
105113 }*/
@@ -136,7 +144,11 @@ void FWOverlapTableManager::importOverlaps(std::string iPath, double iPrecision)
136144 // overlap bits
137145 if (checkingOverlaps) {
138146 if (!node->GetVolume ()->IsSelected ()) {
147+ #if ROOT_VERSION_CODE < ROOT_VERSION(6, 37, 0)
139148 geom->GetGeomPainter ()->OpProgress (node->GetVolume ()->GetName (), icheck + 1 , ncheck, timer, kFALSE );
149+ #else
150+ geom->GetGeomChecker ()->OpProgress (node->GetVolume ()->GetName (), icheck + 1 , ncheck, timer, kFALSE );
151+ #endif
140152 node->GetVolume ()->SelectVolume (kFALSE );
141153
142154 node->GetVolume ()->CheckOverlaps (iPrecision);
@@ -184,7 +196,11 @@ void FWOverlapTableManager::importOverlaps(std::string iPath, double iPrecision)
184196 obj = (TNamed*)overlaps->At (i);
185197 obj->SetName (Form (" ov%05d" , i));
186198 }
199+ #if ROOT_VERSION_CODE < ROOT_VERSION(6, 37, 0)
187200 geom->GetGeomPainter ()->OpProgress (" Check overlaps:" , icheck, ncheck, timer, kTRUE );
201+ #else
202+ geom->GetGeomChecker ()->OpProgress (" Check overlaps:" , icheck, ncheck, timer, kTRUE );
203+ #endif
188204 Info (" CheckOverlaps" , " Number of illegal overlaps/extrusions : %d\n " , novlps);
189205 delete timer;
190206}
@@ -194,7 +210,7 @@ void FWOverlapTableManager::importOverlaps(std::string iPath, double iPrecision)
194210void FWOverlapTableManager::addOverlapEntry (TGeoOverlap* ovl, int ovlIdx, Int_t parentIdx, TGeoHMatrix* motherm) {
195211 // printf("add %s \n", ovl->GetTitle());
196212 // get doughter indices of overlaps
197- /*
213+ /*
198214 TPMERegexp re(" ", "o");
199215 re.Split(TString(ovl->GetTitle()));
200216 printf("add title %s \n", ovl->GetTitle());
@@ -368,9 +384,9 @@ void FWOverlapTableManager::getOverlapTitles(int idx, TString& txt) const {
368384 TGeoOverlap* ovl;
369385 TEveGeoManagerHolder gmgr( FWGeometryTableViewManager::getGeoMangeur());
370386 TIter next_ovl(gGeoManager->GetListOfOverlaps());
371- while((ovl = (TGeoOverlap*)next_ovl()))
387+ while((ovl = (TGeoOverlap*)next_ovl()))
372388 ovl->IsOverlap() ? no++ : ne++;
373-
389+
374390 return Form("%s Ovl[%d] Ext[%d]", data.m_node->GetName(), no, ne);
375391 }
376392 else
@@ -491,4 +507,4 @@ void FWOverlapTableManager::setDaughtersSelfVisibility(int selectedIdx, bool v)
491507
492508 FWGeometryTableManagerBase::getNNodesTotal (parentNode->GetDaughter (n), dOff);
493509 }
494- }
510+ }
0 commit comments