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 //
20 
22 #include <string>
23 #include <boost/tr1/unordered_map.hpp>
24 
27 
28 #include "TGeoVolume.h"
29 
30 
32 {
33 public:
35 
37  {
38  kMatches = BIT(5),
39  kChildMatches = BIT(6),
40  kFilterCached = BIT(7)
41  };
42 
43  struct Match
44  {
45  bool m_matches;
48 
49  bool accepted() { return m_matches || m_childMatches; }
50  };
51 
52 
53  typedef boost::unordered_map<TGeoVolume*, Match> Volumes_t;
54  typedef Volumes_t::iterator Volumes_i;
55 
57  virtual ~FWGeometryTableManager();
58 
59  virtual void recalculateVisibility();
62  // geo
63  void loadGeometry( TGeoNode* iGeoTopNode, TObjArray* iVolumes);
64  void checkChildMatches(TGeoVolume* v, std::vector<TGeoVolume*>&);
65  void importChildren(int parent_idx);
66  void checkHierarchy();
67 
68  // signal callbacks
69  void updateFilter(int);
70  void printMaterials();
71 
72  virtual void setDaughtersSelfVisibility(int i, bool v);
73  virtual void setVisibility(NodeInfo& nodeInfo, bool );
74  virtual void setVisibilityChld(NodeInfo& nodeInfo, bool);
75 
76  virtual bool getVisibilityChld(const NodeInfo& nodeInfo) const;
77  virtual bool getVisibility (const NodeInfo& nodeInfo) const;
78 
80 
81  virtual int numberOfColumns() const { return kNumColumn; }
82  virtual FWTableCellRendererBase* cellRenderer(int iSortedRowNumber, int iCol) const;
83 
84  void checkRegionOfInterest(double* center, double radius, long algo);
85  void resetRegionOfInterest();
86 
87 protected:
88  virtual bool nodeIsParent(const NodeInfo&) const;
89  // virtual FWGeometryTableManagerBase::ESelectionState nodeSelectionState(int) const;
90  virtual const char* cellName(const NodeInfo& data) const;
91 
92 private:
93  FWGeometryTableManager(const FWGeometryTableManager&); // stop default
94  const FWGeometryTableManager& operator=(const FWGeometryTableManager&); // stop default
95 
96 
98 
100 
101  bool m_filterOff; //cached
102 };
103 
104 #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
volatile std::atomic< bool > shutdown_flag false
boost::unordered_map< TGeoVolume *, Match > Volumes_t
void importChildren(int parent_idx)