CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FWGeometryTableManager.h
Go to the documentation of this file.
1 #ifndef Fireworks_Core_FWGeometryTableManager_h
2 #define Fireworks_Core_FWGeometryTableManager_h
3 // -*- C++ -*-
4 //
5 // Package: Core
6 // Class : FWGeometryTableManager
7 //
16 //
17 // Original Author:
18 // Created: Wed Jan 4 20:34:22 CET 2012
19 // $Id: FWGeometryTableManager.h,v 1.10 2012/05/10 23:57:52 amraktad Exp $
20 //
21 
23 #include <string>
24 #include <boost/tr1/unordered_map.hpp>
25 
28 
29 #include "TGeoVolume.h"
30 
31 
33 {
34 public:
36 
38  {
39  kMatches = BIT(5),
40  kChildMatches = BIT(6),
41  kFilterCached = BIT(7)
42  };
43 
44  struct Match
45  {
46  bool m_matches;
49 
50  bool accepted() { return m_matches || m_childMatches; }
51  };
52 
53 
54  typedef boost::unordered_map<TGeoVolume*, Match> Volumes_t;
55  typedef Volumes_t::iterator Volumes_i;
56 
58  virtual ~FWGeometryTableManager();
59 
60  virtual void recalculateVisibility();
63  // geo
64  void loadGeometry( TGeoNode* iGeoTopNode, TObjArray* iVolumes);
65  void checkChildMatches(TGeoVolume* v, std::vector<TGeoVolume*>&);
66  void importChildren(int parent_idx);
67  void checkHierarchy();
68 
69  // signal callbacks
70  void updateFilter(int);
71  void printMaterials();
72 
73  virtual void setDaughtersSelfVisibility(int i, bool v);
74  virtual void setVisibility(NodeInfo& nodeInfo, bool );
75  virtual void setVisibilityChld(NodeInfo& nodeInfo, bool);
76 
77  virtual bool getVisibilityChld(const NodeInfo& nodeInfo) const;
78  virtual bool getVisibility (const NodeInfo& nodeInfo) const;
79 
81 
82  virtual int numberOfColumns() const { return kNumColumn; }
83  virtual FWTableCellRendererBase* cellRenderer(int iSortedRowNumber, int iCol) const;
84 
85  void checkRegionOfInterest(double* center, double radius, long algo);
86  void resetRegionOfInterest();
87 
88 protected:
89  virtual bool nodeIsParent(const NodeInfo&) const;
90  // virtual FWGeometryTableManagerBase::ESelectionState nodeSelectionState(int) const;
91  virtual const char* cellName(const NodeInfo& data) const;
92 
93 private:
94  FWGeometryTableManager(const FWGeometryTableManager&); // stop default
95  const FWGeometryTableManager& operator=(const FWGeometryTableManager&); // stop default
96 
97 
99 
101 
102  bool m_filterOff; //cached
103 };
104 
105 #endif
virtual void setVisibility(NodeInfo &nodeInfo, bool)
FWGeometryTableView * m_browser
int i
Definition: DBlmapReader.cc:9
virtual bool getVisibilityChld(const NodeInfo &nodeInfo) const
virtual FWTableCellRendererBase * cellRenderer(int iSortedRowNumber, int iCol) const
virtual int numberOfColumns() const
Number of columns in the table.
FWGeometryTableManager(FWGeometryTableView *)
virtual void setVisibilityChld(NodeInfo &nodeInfo, bool)
void checkRegionOfInterest(double *center, double radius, long algo)
const FWGeometryTableManager & operator=(const FWGeometryTableManager &)
virtual const char * cellName(const NodeInfo &data) const
virtual void setDaughtersSelfVisibility(int i, bool v)
virtual bool getVisibility(const NodeInfo &nodeInfo) const
void assertNodeFilterCache(NodeInfo &data)
void loadGeometry(TGeoNode *iGeoTopNode, TObjArray *iVolumes)
void checkChildMatches(TGeoVolume *v, std::vector< TGeoVolume * > &)
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
Volumes_t::iterator Volumes_i
virtual bool nodeIsParent(const NodeInfo &) const
boost::unordered_map< TGeoVolume *, Match > Volumes_t
void importChildren(int parent_idx)