CMS 3D CMS Logo

FWEveViewManager.h
Go to the documentation of this file.
1 #ifndef Fireworks_Core_FWEveViewManager_h
2 #define Fireworks_Core_FWEveViewManager_h
3 // -*- C++ -*-
4 //
5 // Package: Core
6 // Class : FWEveViewManager
7 //
16 //
17 // Original Author: Chris Jones, Alja Mrak-Tadel
18 // Created: Thu Mar 18 14:12:45 CET 2010
19 //
20 
21 // system include files
22 #include <vector>
23 #include <map>
24 #include <set>
25 #include <memory>
26 
27 // user include files
30 
31 // forward declarations
32 class TEveCompund;
33 class TEveScene;
34 class TEveElement;
35 class TEveWindowSlot;
36 class FWViewBase;
37 class FWEveView;
38 class FWProxyBuilderBase;
39 class FWGUIManager;
41 
42 typedef std::set<FWModelId> FWModelIds;
43 
45 public:
46  struct BuilderInfo {
48  int m_viewBit;
49 
50  void classType(std::string&, bool&) const;
51 
52  BuilderInfo(std::string name, int viewBit) : m_name(name), m_viewBit(viewBit) {}
53  };
54 
56  ~FWEveViewManager() override;
57 
58  // ---------- const member functions ---------------------
59 
60  // ---------- static member functions --------------------
61 
62  // ---------- member functions ---------------------------
63  void newItem(const FWEventItem*) override;
64  virtual void removeItem(const FWEventItem*);
65  void eventBegin() override;
66  void eventEnd() override;
67  void setContext(const fireworks::Context*) override;
68 
69  void highlightAdded(TEveElement*);
70  void selectionAdded(TEveElement*);
71  void selectionRemoved(TEveElement*);
72  void selectionCleared();
73 
75 
76  static void syncAllViews() { s_syncAllViews = true; }
77 
78 protected:
79  void modelChangesComing() override;
80  void modelChangesDone() override;
81  void colorsChanged() override;
82 
83 private:
84  FWEveViewManager(const FWEveViewManager&) = delete; // stop default
85  const FWEveViewManager& operator=(const FWEveViewManager&) = delete; // stop default
86 
87  FWViewBase* buildView(TEveWindowSlot* iParent, const std::string& type);
88  FWEveView* finishViewCreate(std::shared_ptr<FWEveView>);
89 
90  void beingDestroyed(const FWViewBase*);
91  void modelChanges(const FWModelIds& iIds);
92  void itemChanged(const FWEventItem*);
93  bool haveViewForBit(int) const;
95  void eventCenterChanged();
96 
97  // ---------- member data --------------------------------
98 
99  typedef std::map<std::string, std::vector<BuilderInfo> > TypeToBuilder;
100  typedef std::vector<std::shared_ptr<FWProxyBuilderBase> > BuilderVec;
101  typedef BuilderVec::iterator BuilderVec_it;
102  typedef std::vector<std::shared_ptr<FWEveView> >::iterator EveViewVec_it;
103 
105 
106  static bool s_syncAllViews;
107 
108  std::map<int, BuilderVec> m_builders; // key is viewer bit
109 
110  std::vector<std::vector<std::shared_ptr<FWEveView> > > m_views;
111 
112  std::map<const FWEventItem*, FWInteractionList*> m_interactionLists;
113 };
114 
115 #endif
FWEveViewManager::eventEnd
void eventEnd() override
Definition: FWEveViewManager.cc:553
FWEveViewManager::operator=
const FWEveViewManager & operator=(const FWEveViewManager &)=delete
fireworks::Context
Definition: Context.h:41
FWGUIManager
Definition: FWGUIManager.h:95
FWEveViewManager::EveViewVec_it
std::vector< std::shared_ptr< FWEveView > >::iterator EveViewVec_it
Definition: FWEveViewManager.h:102
FWEveViewManager::newItem
void newItem(const FWEventItem *) override
Definition: FWEveViewManager.cc:175
FWViewManagerBase
Definition: FWViewManagerBase.h:45
FWEveViewManager::haveViewForBit
bool haveViewForBit(int) const
Definition: FWEveViewManager.cc:696
FWEveViewManager::globalEnergyScaleChanged
void globalEnergyScaleChanged()
Definition: FWEveViewManager.cc:513
FWEveViewManager::modelChangesDone
void modelChangesDone() override
Definition: FWEveViewManager.cc:416
FWInteractionList
Definition: FWInteractionList.h:33
FWEveViewManager
Definition: FWEveViewManager.h:44
FWEveViewManager::BuilderInfo::BuilderInfo
BuilderInfo(std::string name, int viewBit)
Definition: FWEveViewManager.h:52
FWEveViewManager::BuilderInfo::m_viewBit
int m_viewBit
Definition: FWEveViewManager.h:48
FWEveViewManager::~FWEveViewManager
~FWEveViewManager() override
Definition: FWEveViewManager.cc:138
FWEveViewManager::itemChanged
void itemChanged(const FWEventItem *)
Definition: FWEveViewManager.cc:453
FWEveViewManager::colorsChanged
void colorsChanged() override
Definition: FWEveViewManager.cc:531
FWViewType.h
FWEveView
Definition: FWEveView.h:53
FWEveViewManager::selectionCleared
void selectionCleared()
Definition: FWEveViewManager.cc:654
FWEveViewManager::TypeToBuilder
std::map< std::string, std::vector< BuilderInfo > > TypeToBuilder
Definition: FWEveViewManager.h:99
FWEveViewManager::beingDestroyed
void beingDestroyed(const FWViewBase *)
Definition: FWEveViewManager.cc:374
FWViewManagerBase.h
FWEveViewManager::BuilderVec
std::vector< std::shared_ptr< FWProxyBuilderBase > > BuilderVec
Definition: FWEveViewManager.h:100
FWEveViewManager::selectionRemoved
void selectionRemoved(TEveElement *)
Definition: FWEveViewManager.cc:648
FWEveViewManager::s_syncAllViews
static bool s_syncAllViews
Definition: FWEveViewManager.h:106
FWEveViewManager::BuilderVec_it
BuilderVec::iterator BuilderVec_it
Definition: FWEveViewManager.h:101
FWEveViewManager::syncAllViews
static void syncAllViews()
Definition: FWEveViewManager.h:76
FWEveViewManager::finishViewCreate
FWEveView * finishViewCreate(std::shared_ptr< FWEveView >)
Definition: FWEveViewManager.cc:310
FWEveViewManager::BuilderInfo::m_name
std::string m_name
Definition: FWEveViewManager.h:47
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
FWEveViewManager::buildView
FWViewBase * buildView(TEveWindowSlot *iParent, const std::string &type)
Definition: FWEveViewManager.cc:270
FWEveViewManager::eventBegin
void eventBegin() override
Definition: FWEveViewManager.cc:539
FWEveViewManager::selectionAdded
void selectionAdded(TEveElement *)
Definition: FWEveViewManager.cc:642
FWEveViewManager::BuilderInfo
Definition: FWEveViewManager.h:46
FWEveViewManager::BuilderInfo::classType
void classType(std::string &, bool &) const
Definition: FWEveViewManager.cc:705
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
FWEveViewManager::supportedTypesAndRepresentations
FWTypeToRepresentations supportedTypesAndRepresentations() const override
Definition: FWEveViewManager.cc:660
FWEveViewManager::FWEveViewManager
FWEveViewManager(FWGUIManager *)
Definition: FWEveViewManager.cc:79
FWEventItem
Definition: FWEventItem.h:56
FWEveViewManager::m_interactionLists
std::map< const FWEventItem *, FWInteractionList * > m_interactionLists
Definition: FWEveViewManager.h:112
FWEveViewManager::highlightAdded
void highlightAdded(TEveElement *)
Definition: FWEveViewManager.cc:725
FWProxyBuilderBase
Definition: FWProxyBuilderBase.h:46
FWTypeToRepresentations
Definition: FWTypeToRepresentations.h:33
FWEveViewManager::m_builders
std::map< int, BuilderVec > m_builders
Definition: FWEveViewManager.h:108
FWEveViewManager::m_typeToBuilder
TypeToBuilder m_typeToBuilder
Definition: FWEveViewManager.h:104
FWEveViewManager::modelChangesComing
void modelChangesComing() override
Definition: FWEveViewManager.cc:414
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
FWEveViewManager::setContext
void setContext(const fireworks::Context *) override
Definition: FWEveViewManager.cc:506
FWEveViewManager::modelChanges
void modelChanges(const FWModelIds &iIds)
Definition: FWEveViewManager.cc:419
FWEveViewManager::m_views
std::vector< std::vector< std::shared_ptr< FWEveView > > > m_views
Definition: FWEveViewManager.h:110
FWViewBase
Definition: FWViewBase.h:36
FWModelIds
std::set< FWModelId > FWModelIds
Definition: FWEveViewManager.h:40
FWEveViewManager::eventCenterChanged
void eventCenterChanged()
Definition: FWEveViewManager.cc:523
FWEveViewManager::removeItem
virtual void removeItem(const FWEventItem *)
Definition: FWEveViewManager.cc:483