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 
28 class FWOverlapTableView;
29 class TGeoOverlap;
30 class TGeoIterator;
31 
32 
34 {
35 public:
37  {
38  kVisMarker = BIT(5),
39  kOverlap = BIT(6),
40  kOverlapChild = BIT(7)
41  };
42 
43  class QuadId : public TNamed
44  {
45  public:
47  QuadId(TGeoOverlap* ovl, int idx){ m_ovl = ovl; m_parentIdx = idx; }
48 
49  ~QuadId() override{}
50  const char* GetName() const override { return m_ovl->GetTitle(); }
51  const char* GetTitle() const override { return m_ovl->GetTitle(); }
52 
53  TGeoOverlap* m_ovl;
55  std::vector<int> m_nodes;
56  };
57 
59  ~FWOverlapTableManager() override;
60 
61  void recalculateVisibility() override;
62  virtual void recalculateVisibilityNodeRec(int);
64  int numberOfColumns() const override {return 6;}
65 
66  std::vector<std::string> getTitles() const override;
67 
68  FWTableCellRendererBase* cellRenderer(int iSortedRowNumber, int iCol) const override;
69 
70  void getOverlapTitles(int,TString&) const;
71  void printOverlaps(int) const;
72 
73  void setDaughtersSelfVisibility(int i, bool v) override;
74 protected:
75  bool nodeIsParent(const NodeInfo&) const override;
76  // virtual const char* cellName(const NodeInfo& data) const;
77 
78 private:
79  FWOverlapTableManager(const FWOverlapTableManager&) = delete; // stop default
80  const FWOverlapTableManager& operator=(const FWOverlapTableManager&) = delete; // stop default
81 
82  void addOverlapEntry(TGeoOverlap*, int, int , TGeoHMatrix*);
84 
85  std::multimap<int, int> m_mapNodeOverlaps;
86 };
87 
88 
89 #endif
std::multimap< int, int > m_mapNodeOverlaps
#define nullptr
const FWOverlapTableManager & operator=(const FWOverlapTableManager &)=delete
void setDaughtersSelfVisibility(int i, bool v) override
const char * GetName() const override
int numberOfColumns() const override
Number of columns in the table.
void addOverlapEntry(TGeoOverlap *, int, int, TGeoHMatrix *)
virtual void recalculateVisibilityNodeRec(int)
void getOverlapTitles(int, TString &) const
bool nodeIsParent(const NodeInfo &) const override
FWOverlapTableManager(FWOverlapTableView *)
FWTableCellRendererBase * cellRenderer(int iSortedRowNumber, int iCol) const override
std::vector< std::string > getTitles() const override
returns the title names for each column
void recalculateVisibility() override
const char * GetTitle() const override
QuadId(TGeoOverlap *ovl, int idx)
void importOverlaps(std::string path, double precision)
FWOverlapTableView * m_browser