CMS 3D CMS Logo

FWOverlapTableManager.h
Go to the documentation of this file.
1 #ifndef Fireworks_Core_FWOverlapTableManager_h
2 #define Fireworks_Core_FWOverlapTableManager_h
3 // -*- C++ -*-
4 //
5 // Package: Core
6 // Class : FWOverlapTableManager
7 //
16 //
17 // Original Author:
18 // Created: Wed Jan 4 20:34:38 CET 2012
19 //
20 
22 #include "TGeoMatrix.h"
23 #include "TGeoNode.h"
24 #include "TGeoOverlap.h"
25 #include <map>
26 
27 class FWOverlapTableView;
28 class TGeoOverlap;
29 class TGeoIterator;
30 
32 public:
33  enum OverlapBits { kVisMarker = BIT(5), kOverlap = BIT(6), kOverlapChild = BIT(7) };
34 
35  class QuadId : public TNamed {
36  public:
37  QuadId() : m_ovl(nullptr), m_parentIdx(-1) {}
38  QuadId(TGeoOverlap* ovl, int idx) {
39  m_ovl = ovl;
40  m_parentIdx = idx;
41  }
42 
43  ~QuadId() override {}
44  const char* GetName() const override { return m_ovl->GetTitle(); }
45  const char* GetTitle() const override { return m_ovl->GetTitle(); }
46 
47  TGeoOverlap* m_ovl;
49  std::vector<int> m_nodes;
50  };
51 
53  ~FWOverlapTableManager() override;
54 
55  void recalculateVisibility() override;
56  virtual void recalculateVisibilityNodeRec(int);
58  int numberOfColumns() const override { return 6; }
59 
60  std::vector<std::string> getTitles() const override;
61 
62  FWTableCellRendererBase* cellRenderer(int iSortedRowNumber, int iCol) const override;
63 
64  void getOverlapTitles(int, TString&) const;
65  void printOverlaps(int) const;
66 
67  void setDaughtersSelfVisibility(int i, bool v) override;
68 
69 protected:
70  bool nodeIsParent(const NodeInfo&) const override;
71  // virtual const char* cellName(const NodeInfo& data) const;
72 
73 public:
74  FWOverlapTableManager(const FWOverlapTableManager&) = delete; // stop default
75  const FWOverlapTableManager& operator=(const FWOverlapTableManager&) = delete; // stop default
76 
77 private:
78  void addOverlapEntry(TGeoOverlap*, int, int, TGeoHMatrix*);
80 
81  std::multimap<int, int> m_mapNodeOverlaps;
82 };
83 
84 #endif
std::vector< std::string > getTitles() const override
returns the title names for each column
std::multimap< int, int > m_mapNodeOverlaps
const FWOverlapTableManager & operator=(const FWOverlapTableManager &)=delete
void setDaughtersSelfVisibility(int i, bool v) override
bool nodeIsParent(const NodeInfo &) const override
void getOverlapTitles(int, TString &) const
const char * GetTitle() const override
void addOverlapEntry(TGeoOverlap *, int, int, TGeoHMatrix *)
virtual void recalculateVisibilityNodeRec(int)
const char * GetName() const override
FWTableCellRendererBase * cellRenderer(int iSortedRowNumber, int iCol) const override
FWOverlapTableManager(FWOverlapTableView *)
int numberOfColumns() const override
Number of columns in the table.
void recalculateVisibility() override
QuadId(TGeoOverlap *ovl, int idx)
void importOverlaps(std::string path, double precision)
FWOverlapTableView * m_browser