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 {
46 public:
47  //does not take ownership of the object to which it points but does keep reference
49  ~FWEventItemsManager() override;
50 
51  typedef std::vector<FWEventItem*>::const_iterator const_iterator;
52 
53  //configuration management interface
54  void addTo(FWConfiguration&) const override;
55  void setFrom(const FWConfiguration&) override;
56 
57  // ---------- const member functions ---------------------
59  const_iterator begin() const;
60  const_iterator end() const;
61  // const std::vector<FWEventItem*> &items () const { return m_items; }
62 
63  const FWEventItem* find(const std::string& iName) const;
64  // ---------- static member functions --------------------
65 
66  // ---------- member functions ---------------------------
67  FWEventItem* add(const FWPhysicsObjectDesc& iItem, const FWConfiguration* pbConf=nullptr,
68  bool doSetEvent=true);
69  void clearItems();
70 
71  void newEvent(const edm::EventBase* iEvent);
72 
73  void setContext(fireworks::Context*);
74 
75  sigc::signal<void, FWEventItem*> newItem_;
76  sigc::signal<void, const FWEventItem*> removingItem_;
77  sigc::signal<void> goingToClearItems_;
78 
79 private:
80 
81  void removeItem(const FWEventItem*);
82  FWEventItemsManager(const FWEventItemsManager&) = delete; // stop default
83 
84  const FWEventItemsManager& operator=(const FWEventItemsManager&) = delete; // stop default
85 
86  // ---------- member data --------------------------------
87  std::vector<FWEventItem*> m_items;
90 
92  std::shared_ptr<FWItemAccessorFactory> m_accessorFactory;
93 };
94 
95 
96 #endif
FWModelChangeManager * m_changeManager
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
sigc::signal< void, const FWEventItem * > removingItem_
int iEvent
Definition: GenABIO.cc:230
sigc::signal< void, FWEventItem * > newItem_
#define end
Definition: vmac.h:39
const edm::EventBase * m_event
void add(std::map< std::string, TH1 * > &h, TH1 *hist)
std::shared_ptr< FWItemAccessorFactory > m_accessorFactory
#define begin
Definition: vmac.h:32
HLT enums.
fireworks::Context * m_context
std::vector< FWEventItem * > m_items
std::vector< FWEventItem * >::const_iterator const_iterator
sigc::signal< void > goingToClearItems_