CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
FWOverlapTableManager Class Reference

#include <Fireworks/Core/interface/FWOverlapTableManager.h>

Inheritance diagram for FWOverlapTableManager:
FWGeometryTableManagerBase FWTableManagerBase

Classes

class  QuadId
 

Public Types

enum  OverlapBits { kVisMarker = BIT(5), kOverlap = BIT(6), kOverlapChild = BIT(7) }
 
- Public Types inherited from FWGeometryTableManagerBase
enum  Bits {
  kExpanded = BIT(0), kVisNodeSelf = BIT(1), kVisNodeChld = BIT(2), kHighlighted = BIT(3),
  kSelected = BIT(4)
}
 
typedef Entries_v::iterator Entries_i
 
typedef std::vector< NodeInfoEntries_v
 

Public Member Functions

FWTableCellRendererBasecellRenderer (int iSortedRowNumber, int iCol) const
 
 FWOverlapTableManager (FWOverlapTableView *)
 
void getOverlapTitles (int, TString &) const
 
virtual std::vector< std::string > getTitles () const
 returns the title names for each column More...
 
void importOverlaps (std::string path, double precision)
 
virtual int numberOfColumns () const
 Number of columns in the table. More...
 
void printOverlaps (int) const
 
virtual void recalculateVisibility ()
 
virtual void recalculateVisibilityNodeRec (int)
 
void setDaughtersSelfVisibility (int i, bool v)
 
virtual ~FWOverlapTableManager ()
 
- Public Member Functions inherited from FWGeometryTableManagerBase
void applyTransparencyFromEditor ()
 
void cancelEditor (bool)
 
virtual bool cellDataIsSortable () const
 
virtual const char * cellName (const NodeInfo &) const
 
bool firstColumnClicked (int row, int xPos)
 
 FWGeometryTableManagerBase ()
 
 FWGeometryTableManagerBase (const FWGeometryTableManagerBase &)
 
int getLevelOffset () const
 
void getNodeMatrix (const NodeInfo &nodeInfo, TGeoHMatrix &mat) const
 
void getNodePath (int, std::string &) const
 
NodeInfogetSelected ()
 
virtual bool getVisibility (const NodeInfo &nodeInfo) const
 
virtual bool getVisibilityChld (const NodeInfo &nodeInfo) const
 
virtual void implSort (int, bool)
 Called by 'sort' method to actually handle the sorting of the rows. Arguments are the same as 'sort'. More...
 
bool isNodeRendered (int idx, int top_node_idx) const
 
void loadGeometry (TGeoNode *, TObjArray *)
 
bool nodeImported (int idx) const
 
virtual int numberOfRows () const
 Number of rows in the table. More...
 
const FWGeometryTableManagerBaseoperator= (const FWGeometryTableManagerBase &)
 
void redrawTable (bool setExpand=false)
 
Entries_vrefEntries ()
 
NodeInforefEntry (int i)
 
std::vector< int > rowToIndex ()
 
void setBackgroundToWhite (bool)
 
void setCellValueEditor (TGTextEntry *editor)
 
void setDaughtersSelfVisibility (bool)
 
void setLevelOffset (int x)
 
virtual void setVisibility (NodeInfo &, bool)
 
virtual void setVisibilityChld (NodeInfo &, bool)
 
void showEditor (int)
 
virtual const std::string title () const
 
virtual int unsortedRowNumber (int unsorted) const
 when passed the index to the sorted order of the rows it returns the original row number from the underlying data More...
 
virtual ~FWGeometryTableManagerBase ()
 
- Public Member Functions inherited from FWTableManagerBase
virtual void buttonPressedInRowHeader (Int_t row, Event_t *event, Int_t relX, Int_t relY)
 Called if mouse button pressed in Row Header, defaults is to do nothing. More...
 
virtual void buttonReleasedInRowHeader (Int_t row, Event_t *event, Int_t relX, Int_t relY)
 
virtual unsigned int cellHeight () const
 require all cells to be the same height More...
 
 ClassDef (FWTableManagerBase, 0)
 
void dataChanged ()
 Classes which inherit from FWTableManagerBase must call this when their underlying data changes. More...
 
 FWTableManagerBase ()
 
virtual bool hasLabelHeaders () const
 
virtual bool hasRowHeaders () const
 Returns 'true' if this table has row headers. Defaults return value is false. More...
 
virtual std::vector< unsigned int > maxWidthForColumns () const
 for each column in the table this returns the present maximum width for that column More...
 
virtual FWTableCellRendererBaserowHeader (int iSortedRowNumber) const
 Returns the renderer for the row header for the sorted row number iSortedRowNumber. More...
 
void sort (int iCol, bool iSortOrder)
 Call to have table sorted on values in column iCol with the sort order being descending if iSortOrder is 'true'. More...
 
int sortColumn (void)
 The current sort column. More...
 
bool sortOrder (void)
 The current sort order for the table. More...
 
void visualPropertiesChanged ()
 Classes which inherit from FWTableManagerBase must call this when how the data is shown (e.g. color) changes. More...
 
virtual ~FWTableManagerBase ()
 

Protected Member Functions

virtual bool nodeIsParent (const NodeInfo &) const
 

Private Member Functions

void addOverlapEntry (TGeoOverlap *, int, int, TGeoHMatrix *)
 
 FWOverlapTableManager (const FWOverlapTableManager &)
 
const FWOverlapTableManageroperator= (const FWOverlapTableManager &)
 

Private Attributes

FWOverlapTableViewm_browser
 
std::multimap< int, int > m_mapNodeOverlaps
 

Additional Inherited Members

- Static Public Member Functions inherited from FWGeometryTableManagerBase
static void getNNodesTotal (TGeoNode *geoNode, int &off)
 
- Public Attributes inherited from FWGeometryTableManagerBase
ColorBoxRenderer m_colorBoxRenderer
 
TGTextEntry * m_editor
 
int m_editTransparencyIdx
 
Entries_v m_entries
 
TGGC * m_highlightContext
 
int m_highlightIdx
 
int m_levelOffset
 
FWTextTreeCellRenderer m_renderer
 
std::vector< int > m_row_to_index
 

Detailed Description

Description: [one line class summary]

Usage: <usage>

Definition at line 34 of file FWOverlapTableManager.h.

Member Enumeration Documentation

Enumerator
kVisMarker 
kOverlap 
kOverlapChild 

Definition at line 37 of file FWOverlapTableManager.h.

Constructor & Destructor Documentation

FWOverlapTableManager::FWOverlapTableManager ( FWOverlapTableView v)

Definition at line 41 of file FWOverlapTableManager.cc.

41  :
43  m_browser(v)
44 {
45 }
FWOverlapTableView * m_browser
FWOverlapTableManager::~FWOverlapTableManager ( )
virtual

Definition at line 47 of file FWOverlapTableManager.cc.

48 {
49 }
FWOverlapTableManager::FWOverlapTableManager ( const FWOverlapTableManager )
private

Member Function Documentation

void FWOverlapTableManager::addOverlapEntry ( TGeoOverlap *  ,
int  ,
int  ,
TGeoHMatrix *   
)
private

Definition at line 213 of file FWOverlapTableManager.cc.

References fwLog, FWGeometryTableViewBase::getMarker(), FWGeometryTableManagerBase::getNNodesTotal(), FWGeometryTableViewBase::getTopNodeIdx(), i, j, fwlog::kInfo, kOverlap, kOverlapChild, FWGeometryTableManagerBase::kVisNodeChld, FWGeometryTableManagerBase::kVisNodeSelf, m_browser, FWGeometryTableManagerBase::m_entries, m_mapNodeOverlaps, FWOverlapTableManager::QuadId::m_nodes, and n.

Referenced by importOverlaps().

214 {
215 
216  // printf("add %s \n", ovl->GetTitle());
217  // get doughter indices of overlaps
218  /*
219  TPMERegexp re(" ", "o");
220  re.Split(TString(ovl->GetTitle()));
221  printf("add title %s \n", ovl->GetTitle());
222  */
223  int pcnt = parentIdx+1;
224  int dOff =0;
225  TGeoNode* mothern = m_entries[parentIdx].m_node;
226 
227  QuadId* quid = new QuadId(ovl, parentIdx);
228 
229  for (int i = 0; i < mothern->GetNdaughters(); ++i)
230  {
231  TGeoNode* n = mothern->GetDaughter(i);
232 
233  int cnt = pcnt + i+dOff;
234 
235  if (ovl->IsOverlap()) {
236  if (n->GetVolume() == ovl->GetFirstVolume() && (*(ovl->GetFirstMatrix()) == *(n->GetMatrix())))
237  {
238  // std::string x = re[0].Data();
239  //if (x.find(n->GetName()) == std::string::npos) printf("ERROT \n");
240 
241  m_entries[cnt].setBit(kOverlap);
242  m_entries[cnt].setBit(kVisNodeSelf);
243  m_mapNodeOverlaps.insert(std::pair<int, int>(cnt, ovlIdx));
244  int nno; n->GetOverlaps(nno);
245  nno |= BIT(1); n->SetOverlaps(0, nno);
246  quid->m_nodes.push_back(cnt);
247  }
248  }
249 
250  if (n->GetVolume() == ovl->GetSecondVolume() && (*(ovl->GetSecondMatrix()) == *(n->GetMatrix())))
251  {
252  //printf("-----------------------------------------------\n");
253  // std::string x = re[2].Data();
254  // if (x.find(n->GetName()) == std::string::npos) printf("ERROT \n");
255 
256  m_entries[cnt].setBit(kOverlap);
257  m_entries[cnt].setBit(kVisNodeSelf);
258 
259  m_mapNodeOverlaps.insert(std::pair<int, int>(cnt, ovlIdx));
260  int nno; n->GetOverlaps(nno);
261  nno |= (ovl->IsOverlap() ? BIT(1) : BIT(2));
262  n->SetOverlaps(0, nno);
263 
264  quid->m_nodes.push_back(cnt);
265 
266  }
267 
268 
270  }
271 
272  TPolyMarker3D* pm = ovl->GetPolyMarker();
273  for (int j=0; j<pm->GetN(); ++j )
274  {
275  double pl[3];
276  double pg[3];
277  pm->GetPoint(j, pl[0], pl[1], pl[2]);
278  motherm->LocalToMaster(pl, pg);
279 
280  float dx = TMath::Abs(ovl->GetOverlap());
281  if (dx > 1e5)
282  {
283  fwLog(fwlog::kInfo) << Form("WARNING [%s], overlap size = %.1f \n", ovl->GetTitle(), dx);
284  dx = 10;
285  }
286  float dy = dx, dz = 0;
287  float fp[3]; fp[0] = pg[0];fp[1] = pg[1];fp[2] = pg[2];
288  float bb[12] = {
289  fp[0] +dx, fp[1] -dy, fp[2] -dz,
290  fp[0] +dx, fp[1] +dy, fp[2] +dz,
291  fp[0] -dx, fp[1] +dy, fp[2] +dz,
292  fp[0] -dx, fp[1] -dy, fp[2] -dz
293  };
294  m_browser->getMarker()->AddQuad(&bb[0]);
295  m_browser->getMarker()->QuadId(quid);
296  }
297 
298 
299  int aIdx = parentIdx; int aLev = m_entries[aIdx].m_level;
300  int topNodeIdx = m_browser->getTopNodeIdx();
301 
302  while(aIdx > topNodeIdx)
303  {
304  aIdx--;
305  if (m_entries[aIdx].m_level < aLev)
306  {
307  m_entries[aIdx].setBit(kOverlapChild);
308  m_entries[aIdx].setBit(kVisNodeChld);
309  // printf("stamp %s \n", m_entries[aIdx].name());
310  aLev--;
311  }
312  }
313 }
int i
Definition: DBlmapReader.cc:9
std::multimap< int, int > m_mapNodeOverlaps
FWEveDigitSetScalableMarker * getMarker()
int j
Definition: DBlmapReader.cc:9
static void getNNodesTotal(TGeoNode *geoNode, int &off)
#define fwLog(_level_)
Definition: fwLog.h:51
FWOverlapTableView * m_browser
FWTableCellRendererBase * FWOverlapTableManager::cellRenderer ( int  iSortedRowNumber,
int  iCol 
) const
virtual
Returns the particular renderer used to handle the requested cell.  Arguments:

iSortedRowNumber: the row number from the present sort (i.e. the cell number of the view) iCol: the column number of the cell. The returned value must be used immediately and not held onto since the same Renderer can be used for subsequent calls

Implements FWTableManagerBase.

Definition at line 412 of file FWOverlapTableManager.cc.

References dtNoiseDBValidation_cfg::cerr, data, FWGeometryTableViewManager::getGeoMangeur(), FWGeometryTableViewBase::getTopNodeIdx(), FWTextTreeCellRenderer::iconWidth(), FWGeometryTableManagerBase::kExpanded, FWGeometryTableManagerBase::kHighlighted, kOverlap, FWGeometryTableManagerBase::kSelected, FWGeometryTableManagerBase::kVisNodeChld, FWGeometryTableManagerBase::kVisNodeSelf, testEve_cfg::level, FWOverlapTableView::listAllNodes(), m_browser, FWGeometryTableManagerBase::NodeInfo::m_color, FWGeometryTableManagerBase::m_colorBoxRenderer, FWGeometryTableManagerBase::m_editTransparencyIdx, FWGeometryTableManagerBase::m_entries, FWGeometryTableManagerBase::m_highlightContext, FWGeometryTableManagerBase::NodeInfo::m_level, FWGeometryTableManagerBase::m_levelOffset, m_mapNodeOverlaps, FWGeometryTableManagerBase::NodeInfo::m_node, FWGeometryTableManagerBase::m_renderer, FWGeometryTableManagerBase::m_row_to_index, FWGeometryTableManagerBase::NodeInfo::m_transparency, FWGeometryTableManagerBase::NodeInfo::name(), Vispa.Plugins.EdmBrowser.EdmDataAccessor::ne(), nodeIsParent(), FWTextTableCellRenderer::setData(), FWGeometryTableManagerBase::ColorBoxRenderer::setData(), FWTextTreeCellRenderer::setIndentation(), FWTextTreeCellRenderer::setIsOpen(), FWTextTreeCellRenderer::setIsParent(), FWTextTreeCellRenderer::showEditor(), AlCaHLTBitMon_QueryRunRegistry::string, FWGeometryTableManagerBase::NodeInfo::testBit(), and x.

413 {
414  if (m_row_to_index.empty()) return &m_renderer;
415 
416  int unsortedRow = m_row_to_index[iSortedRowNumber];
417 
418  if (unsortedRow < 0) printf("!!!!!!!!!!!!!!!! error %d %d \n",unsortedRow, iSortedRowNumber);
419 
420  // editor state
421  //
422  m_renderer.showEditor(unsortedRow == m_editTransparencyIdx && iCol == 2);
423 
424 
425  // selection state
426  //
427  const NodeInfo& data = m_entries[unsortedRow];
428 
429  bool isSelected = data.testBit(kHighlighted) || data.testBit(kSelected);
430  if (m_browser->listAllNodes()) isSelected = isSelected || data.testBit(kOverlap);
431 
432  if (data.testBit(kSelected))
433  {
434  m_highlightContext->SetBackground(0xc86464);
435  }
436  else if (data.testBit(kHighlighted) )
437  {
438  m_highlightContext->SetBackground(0x6464c8);
439  }
440  else if (m_browser->listAllNodes() && data.testBit(kOverlap) )
441  {
442  m_highlightContext->SetBackground(0xdddddd);
443  }
444 
445 
446  // set column content
447  //
448  if (iCol == 0)
449  {
450  if (unsortedRow == m_browser->getTopNodeIdx())
451  {
452  int no = 0, ne =0;
453  TEveGeoManagerHolder gmgr( FWGeometryTableViewManager::getGeoMangeur());
454  TIter next_ovl(gGeoManager->GetListOfOverlaps());
455  const TGeoOverlap* ovl;
456  while((ovl = (TGeoOverlap*)next_ovl()))
457  ovl->IsOverlap() ? no++ : ne++;
458 
459  m_renderer.setData(Form("%s Ovl[%d] Ext[%d]", data.m_node->GetName(), no, ne), isSelected);
460  }
461  else {
462  m_renderer.setData(data.name(), isSelected);
463  }
465 
467 
468  int level = data.m_level - m_levelOffset;
469  if (nodeIsParent(data))
470  m_renderer.setIndentation(20*level);
471  else
473  }
474  else
475  {
476  m_renderer.setIsParent(false);
478 
479  if (iCol == 5)
480  {
481  if (data.testBit(kOverlap) )
482  {
483  std::string x;
484  std::pair<std::multimap<int, int>::const_iterator, std::multimap<int, int>::const_iterator> ppp;
485  ppp = m_mapNodeOverlaps.equal_range(unsortedRow);
486 
487  TEveGeoManagerHolder gmgr( FWGeometryTableViewManager::getGeoMangeur());
488 
489  for (std::multimap<int, int>::const_iterator it2 = ppp.first;it2 != ppp.second;++it2) {
490  const TGeoOverlap* ovl = (const TGeoOverlap*) gGeoManager->GetListOfOverlaps()->At((*it2).second);
491  if (ovl)
492  x += Form("%s: %g ", ovl->IsOverlap() ? "Ovl" : "Extr", ovl->GetOverlap());
493  else
494  x += "err";
495 
496  }
497  m_renderer.setData(x, isSelected);
498  }
499  else
500  {
501  m_renderer.setData("", isSelected);
502  }
503  }
504  if (iCol == 1)
505  {
506  m_colorBoxRenderer.setData(data.m_color, isSelected);
507  return &m_colorBoxRenderer;
508  }
509  else if (iCol == 2 )
510  {
511  m_renderer.setData(Form("%d", 100 -data.m_transparency), isSelected);
512  }
513  else if (iCol == 3 )
514  {
515  m_renderer.setData(data.testBit(kVisNodeSelf) ? "On" : "-", isSelected );
516 
517  }
518  else if (iCol == 4 )
519  {
520  m_renderer.setData(data.testBit(kVisNodeChld) ? "On" : "-", isSelected);
521 
522  }
523  else if (iCol == 6)
524  {
525  std::cerr << "This shoud not happen! \n" ;
526  }
527  }
528  return &m_renderer;
529 }
std::multimap< int, int > m_mapNodeOverlaps
bool listAllNodes() const
virtual void setIndentation(int indentation=0)
void setData(const std::string &, bool isSelected)
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
tuple level
Definition: testEve_cfg.py:34
Definition: DDAxes.h:10
virtual bool nodeIsParent(const NodeInfo &) const
FWOverlapTableView * m_browser
virtual void showEditor(bool value)
void FWOverlapTableManager::getOverlapTitles ( int  idx,
TString &  txt 
) const

Definition at line 370 of file FWOverlapTableManager.cc.

References FWGeometryTableViewManager::getGeoMangeur(), and m_mapNodeOverlaps.

371 {
372 
373  TEveGeoManagerHolder gmgr( FWGeometryTableViewManager::getGeoMangeur());
374  std::pair<std::multimap<int, int>::const_iterator, std::multimap<int, int>::const_iterator> ppp;
375  ppp = m_mapNodeOverlaps.equal_range(idx);
376  for (std::multimap<int, int>::const_iterator it2 = ppp.first;it2 != ppp.second;++it2) {
377  const TGeoOverlap* ovl = (const TGeoOverlap*) gGeoManager->GetListOfOverlaps()->At((*it2).second);
378  {
379  txt += "\n";
380 
381  if (ovl) {
382  txt += Form("%s: %g, ", ovl->IsOverlap() ? "Ovl" : "Extr", ovl->GetOverlap());
383  txt += ovl->GetTitle();
384  }
385  }
386  }
387 }
std::multimap< int, int > m_mapNodeOverlaps
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
std::vector< std::string > FWOverlapTableManager::getTitles ( ) const
virtual

returns the title names for each column

Reimplemented from FWGeometryTableManagerBase.

Definition at line 53 of file FWOverlapTableManager.cc.

References numberOfColumns().

54 {
55  std::vector<std::string> returnValue;
56  returnValue.reserve(numberOfColumns());
57 
58  returnValue.push_back("Name");
59  returnValue.push_back("Color");
60  returnValue.push_back("Opcty");
61  returnValue.push_back("RnrSelf");
62  returnValue.push_back("RnrChildren");
63  returnValue.push_back("Overlap");
64  returnValue.push_back("RnrMarker");
65  return returnValue;
66 }
virtual int numberOfColumns() const
Number of columns in the table.
void FWOverlapTableManager::importOverlaps ( std::string  path,
double  precision 
)

Definition at line 72 of file FWOverlapTableManager.cc.

References addOverlapEntry(), relativeConstraints::geom, FWGeometryTableViewManager::getGeoMangeur(), FWGeometryTableViewBase::getMarker(), FWGeometryTableViewBase::getTopNodeIdx(), i, kOverlap, kOverlapChild, kVisMarker, FWGeometryTableManagerBase::kVisNodeChld, FWGeometryTableManagerBase::kVisNodeSelf, m_browser, FWGeometryTableManagerBase::NodeInfo::m_color, FWGeometryTableManagerBase::m_entries, FWGeometryTableManagerBase::NodeInfo::m_level, m_mapNodeOverlaps, FWGeometryTableManagerBase::NodeInfo::m_node, FWGeometryTableManagerBase::NodeInfo::m_parent, FWGeometryTableManagerBase::NodeInfo::m_transparency, python.Node::node, getGTfromDQMFile::obj, analyzePatCOC_cfg::overlaps, and FWGeometryTableManagerBase::NodeInfo::resetBit().

Referenced by FWOverlapTableView::recalculate().

73 {
74  m_entries.clear();
75  m_mapNodeOverlaps.clear();
76  m_browser->getMarker()->Reset(TEveQuadSet::kQT_FreeQuad, kFALSE, 32 );
77 
78  TEveGeoManagerHolder mangeur( FWGeometryTableViewManager::getGeoMangeur());
79  // gGeoManager->cd();
80  NodeInfo topNodeInfo;
81  topNodeInfo.m_node = gGeoManager->GetTopNode();
82  topNodeInfo.m_level = 0;
83  topNodeInfo.m_color = gGeoManager->GetTopNode()->GetVolume()->GetLineColor();
84  topNodeInfo.m_transparency = gGeoManager->GetTopNode()->GetVolume()->GetTransparency();
85  topNodeInfo.m_parent = -1;
86  topNodeInfo.resetBit(kVisNodeSelf);
87 
88  m_entries.resize(gGeoManager->GetNNodes());
89  m_entries[0] = topNodeInfo;
90 
91  m_entries.resize( gGeoManager->GetNNodes());
92 
93  TGeoVolume* topVol = topNodeInfo.m_node->GetVolume();
94  Int_t icheck = 0;
95  Int_t ncheck = 0;
96  TStopwatch *timer;
97  Int_t i;
98  bool checkingOverlaps = false;
99  TGeoManager *geom = topVol->GetGeoManager();
100  ncheck = topNodeInfo.m_node->CountDaughters(kFALSE);
101  timer = new TStopwatch();
102  geom->ClearOverlaps();
103  geom->SetCheckingOverlaps(kTRUE);
104 
105  int oldS = 0;
106  timer->Start();
107  geom->GetGeomPainter()->OpProgress(topVol->GetName(),icheck,ncheck,timer,kFALSE);
108 // topVol->CheckOverlaps(iPrecision);
109  icheck++;
110  TGeoIterator git(topVol);
111  Entries_i eit = m_entries.begin();
112  /*
113  if (gGeoManager->GetListOfOverlaps()->GetEntriesFast()) {
114  int newCnt = gGeoManager->GetListOfOverlaps()->GetEntriesFast();
115  for (int i=0; i<newCnt; ++i) {
116  addOverlapEntry((TGeoOverlap*)gGeoManager->GetListOfOverlaps()->At(i), new TGeoHMatrix(*geom->GetCurrentMatrix()), topNode, next);
117  }
118  oldS= newCnt;
119  }*/
120  eit++;
121  TGeoNode *node;
122  icheck = 1;
123 
124  int topNodeIdx = m_browser->getTopNodeIdx();
125 
126  while ((node=git())) {
127  if (!eit->testBit(kOverlap)) eit->resetBit(kVisNodeSelf);
128  eit->m_node = node;
129  eit->m_color = node->GetVolume()->GetLineColor();
130  eit->m_transparency = node->GetVolume()->GetTransparency();
131  eit->m_level = git.GetLevel();
132  eit->m_parent = icheck;
133 
134  if ((topNodeIdx )== icheck || !topNodeIdx ) {
135  // printf("start to check overlaps on topNodeIdx %s \n", eit->name());
136  checkingOverlaps=true;
137  }
138  else if (checkingOverlaps && ( eit->m_level <= m_entries[m_browser->getTopNodeIdx()].m_level))
139  {
140  checkingOverlaps=false;
141  }
142  // parent index
143  Entries_i pit = eit;
144  do
145  {
146  --pit;
147  --(eit->m_parent);
148  if (pit->m_level < eit->m_level)
149  break;
150  } while (pit != m_entries.begin());
151 
152  // overlap bits
153  if ( checkingOverlaps) {
154  if (!node->GetVolume()->IsSelected()) {
155  geom->GetGeomPainter()->OpProgress(node->GetVolume()->GetName(),icheck+1,ncheck,timer,kFALSE);
156  node->GetVolume()->SelectVolume(kFALSE);
157 
158  node->GetVolume()->CheckOverlaps(iPrecision);
159 
160  if (oldS != gGeoManager->GetListOfOverlaps()->GetEntriesFast()) {
161  // printf("mother %s overlaps \n", node->GetName());
162 
163  eit->setBit(kOverlapChild);
164  eit->setBit(kVisNodeChld);
165  eit->setBit(kVisMarker);
166 
167  TGeoHMatrix* motherm = new TGeoHMatrix(*geom->GetCurrentMatrix());
168  {
169  TGeoNode* ni = topNodeInfo.m_node;
170  for (Int_t i=1; i<=git.GetLevel(); i++) {
171  ni = ni->GetDaughter(git.GetIndex(i));
172  motherm->Multiply(ni->GetMatrix());
173  }
174  }
175 
176  int newCnt = gGeoManager->GetListOfOverlaps()->GetEntriesFast();
177 
178  for (int i=oldS; i<newCnt; ++i)
179  {
180  // printf("add %p %p \n", (void*)node->GetVolume(), (void*)m_entries[icheck].m_node->GetVolume());
181  addOverlapEntry((TGeoOverlap*)gGeoManager->GetListOfOverlaps()->At(i), i, icheck, motherm);
182  }
183 
184  oldS = newCnt;
185  }
186  }
187  }
188  eit++;
189  icheck ++;
190  }
191 
192  m_browser->getMarker()->RefitPlex();
193 
194  topVol->SelectVolume(kTRUE);
195  geom->SetCheckingOverlaps(kFALSE);
196  // geom->SortOverlaps();
197  TObjArray *overlaps = geom->GetListOfOverlaps();
198  Int_t novlps = overlaps->GetEntriesFast();
199  TNamed *obj;
200  for (i=0; i<novlps; i++) {
201  obj = (TNamed*)overlaps->At(i);
202  obj->SetName(Form("ov%05d",i));
203  }
204  geom->GetGeomPainter()->OpProgress("Check overlaps:",icheck,ncheck,timer,kTRUE);
205  Info("CheckOverlaps", "Number of illegal overlaps/extrusions : %d\n", novlps);
206  delete timer;
207 }
int i
Definition: DBlmapReader.cc:9
std::multimap< int, int > m_mapNodeOverlaps
FWEveDigitSetScalableMarker * getMarker()
tuple node
Definition: Node.py:50
void addOverlapEntry(TGeoOverlap *, int, int, TGeoHMatrix *)
FWOverlapTableView * m_browser
bool FWOverlapTableManager::nodeIsParent ( const NodeInfo data) const
protectedvirtual

Reimplemented from FWGeometryTableManagerBase.

Definition at line 353 of file FWOverlapTableManager.cc.

References kOverlapChild, FWOverlapTableView::listAllNodes(), m_browser, FWGeometryTableManagerBase::NodeInfo::m_node, and FWGeometryTableManagerBase::NodeInfo::testBit().

Referenced by cellRenderer().

354 {
355  return m_browser->listAllNodes() ? data.m_node->GetNdaughters() : data.testBit(kOverlapChild) ;
356 }
bool listAllNodes() const
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
FWOverlapTableView * m_browser
virtual int FWOverlapTableManager::numberOfColumns ( ) const
inlinevirtual

Number of columns in the table.

Implements FWTableManagerBase.

Definition at line 65 of file FWOverlapTableManager.h.

Referenced by getTitles().

65 {return 6;}
const FWOverlapTableManager& FWOverlapTableManager::operator= ( const FWOverlapTableManager )
private
void FWOverlapTableManager::printOverlaps ( int  idx) const

Definition at line 358 of file FWOverlapTableManager.cc.

References FWGeometryTableViewManager::getGeoMangeur(), and m_mapNodeOverlaps.

Referenced by FWOverlapTableView::chosenItem().

359 {
360 
361  TEveGeoManagerHolder gmgr( FWGeometryTableViewManager::getGeoMangeur());
362  std::pair<std::multimap<int, int>::const_iterator, std::multimap<int, int>::const_iterator> ppp;
363  ppp = m_mapNodeOverlaps.equal_range(idx);
364  for (std::multimap<int, int>::const_iterator it2 = ppp.first;it2 != ppp.second;++it2) {
365  const TGeoOverlap* ovl = (const TGeoOverlap*) gGeoManager->GetListOfOverlaps()->At((*it2).second);
366  if (ovl) ovl->Print();
367  }
368 }
std::multimap< int, int > m_mapNodeOverlaps
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
void FWOverlapTableManager::recalculateVisibility ( )
virtual
void FWOverlapTableManager::recalculateVisibilityNodeRec ( int  pIdx)
virtual

Definition at line 329 of file FWOverlapTableManager.cc.

References data, FWGeometryTableManagerBase::getNNodesTotal(), customizeTrackingMonitorSeedNumber::idx, FWGeometryTableManagerBase::kExpanded, kOverlap, kOverlapChild, FWOverlapTableView::listAllNodes(), m_browser, FWGeometryTableManagerBase::m_entries, FWGeometryTableManagerBase::m_row_to_index, n, FWGeometryTableManagerBase::NodeInfo::testBit(), and FWGeometryTableManagerBase::NodeInfo::testBitAny().

Referenced by recalculateVisibility().

330 {
331  TGeoNode* parentNode = m_entries[pIdx].m_node;
332  int nD = parentNode->GetNdaughters();
333  int dOff=0;
334  for (int n = 0; n != nD; ++n)
335  {
336  int idx = pIdx + 1 + n + dOff;
337  NodeInfo& data = m_entries[idx];
338 
339 
340  if (m_browser->listAllNodes() || data.testBitAny(kOverlap | kOverlapChild))
341  m_row_to_index.push_back(idx);
342 
343  if ((m_browser->listAllNodes() || data.testBit(kOverlapChild)) && data.testBit(kExpanded) )
345 
346  FWGeometryTableManagerBase::getNNodesTotal(parentNode->GetDaughter(n), dOff);
347  }
348 }
bool listAllNodes() const
virtual void recalculateVisibilityNodeRec(int)
static void getNNodesTotal(TGeoNode *geoNode, int &off)
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
FWOverlapTableView * m_browser
void FWOverlapTableManager::setDaughtersSelfVisibility ( int  i,
bool  v 
)
virtual

Reimplemented from FWGeometryTableManagerBase.

Definition at line 535 of file FWOverlapTableManager.cc.

References data, FWGeometryTableManagerBase::getNNodesTotal(), customizeTrackingMonitorSeedNumber::idx, FWGeometryTableManagerBase::kVisNodeChld, FWGeometryTableManagerBase::kVisNodeSelf, FWGeometryTableManagerBase::m_entries, n, and FWGeometryTableManagerBase::NodeInfo::setBitVal().

536 {
537  int dOff = 0;
538  TGeoNode* parentNode = m_entries[selectedIdx].m_node;
539  int nD = parentNode->GetNdaughters();
540  for (int n = 0; n != nD; ++n)
541  {
542  int idx = selectedIdx + 1 + n + dOff;
543  NodeInfo& data = m_entries[idx];
544 
547 
548 
549  FWGeometryTableManagerBase::getNNodesTotal(parentNode->GetDaughter(n), dOff);
550  }
551 }
static void getNNodesTotal(TGeoNode *geoNode, int &off)
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82

Member Data Documentation

FWOverlapTableView* FWOverlapTableManager::m_browser
private
std::multimap<int, int> FWOverlapTableManager::m_mapNodeOverlaps
private