CMS 3D CMS Logo

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 override
 
 FWOverlapTableManager (FWOverlapTableView *)
 
void getOverlapTitles (int, TString &) const
 
std::vector< std::string > getTitles () const override
 returns the title names for each column More...
 
void importOverlaps (std::string path, double precision)
 
int numberOfColumns () const override
 Number of columns in the table. More...
 
void printOverlaps (int) const
 
void recalculateVisibility () override
 
virtual void recalculateVisibilityNodeRec (int)
 
void setDaughtersSelfVisibility (int i, bool v) override
 
 ~FWOverlapTableManager () override
 
- Public Member Functions inherited from FWGeometryTableManagerBase
virtual void applyColorTranspToDaughters (int selectedIdx, bool recurse)
 
void applyTransparencyFromEditor ()
 
void cancelEditor (bool)
 
bool cellDataIsSortable () const override
 
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
 
void implSort (int, bool) override
 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
 
int numberOfRows () const override
 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
 
int unsortedRowNumber (int unsorted) const override
 when passed the index to the sorted order of the rows it returns the original row number from the underlying data More...
 
 ~FWGeometryTableManagerBase () override
 
- 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...
 
 ClassDefOverride (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...
 
 ~FWTableManagerBase () override
 

Protected Member Functions

bool nodeIsParent (const NodeInfo &) const override
 

Private Member Functions

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

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 31 of file FWOverlapTableManager.h.

Member Enumeration Documentation

◆ OverlapBits

Enumerator
kVisMarker 
kOverlap 
kOverlapChild 

Definition at line 33 of file FWOverlapTableManager.h.

33 { kVisMarker = BIT(5), kOverlap = BIT(6), kOverlapChild = BIT(7) };

Constructor & Destructor Documentation

◆ FWOverlapTableManager() [1/2]

FWOverlapTableManager::FWOverlapTableManager ( FWOverlapTableView v)

Definition at line 40 of file FWOverlapTableManager.cc.

◆ ~FWOverlapTableManager()

FWOverlapTableManager::~FWOverlapTableManager ( )
override

Definition at line 42 of file FWOverlapTableManager.cc.

42 {}

◆ FWOverlapTableManager() [2/2]

FWOverlapTableManager::FWOverlapTableManager ( const FWOverlapTableManager )
privatedelete

Member Function Documentation

◆ addOverlapEntry()

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

Definition at line 194 of file FWOverlapTableManager.cc.

194  {
195  // printf("add %s \n", ovl->GetTitle());
196  // get doughter indices of overlaps
197  /*
198  TPMERegexp re(" ", "o");
199  re.Split(TString(ovl->GetTitle()));
200  printf("add title %s \n", ovl->GetTitle());
201  */
202  int pcnt = parentIdx + 1;
203  int dOff = 0;
204  TGeoNode* mothern = m_entries[parentIdx].m_node;
205 
206  QuadId* quid = new QuadId(ovl, parentIdx);
207 
208  for (int i = 0; i < mothern->GetNdaughters(); ++i) {
209  TGeoNode* n = mothern->GetDaughter(i);
210 
211  int cnt = pcnt + i + dOff;
212 
213  if (ovl->IsOverlap()) {
214  if (n->GetVolume() == ovl->GetFirstVolume() && (*(ovl->GetFirstMatrix()) == *(n->GetMatrix()))) {
215  // std::string x = re[0].Data();
216  //if (x.find(n->GetName()) == std::string::npos) printf("ERROT \n");
217 
218  m_entries[cnt].setBit(kOverlap);
219  m_entries[cnt].setBit(kVisNodeSelf);
220  m_mapNodeOverlaps.insert(std::pair<int, int>(cnt, ovlIdx));
221  int nno;
222  n->GetOverlaps(nno);
223  nno |= BIT(1);
224  n->SetOverlaps(nullptr, nno);
225  quid->m_nodes.push_back(cnt);
226  }
227  }
228 
229  if (n->GetVolume() == ovl->GetSecondVolume() && (*(ovl->GetSecondMatrix()) == *(n->GetMatrix()))) {
230  //printf("-----------------------------------------------\n");
231  // std::string x = re[2].Data();
232  // if (x.find(n->GetName()) == std::string::npos) printf("ERROT \n");
233 
234  m_entries[cnt].setBit(kOverlap);
235  m_entries[cnt].setBit(kVisNodeSelf);
236 
237  m_mapNodeOverlaps.insert(std::pair<int, int>(cnt, ovlIdx));
238  int nno;
239  n->GetOverlaps(nno);
240  nno |= (ovl->IsOverlap() ? BIT(1) : BIT(2));
241  n->SetOverlaps(nullptr, nno);
242 
243  quid->m_nodes.push_back(cnt);
244  }
245 
247  }
248 
249  TPolyMarker3D* pm = ovl->GetPolyMarker();
250  for (int j = 0; j < pm->GetN(); ++j) {
251  double pl[3];
252  double pg[3];
253  pm->GetPoint(j, pl[0], pl[1], pl[2]);
254  motherm->LocalToMaster(pl, pg);
255 
256  float dx = TMath::Abs(ovl->GetOverlap());
257  if (dx > 1e5) {
258  fwLog(fwlog::kInfo) << Form("WARNING [%s], overlap size = %.1f \n", ovl->GetTitle(), dx);
259  dx = 10;
260  }
261  float dy = dx, dz = 0;
262  float fp[3];
263  fp[0] = pg[0];
264  fp[1] = pg[1];
265  fp[2] = pg[2];
266  float bb[12] = {fp[0] + dx,
267  fp[1] - dy,
268  fp[2] - dz,
269  fp[0] + dx,
270  fp[1] + dy,
271  fp[2] + dz,
272  fp[0] - dx,
273  fp[1] + dy,
274  fp[2] + dz,
275  fp[0] - dx,
276  fp[1] - dy,
277  fp[2] - dz};
278  m_browser->getMarker()->AddQuad(&bb[0]);
279  m_browser->getMarker()->QuadId(quid);
280  }
281 
282  int aIdx = parentIdx;
283  int aLev = m_entries[aIdx].m_level;
284  int topNodeIdx = m_browser->getTopNodeIdx();
285 
286  while (aIdx > topNodeIdx) {
287  aIdx--;
288  if (m_entries[aIdx].m_level < aLev) {
289  m_entries[aIdx].setBit(kOverlapChild);
290  m_entries[aIdx].setBit(kVisNodeChld);
291  // printf("stamp %s \n", m_entries[aIdx].name());
292  aLev--;
293  }
294  }
295 }

References Abs(), PVValHelper::dx, PVValHelper::dy, PVValHelper::dz, TrackValidation_cff::e5, personalPlayback::fp, fwLog, FWGeometryTableViewBase::getMarker(), FWGeometryTableManagerBase::getNNodesTotal(), FWGeometryTableViewBase::getTopNodeIdx(), mps_fire::i, dqmiolumiharvest::j, fwlog::kInfo, kOverlap, kOverlapChild, FWGeometryTableManagerBase::kVisNodeChld, FWGeometryTableManagerBase::kVisNodeSelf, m_browser, FWGeometryTableManagerBase::m_entries, m_mapNodeOverlaps, FWOverlapTableManager::QuadId::m_nodes, and dqmiodumpmetadata::n.

Referenced by importOverlaps().

◆ cellRenderer()

FWTableCellRendererBase * FWOverlapTableManager::cellRenderer ( int  iSortedRowNumber,
int  iCol 
) const
overridevirtual

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 384 of file FWOverlapTableManager.cc.

384  {
385  if (m_row_to_index.empty())
386  return &m_renderer;
387 
388  int unsortedRow = m_row_to_index[iSortedRowNumber];
389 
390  if (unsortedRow < 0)
391  printf("!!!!!!!!!!!!!!!! error %d %d \n", unsortedRow, iSortedRowNumber);
392 
393  // editor state
394  //
395  m_renderer.showEditor(unsortedRow == m_editTransparencyIdx && iCol == 2);
396 
397  // selection state
398  //
399  const NodeInfo& data = m_entries[unsortedRow];
400 
401  bool isSelected = data.testBit(kHighlighted) || data.testBit(kSelected);
402  if (m_browser->listAllNodes())
403  isSelected = isSelected || data.testBit(kOverlap);
404 
405  if (data.testBit(kSelected)) {
406  m_highlightContext->SetBackground(0xc86464);
407  } else if (data.testBit(kHighlighted)) {
408  m_highlightContext->SetBackground(0x6464c8);
409  } else if (m_browser->listAllNodes() && data.testBit(kOverlap)) {
410  m_highlightContext->SetBackground(0xdddddd);
411  }
412 
413  // set column content
414  //
415  if (iCol == 0) {
416  if (unsortedRow == m_browser->getTopNodeIdx()) {
417  int no = 0, ne = 0;
418  TEveGeoManagerHolder gmgr(FWGeometryTableViewManager::getGeoMangeur());
419  TIter next_ovl(gGeoManager->GetListOfOverlaps());
420  const TGeoOverlap* ovl;
421  while ((ovl = (TGeoOverlap*)next_ovl()))
422  ovl->IsOverlap() ? no++ : ne++;
423 
424  m_renderer.setData(Form("%s Ovl[%d] Ext[%d]", data.m_node->GetName(), no, ne), isSelected);
425  } else {
427  }
429 
431 
432  int level = data.m_level - m_levelOffset;
433  if (nodeIsParent(data))
435  else
437  } else {
438  m_renderer.setIsParent(false);
440 
441  if (iCol == 5) {
442  if (data.testBit(kOverlap)) {
443  std::string x;
444  std::pair<std::multimap<int, int>::const_iterator, std::multimap<int, int>::const_iterator> ppp;
445  ppp = m_mapNodeOverlaps.equal_range(unsortedRow);
446 
447  TEveGeoManagerHolder gmgr(FWGeometryTableViewManager::getGeoMangeur());
448 
449  for (std::multimap<int, int>::const_iterator it2 = ppp.first; it2 != ppp.second; ++it2) {
450  const TGeoOverlap* ovl = (const TGeoOverlap*)gGeoManager->GetListOfOverlaps()->At((*it2).second);
451  if (ovl)
452  x += Form("%s: %g ", ovl->IsOverlap() ? "Ovl" : "Extr", ovl->GetOverlap());
453  else
454  x += "err";
455  }
457  } else {
459  }
460  }
461  if (iCol == 1) {
463  return &m_colorBoxRenderer;
464  } else if (iCol == 2) {
465  m_renderer.setData(Form("%d", 100 - data.m_transparency), isSelected);
466  } else if (iCol == 3) {
467  m_renderer.setData(data.testBit(kVisNodeSelf) ? "On" : "-", isSelected);
468 
469  } else if (iCol == 4) {
470  m_renderer.setData(data.testBit(kVisNodeChld) ? "On" : "-", isSelected);
471 
472  } else if (iCol == 6) {
473  std::cerr << "This shoud not happen! \n";
474  }
475  }
476  return &m_renderer;
477 }

References EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::cerr, data, FWGeometryTableViewManager::getGeoMangeur(), FWGeometryTableViewBase::getTopNodeIdx(), FWTextTreeCellRenderer::iconWidth(), isSelected(), FWGeometryTableManagerBase::kExpanded, FWGeometryTableManagerBase::kHighlighted, kOverlap, FWGeometryTableManagerBase::kSelected, FWGeometryTableManagerBase::kVisNodeChld, FWGeometryTableManagerBase::kVisNodeSelf, personalPlayback::level, FWOverlapTableView::listAllNodes(), m_browser, FWGeometryTableManagerBase::m_colorBoxRenderer, FWGeometryTableManagerBase::m_editTransparencyIdx, FWGeometryTableManagerBase::m_entries, FWGeometryTableManagerBase::m_highlightContext, FWGeometryTableManagerBase::m_levelOffset, m_mapNodeOverlaps, FWGeometryTableManagerBase::m_renderer, FWGeometryTableManagerBase::m_row_to_index, nodeIsParent(), FWTextTableCellRenderer::setData(), FWGeometryTableManagerBase::ColorBoxRenderer::setData(), FWTextTreeCellRenderer::setIndentation(), FWTextTreeCellRenderer::setIsOpen(), FWTextTreeCellRenderer::setIsParent(), FWTextTreeCellRenderer::showEditor(), AlCaHLTBitMon_QueryRunRegistry::string, and x.

◆ getOverlapTitles()

void FWOverlapTableManager::getOverlapTitles ( int  idx,
TString &  txt 
) const

Definition at line 344 of file FWOverlapTableManager.cc.

344  {
345  TEveGeoManagerHolder gmgr(FWGeometryTableViewManager::getGeoMangeur());
346  std::pair<std::multimap<int, int>::const_iterator, std::multimap<int, int>::const_iterator> ppp;
347  ppp = m_mapNodeOverlaps.equal_range(idx);
348  for (std::multimap<int, int>::const_iterator it2 = ppp.first; it2 != ppp.second; ++it2) {
349  const TGeoOverlap* ovl = (const TGeoOverlap*)gGeoManager->GetListOfOverlaps()->At((*it2).second);
350  {
351  txt += "\n";
352 
353  if (ovl) {
354  txt += Form("%s: %g, ", ovl->IsOverlap() ? "Ovl" : "Extr", ovl->GetOverlap());
355  txt += ovl->GetTitle();
356  }
357  }
358  }
359 }

References FWGeometryTableViewManager::getGeoMangeur(), heavyIonCSV_trainingSettings::idx, and m_mapNodeOverlaps.

◆ getTitles()

std::vector< std::string > FWOverlapTableManager::getTitles ( ) const
overridevirtual

returns the title names for each column

Reimplemented from FWGeometryTableManagerBase.

Definition at line 44 of file FWOverlapTableManager.cc.

44  {
45  std::vector<std::string> returnValue;
46  returnValue.reserve(numberOfColumns());
47 
48  returnValue.push_back("Name");
49  returnValue.push_back("Color");
50  returnValue.push_back("Opcty");
51  returnValue.push_back("RnrSelf");
52  returnValue.push_back("RnrChildren");
53  returnValue.push_back("Overlap");
54  returnValue.push_back("RnrMarker");
55  return returnValue;
56 }

References numberOfColumns().

◆ importOverlaps()

void FWOverlapTableManager::importOverlaps ( std::string  path,
double  precision 
)

Definition at line 59 of file FWOverlapTableManager.cc.

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

References addOverlapEntry(), relativeConstraints::geom, FWGeometryTableViewManager::getGeoMangeur(), FWGeometryTableViewBase::getMarker(), FWGeometryTableViewBase::getTopNodeIdx(), mps_fire::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, getGTfromDQMFile::obj, analyzePatCleaning_cfg::overlaps, and FWGeometryTableManagerBase::NodeInfo::resetBit().

Referenced by FWOverlapTableView::recalculate().

◆ nodeIsParent()

bool FWOverlapTableManager::nodeIsParent ( const NodeInfo data) const
overrideprotectedvirtual

Reimplemented from FWGeometryTableManagerBase.

Definition at line 329 of file FWOverlapTableManager.cc.

329  {
330  return m_browser->listAllNodes() ? data.m_node->GetNdaughters() : data.testBit(kOverlapChild);
331 }

References data, kOverlapChild, FWOverlapTableView::listAllNodes(), and m_browser.

Referenced by cellRenderer().

◆ numberOfColumns()

int FWOverlapTableManager::numberOfColumns ( ) const
inlineoverridevirtual

Number of columns in the table.

Implements FWTableManagerBase.

Definition at line 58 of file FWOverlapTableManager.h.

58 { return 6; }

Referenced by getTitles().

◆ operator=()

const FWOverlapTableManager& FWOverlapTableManager::operator= ( const FWOverlapTableManager )
privatedelete

◆ printOverlaps()

void FWOverlapTableManager::printOverlaps ( int  idx) const

Definition at line 333 of file FWOverlapTableManager.cc.

333  {
334  TEveGeoManagerHolder gmgr(FWGeometryTableViewManager::getGeoMangeur());
335  std::pair<std::multimap<int, int>::const_iterator, std::multimap<int, int>::const_iterator> ppp;
336  ppp = m_mapNodeOverlaps.equal_range(idx);
337  for (std::multimap<int, int>::const_iterator it2 = ppp.first; it2 != ppp.second; ++it2) {
338  const TGeoOverlap* ovl = (const TGeoOverlap*)gGeoManager->GetListOfOverlaps()->At((*it2).second);
339  if (ovl)
340  ovl->Print();
341  }
342 }

References FWGeometryTableViewManager::getGeoMangeur(), heavyIonCSV_trainingSettings::idx, and m_mapNodeOverlaps.

Referenced by FWOverlapTableView::chosenItem().

◆ recalculateVisibility()

void FWOverlapTableManager::recalculateVisibility ( )
overridevirtual

◆ recalculateVisibilityNodeRec()

void FWOverlapTableManager::recalculateVisibilityNodeRec ( int  pIdx)
virtual

Definition at line 309 of file FWOverlapTableManager.cc.

309  {
310  TGeoNode* parentNode = m_entries[pIdx].m_node;
311  int nD = parentNode->GetNdaughters();
312  int dOff = 0;
313  for (int n = 0; n != nD; ++n) {
314  int idx = pIdx + 1 + n + dOff;
315  NodeInfo& data = m_entries[idx];
316 
317  if (m_browser->listAllNodes() || data.testBitAny(kOverlap | kOverlapChild))
318  m_row_to_index.push_back(idx);
319 
320  if ((m_browser->listAllNodes() || data.testBit(kOverlapChild)) && data.testBit(kExpanded))
322 
323  FWGeometryTableManagerBase::getNNodesTotal(parentNode->GetDaughter(n), dOff);
324  }
325 }

References data, FWGeometryTableManagerBase::getNNodesTotal(), heavyIonCSV_trainingSettings::idx, FWGeometryTableManagerBase::kExpanded, kOverlap, kOverlapChild, FWOverlapTableView::listAllNodes(), m_browser, FWGeometryTableManagerBase::m_entries, FWGeometryTableManagerBase::m_row_to_index, and dqmiodumpmetadata::n.

Referenced by recalculateVisibility().

◆ setDaughtersSelfVisibility()

void FWOverlapTableManager::setDaughtersSelfVisibility ( int  i,
bool  v 
)
overridevirtual

Reimplemented from FWGeometryTableManagerBase.

Definition at line 481 of file FWOverlapTableManager.cc.

481  {
482  int dOff = 0;
483  TGeoNode* parentNode = m_entries[selectedIdx].m_node;
484  int nD = parentNode->GetNdaughters();
485  for (int n = 0; n != nD; ++n) {
486  int idx = selectedIdx + 1 + n + dOff;
487  NodeInfo& data = m_entries[idx];
488 
491 
492  FWGeometryTableManagerBase::getNNodesTotal(parentNode->GetDaughter(n), dOff);
493  }
494 }

References data, FWGeometryTableManagerBase::getNNodesTotal(), heavyIonCSV_trainingSettings::idx, FWGeometryTableManagerBase::kVisNodeChld, FWGeometryTableManagerBase::kVisNodeSelf, FWGeometryTableManagerBase::m_entries, dqmiodumpmetadata::n, and findQualityFiles::v.

Member Data Documentation

◆ m_browser

FWOverlapTableView* FWOverlapTableManager::m_browser
private

◆ m_mapNodeOverlaps

std::multimap<int, int> FWOverlapTableManager::m_mapNodeOverlaps
private
personalPlayback.level
level
Definition: personalPlayback.py:22
FWGeometryTableManagerBase::kExpanded
Definition: FWGeometryTableManagerBase.h:43
fwLog
#define fwLog(_level_)
Definition: fwLog.h:45
mps_fire.i
i
Definition: mps_fire.py:428
FWOverlapTableManager::nodeIsParent
bool nodeIsParent(const NodeInfo &) const override
Definition: FWOverlapTableManager.cc:329
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
FWGeometryTableManagerBase::m_entries
Entries_v m_entries
Definition: FWGeometryTableManagerBase.h:196
FWGeometryTableViewManager::getGeoMangeur
static TGeoManager * getGeoMangeur()
Definition: FWGeometryTableViewManager.cc:78
FWGeometryTableViewBase::getMarker
FWEveDigitSetScalableMarker * getMarker()
Definition: FWGeometryTableViewBase.h:99
FWOverlapTableManager::m_mapNodeOverlaps
std::multimap< int, int > m_mapNodeOverlaps
Definition: FWOverlapTableManager.h:80
FWGeometryTableManagerBase::m_highlightContext
TGGC * m_highlightContext
Definition: FWGeometryTableManagerBase.h:190
TrackValidation_cff.e5
e5
Definition: TrackValidation_cff.py:654
personalPlayback.fp
fp
Definition: personalPlayback.py:523
isSelected
bool isSelected(const std::vector< L1HPSPFTauQualityCut > &qualityCuts, const l1t::PFCandidate &pfCand, float_t primaryVertexZ)
Definition: L1HPSPFTauQualityCut.cc:90
DDAxes::x
findQualityFiles.v
v
Definition: findQualityFiles.py:179
FWTextTreeCellRenderer::showEditor
virtual void showEditor(bool value)
Definition: FWTextTreeCellRenderer.h:62
FWGeometryTableManagerBase::kHighlighted
Definition: FWGeometryTableManagerBase.h:48
FWOverlapTableManager::kOverlapChild
Definition: FWOverlapTableManager.h:33
FWOverlapTableManager::kOverlap
Definition: FWOverlapTableManager.h:33
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
Abs
T Abs(T a)
Definition: MathUtil.h:49
FWTextTreeCellRenderer::iconWidth
static int iconWidth()
Definition: FWTextTreeCellRenderer.h:58
FWGeometryTableManagerBase::getNNodesTotal
static void getNNodesTotal(TGeoNode *geoNode, int &off)
Definition: FWGeometryTableManagerBase.h:204
FWGeometryTableManagerBase::FWGeometryTableManagerBase
FWGeometryTableManagerBase()
Definition: FWGeometryTableManagerBase.cc:87
FWGeometryTableManagerBase::m_editTransparencyIdx
int m_editTransparencyIdx
Definition: FWGeometryTableManagerBase.h:201
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
FWGeometryTableManagerBase::ColorBoxRenderer::setData
void setData(Color_t c, bool)
Definition: FWGeometryTableManagerBase.cc:55
getGTfromDQMFile.obj
obj
Definition: getGTfromDQMFile.py:32
analyzePatCleaning_cfg.overlaps
overlaps
Definition: analyzePatCleaning_cfg.py:9
FWGeometryTableManagerBase::m_levelOffset
int m_levelOffset
Definition: FWGeometryTableManagerBase.h:198
FWOverlapTableManager::recalculateVisibilityNodeRec
virtual void recalculateVisibilityNodeRec(int)
Definition: FWOverlapTableManager.cc:309
FWGeometryTableManagerBase::kVisNodeSelf
Definition: FWGeometryTableManagerBase.h:45
FWOverlapTableManager::kVisMarker
Definition: FWOverlapTableManager.h:33
PVValHelper::dy
Definition: PVValidationHelpers.h:50
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
FWGeometryTableViewBase::getTopNodeIdx
int getTopNodeIdx() const
Definition: FWGeometryTableViewBase.h:97
FWGeometryTableManagerBase::kSelected
Definition: FWGeometryTableManagerBase.h:49
FWTextTableCellRenderer::setData
void setData(const std::string &, bool isSelected)
Definition: FWTextTableCellRenderer.cc:98
FWOverlapTableManager::numberOfColumns
int numberOfColumns() const override
Number of columns in the table.
Definition: FWOverlapTableManager.h:58
fwlog::kInfo
Definition: fwLog.h:35
PVValHelper::dz
Definition: PVValidationHelpers.h:51
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
FWTextTreeCellRenderer::setIsOpen
void setIsOpen(bool value)
Definition: FWTextTreeCellRenderer.h:65
FWOverlapTableManager::m_browser
FWOverlapTableView * m_browser
Definition: FWOverlapTableManager.h:78
FWGeometryTableManagerBase::m_row_to_index
std::vector< int > m_row_to_index
Definition: FWGeometryTableManagerBase.h:194
FWGeometryTableManagerBase::Entries_i
Entries_v::iterator Entries_i
Definition: FWGeometryTableManagerBase.h:88
FWOverlapTableView::listAllNodes
bool listAllNodes() const
Definition: FWOverlapTableView.cc:168
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
FWGeometryTableManagerBase::m_renderer
FWTextTreeCellRenderer m_renderer
Definition: FWGeometryTableManagerBase.h:191
FWGeometryTableManagerBase::kVisNodeChld
Definition: FWGeometryTableManagerBase.h:46
FWTextTreeCellRenderer::setIsParent
void setIsParent(bool value)
Definition: FWTextTreeCellRenderer.h:64
EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.cerr
cerr
Definition: EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.py:8
PVValHelper::dx
Definition: PVValidationHelpers.h:49
FWOverlapTableManager::addOverlapEntry
void addOverlapEntry(TGeoOverlap *, int, int, TGeoHMatrix *)
Definition: FWOverlapTableManager.cc:194
FWGeometryTableManagerBase::m_colorBoxRenderer
ColorBoxRenderer m_colorBoxRenderer
Definition: FWGeometryTableManagerBase.h:192
FWTextTreeCellRenderer::setIndentation
virtual void setIndentation(int indentation=0)
Definition: FWTextTreeCellRenderer.h:60