CMS 3D CMS Logo

FWEventItemsManager.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 #ifndef Fireworks_Core_FWEventItemsManager_h
3 #define Fireworks_Core_FWEventItemsManager_h
4 //
5 // Package: Core
6 // Class : FWEventItemsManager
7 //
16 //
17 // Original Author:
18 // Created: Thu Jan 3 13:27:29 EST 2008
19 //
20 
21 // system include files
22 #include <vector>
23 #include <memory>
24 #include "sigc++/signal.h"
25 
26 // user include files
28 
29 // forward declarations
30 namespace edm {
31  class EventBase;
32 }
33 namespace fireworks {
34  class Context;
35 }
36 
37 class FWEventItem;
40 class FWSelectionManager;
43 
45 public:
46  //does not take ownership of the object to which it points but does keep reference
48  ~FWEventItemsManager() override;
49 
50  typedef std::vector<FWEventItem*>::const_iterator const_iterator;
51 
52  //configuration management interface
53  void addTo(FWConfiguration&) const override;
54  void setFrom(const FWConfiguration&) override;
55 
56  // ---------- const member functions ---------------------
58  const_iterator begin() const;
59  const_iterator end() const;
60  // const std::vector<FWEventItem*> &items () const { return m_items; }
61 
62  const FWEventItem* find(const std::string& iName) const;
63  // ---------- static member functions --------------------
64 
65  // ---------- member functions ---------------------------
66  FWEventItem* add(const FWPhysicsObjectDesc& iItem, const FWConfiguration* pbConf = nullptr, bool doSetEvent = true);
67  void clearItems();
68 
69  void newEvent(const edm::EventBase* iEvent);
70 
72 
73  sigc::signal<void, FWEventItem*> newItem_;
74  sigc::signal<void, const FWEventItem*> removingItem_;
75  sigc::signal<void> goingToClearItems_;
76 
77 private:
78  void removeItem(const FWEventItem*);
79  FWEventItemsManager(const FWEventItemsManager&) = delete; // stop default
80 
81  const FWEventItemsManager& operator=(const FWEventItemsManager&) = delete; // stop default
82 
83  // ---------- member data --------------------------------
84  std::vector<FWEventItem*> m_items;
87 
89  std::shared_ptr<FWItemAccessorFactory> m_accessorFactory;
90 };
91 
92 #endif
fireworks::Context
Definition: Context.h:41
FWEventItemsManager::add
FWEventItem * add(const FWPhysicsObjectDesc &iItem, const FWConfiguration *pbConf=nullptr, bool doSetEvent=true)
Definition: FWEventItemsManager.cc:77
FWEventItemsManager::newEvent
void newEvent(const edm::EventBase *iEvent)
Definition: FWEventItemsManager.cc:102
FWEventItemsManager::clearItems
void clearItems()
Definition: FWEventItemsManager.cc:117
FWEventItemsManager::addTo
void addTo(FWConfiguration &) const override
Definition: FWEventItemsManager.cc:143
edm
HLT enums.
Definition: AlignableModifier.h:19
FWEventItemsManager
Definition: FWEventItemsManager.h:44
FWEventItemsManager::m_context
fireworks::Context * m_context
Definition: FWEventItemsManager.h:86
FWEventItemsManager::m_items
std::vector< FWEventItem * > m_items
Definition: FWEventItemsManager.h:84
Context
FWModelChangeManager
Definition: FWModelChangeManager.h:33
FWEventItemsManager::goingToClearItems_
sigc::signal< void > goingToClearItems_
Definition: FWEventItemsManager.h:75
FWItemAccessorFactory
Definition: FWItemAccessorFactory.h:31
FWEventItemsManager::FWEventItemsManager
FWEventItemsManager(FWModelChangeManager *)
Definition: FWEventItemsManager.cc:41
FWEventItemsManager::m_accessorFactory
std::shared_ptr< FWItemAccessorFactory > m_accessorFactory
Definition: FWEventItemsManager.h:89
FWConfigurable.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
FWEventItemsManager::setFrom
void setFrom(const FWConfiguration &) override
Definition: FWEventItemsManager.cc:186
FWSelectionManager
Definition: FWSelectionManager.h:34
FWPhysicsObjectDesc
Definition: FWPhysicsObjectDesc.h:30
FWEventItemsManager::end
const_iterator end() const
Definition: FWEventItemsManager.cc:300
FWEventItemsManager::removeItem
void removeItem(const FWEventItem *)
Definition: FWEventItemsManager.cc:288
iEvent
int iEvent
Definition: GenABIO.cc:224
FWEventItemsManager::find
const FWEventItem * find(const std::string &iName) const
Definition: FWEventItemsManager.cc:304
FWEventItemsManager::const_iterator
std::vector< FWEventItem * >::const_iterator const_iterator
Definition: FWEventItemsManager.h:50
FWEventItemsManager::m_changeManager
FWModelChangeManager * m_changeManager
Definition: FWEventItemsManager.h:85
FWEventItemsManager::begin
const_iterator begin() const
NOTE: iterator is allowed to return a null object for items that have been removed.
Definition: FWEventItemsManager.cc:299
FWEventItem
Definition: FWEventItem.h:56
FWEventItemsManager::setContext
void setContext(fireworks::Context *)
Definition: FWEventItemsManager.cc:294
FWProxyBuilderConfiguration
Definition: FWProxyBuilderConfiguration.h:42
FWConfigurable
Definition: FWConfigurable.h:28
edm::EventBase
Definition: EventBase.h:46
FWEventItemsManager::newItem_
sigc::signal< void, FWEventItem * > newItem_
Definition: FWEventItemsManager.h:73
EventBase
FWConfiguration
Definition: FWConfiguration.h:31
fireworks
Definition: FWTauProxyBuilderBase.h:35
FWEventItemsManager::m_event
const edm::EventBase * m_event
Definition: FWEventItemsManager.h:88
FWEventItemsManager::operator=
const FWEventItemsManager & operator=(const FWEventItemsManager &)=delete
FWEventItemsManager::~FWEventItemsManager
~FWEventItemsManager() override
Definition: FWEventItemsManager.cc:55
FWEventItemsManager::removingItem_
sigc::signal< void, const FWEventItem * > removingItem_
Definition: FWEventItemsManager.h:74