CMS 3D CMS Logo

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 <unordered_map>
24 
27 
28 #include "TGeoVolume.h"
29 
31 public:
33 
34  enum GeometryBits { kMatches = BIT(5), kChildMatches = BIT(6), kFilterCached = BIT(7) };
35 
36  struct Match {
37  bool m_matches;
40 
41  bool accepted() const { return m_matches || m_childMatches; }
42  };
43 
44  typedef std::unordered_map<TGeoVolume*, Match> Volumes_t;
45  typedef Volumes_t::iterator Volumes_i;
46 
48  ~FWGeometryTableManager() override;
49 
50  void recalculateVisibility() override;
53  // geo
54  void loadGeometry(TGeoNode* iGeoTopNode, TObjArray* iVolumes);
55  void checkChildMatches(TGeoVolume* v, std::vector<TGeoVolume*>&);
56  void importChildren(int parent_idx);
57  void checkHierarchy();
58 
59  // signal callbacks
60  void updateFilter(int);
61  void printMaterials();
62 
63  void setDaughtersSelfVisibility(int i, bool v) override;
64  void setVisibility(NodeInfo& nodeInfo, bool) override;
65  void setVisibilityChld(NodeInfo& nodeInfo, bool) override;
66 
67  bool getVisibilityChld(const NodeInfo& nodeInfo) const override;
68  bool getVisibility(const NodeInfo& nodeInfo) const override;
69 
71 
72  int numberOfColumns() const override { return kNumColumn; }
73  FWTableCellRendererBase* cellRenderer(int iSortedRowNumber, int iCol) const override;
74 
75  void checkRegionOfInterest(double* center, double radius, long algo);
76  void resetRegionOfInterest();
77 
78 protected:
79  bool nodeIsParent(const NodeInfo&) const override;
80  // virtual FWGeometryTableManagerBase::ESelectionState nodeSelectionState(int) const;
81  const char* cellName(const NodeInfo& data) const override;
82 
83 private:
84  FWGeometryTableManager(const FWGeometryTableManager&) = delete; // stop default
85  const FWGeometryTableManager& operator=(const FWGeometryTableManager&) = delete; // stop default
86 
88 
90 
91  bool m_filterOff; //cached
92 };
93 
94 #endif
FWGeometryTableManager::checkChildMatches
void checkChildMatches(TGeoVolume *v, std::vector< TGeoVolume * > &)
Definition: FWGeometryTableManager.cc:158
FWGeometryTableManager::updateFilter
void updateFilter(int)
Definition: FWGeometryTableManager.cc:185
FWGeometryTableManager
Definition: FWGeometryTableManager.h:30
mps_fire.i
i
Definition: mps_fire.py:428
FWGeometryTableManager::m_volumes
Volumes_t m_volumes
Definition: FWGeometryTableManager.h:89
FWGeometryTableManager::m_browser
FWGeometryTableView * m_browser
Definition: FWGeometryTableManager.h:87
funct::false
false
Definition: Factorize.h:29
FWGeometryTableManager::recalculateVisibilityVolumeRec
void recalculateVisibilityVolumeRec(int)
Definition: FWGeometryTableManager.cc:308
FWGeometryTableManager::Volumes_i
Volumes_t::iterator Volumes_i
Definition: FWGeometryTableManager.h:45
FWGeometryTableManager::recalculateVisibility
void recalculateVisibility() override
Definition: FWGeometryTableManager.cc:283
FWGeometryTableManager::resetRegionOfInterest
void resetRegionOfInterest()
Definition: FWGeometryTableManager.cc:533
FWGeometryTableManager::kVisChildColumn
Definition: FWGeometryTableManager.h:32
FWGeometryTableManager::Match::accepted
bool accepted() const
Definition: FWGeometryTableManager.h:41
FWGeometryTableManager::kTranspColumn
Definition: FWGeometryTableManager.h:32
FWGeometryTableManager::setDaughtersSelfVisibility
void setDaughtersSelfVisibility(int i, bool v) override
Definition: FWGeometryTableManager.cc:423
FWGeometryTableManager::importChildren
void importChildren(int parent_idx)
Definition: FWGeometryTableManager.cc:114
FWGeometryTableManager::setVisibilityChld
void setVisibilityChld(NodeInfo &nodeInfo, bool) override
Definition: FWGeometryTableManager.cc:411
findQualityFiles.v
v
Definition: findQualityFiles.py:179
FWGeometryTableManager::kVisSelfColumn
Definition: FWGeometryTableManager.h:32
FWGeometryTableManagerBase.h
FWGeometryTableManagerBase
Definition: FWGeometryTableManagerBase.h:36
cmsdt::algo
algo
Definition: constants.h:165
FWGeometryTableManager::nodeIsParent
bool nodeIsParent(const NodeInfo &) const override
Definition: FWGeometryTableManager.cc:456
FWGeometryTableManager::loadGeometry
void loadGeometry(TGeoNode *iGeoTopNode, TObjArray *iVolumes)
Definition: FWGeometryTableManager.cc:228
FWGeometryTableView
Definition: FWGeometryTableView.h:28
FWGeometryTableManager::Match::Match
Match()
Definition: FWGeometryTableManager.h:39
FWGeometryTableManager::Volumes_t
std::unordered_map< TGeoVolume *, Match > Volumes_t
Definition: FWGeometryTableManager.h:44
FWGeometryTableViewBase
Definition: FWGeometryTableViewBase.h:41
FWGeometryTableManager::kNumColumn
Definition: FWGeometryTableManager.h:32
FWGeometryTableManager::kMaterialColumn
Definition: FWGeometryTableManager.h:32
FWGeometryTableManager::m_filterOff
bool m_filterOff
Definition: FWGeometryTableManager.h:91
FWGeometryTableManager::recalculateVisibilityNodeRec
void recalculateVisibilityNodeRec(int)
Definition: FWGeometryTableManager.cc:353
FWGeometryTableManager::ECol
ECol
Definition: FWGeometryTableManager.h:32
FWGeometryTableManager::cellName
const char * cellName(const NodeInfo &data) const override
Definition: FWGeometryTableManager.cc:33
FWGeometryTableManager::assertNodeFilterCache
void assertNodeFilterCache(NodeInfo &data)
Definition: FWGeometryTableManager.cc:379
FWGeometryTableManager::checkRegionOfInterest
void checkRegionOfInterest(double *center, double radius, long algo)
Definition: FWGeometryTableManager.cc:462
FWGeometryTableManager::getVisibility
bool getVisibility(const NodeInfo &nodeInfo) const override
Definition: FWGeometryTableManager.cc:440
FWTableCellRendererBase
Definition: FWTableCellRendererBase.h:44
FWGeometryTableManager::kNameColumn
Definition: FWGeometryTableManager.h:32
FWGeometryTableManager::Match::m_matches
bool m_matches
Definition: FWGeometryTableManager.h:37
FWGeometryTableManager::Match::m_childMatches
bool m_childMatches
Definition: FWGeometryTableManager.h:38
FWGeometryTableManager::GeometryBits
GeometryBits
Definition: FWGeometryTableManager.h:34
FWGeometryTableManagerBase::NodeInfo
Definition: FWGeometryTableManagerBase.h:52
FWGeometryTableManager::Match
Definition: FWGeometryTableManager.h:36
FWGeometryTableManager::cellRenderer
FWTableCellRendererBase * cellRenderer(int iSortedRowNumber, int iCol) const override
Definition: FWGeometryTableManager.cc:42
FWGeometryTableManager::printMaterials
void printMaterials()
Definition: FWGeometryTableManager.cc:279
FWGeometryTableManager::FWGeometryTableManager
FWGeometryTableManager(FWGeometryTableView *)
Definition: FWGeometryTableManager.cc:28
CosmicsPD_Skims.radius
radius
Definition: CosmicsPD_Skims.py:135
FWGeometryTableManager::kColorColumn
Definition: FWGeometryTableManager.h:32
FWGeometryTableManager::operator=
const FWGeometryTableManager & operator=(const FWGeometryTableManager &)=delete
FWGeometryTableManager::getVisibilityChld
bool getVisibilityChld(const NodeInfo &nodeInfo) const override
Definition: FWGeometryTableManager.cc:447
FWGeometryTableManager::~FWGeometryTableManager
~FWGeometryTableManager() override
Definition: FWGeometryTableManager.cc:31
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
FWGeometryTableManager::kChildMatches
Definition: FWGeometryTableManager.h:34
FWGeometryTableManager::kMatches
Definition: FWGeometryTableManager.h:34
FWGeometryTableManager::checkHierarchy
void checkHierarchy()
Definition: FWGeometryTableManager.cc:138
FWGeometryTableManager::setVisibility
void setVisibility(NodeInfo &nodeInfo, bool) override
Definition: FWGeometryTableManager.cc:398
FWGeometryTableManager::numberOfColumns
int numberOfColumns() const override
Number of columns in the table.
Definition: FWGeometryTableManager.h:72
FWGeometryTableManager::kFilterCached
Definition: FWGeometryTableManager.h:34