CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SimActivityRegistry.h
Go to the documentation of this file.
1 #ifndef SimG4Core_Notification_SimActivityRegistry_h
2 #define SimG4Core_Notification_SimActivityRegistry_h
3 // -*- C++ -*-
4 //
5 // Package: Notification
6 // Class : SimActivityRegistry
7 //
16 //
17 // Original Author: Chris Jones
18 // Created: Sun Nov 13 11:43:40 EST 2005
19 //
20 
21 // system include files
22 #include "boost/bind.hpp"
23 #include "boost/mem_fn.hpp"
24 
25 // user include files
27 
28 
29 // forward declarations
30 class BeginOfJob;
31 class BeginOfRun;
32 class BeginOfEvent;
33 class BeginOfTrack;
34 class BeginOfStep;
35 class EndOfRun;
36 class EndOfEvent;
37 class EndOfTrack;
38 class DDDWorld;
39 class G4Step;
40 
41 #define SAR_CONNECT_METHOD(signal) void connect(Observer<const signal*>* iObject) { watch ## signal (iObject); }
42 
44 {
45 
46  public:
48  //virtual ~SimActivityRegistry();
49 
54  }
56 
57  typedef sim_act::Signaler<DDDWorld> DDDWorldSignal;
58  DDDWorldSignal dddWorldSignal_;
59  void watchDDDWorld(const DDDWorldSignal::slot_type& iSlot){
60  dddWorldSignal_.connect(iSlot);
61  }
63 
65  BeginOfRunSignal beginOfRunSignal_;
66  void watchBeginOfRun(const BeginOfRunSignal::slot_type& iSlot){
67  beginOfRunSignal_.connect(iSlot);
68  }
70 
72  BeginOfEventSignal beginOfEventSignal_;
73  void watchBeginOfEvent(const BeginOfEventSignal::slot_type& iSlot){
74  beginOfEventSignal_.connect(iSlot);
75  }
77 
79  BeginOfTrackSignal beginOfTrackSignal_;
80  void watchBeginOfTrack(const BeginOfTrackSignal::slot_type& iSlot){
81  beginOfTrackSignal_.connect(iSlot);
82  }
84 
85  typedef sim_act::Signaler<G4Step> G4StepSignal;
86  G4StepSignal g4StepSignal_;
87  void watchG4Step(const G4StepSignal::slot_type& iSlot){
88  g4StepSignal_.connect(iSlot);
89  }
91 
92  typedef sim_act::Signaler<EndOfRun> EndOfRunSignal;
93  EndOfRunSignal endOfRunSignal_;
94  void watchEndOfRun(const EndOfRunSignal::slot_type& iSlot){
95  endOfRunSignal_.connect(iSlot);
96  }
98 
100  EndOfEventSignal endOfEventSignal_;
101  void watchEndOfEvent(const EndOfEventSignal::slot_type& iSlot){
102  endOfEventSignal_.connect(iSlot);
103  }
105 
107  EndOfTrackSignal endOfTrackSignal_;
108  void watchEndOfTrack(const EndOfTrackSignal::slot_type& iSlot){
109  endOfTrackSignal_.connect(iSlot);
110  }
112 
113 
114  void connect(SimActivityRegistry& iOther);
115 
116  private:
118 
119  const SimActivityRegistry& operator=(const SimActivityRegistry&); // stop default
120 
121  // ---------- member data --------------------------------
122 
123 };
124 
125 
126 #endif
void watchEndOfEvent(const EndOfEventSignal::slot_type &iSlot)
void watchEndOfTrack(const EndOfTrackSignal::slot_type &iSlot)
void connect(Observer< const BeginOfJob * > *iObject)
EndOfEventSignal endOfEventSignal_
BeginOfRunSignal beginOfRunSignal_
#define SAR_CONNECT_METHOD(signal)
BeginOfJobSignal beginOfJobSignal_
void watchBeginOfJob(const BeginOfJobSignal::slot_type &iSlot)
void watchBeginOfRun(const BeginOfRunSignal::slot_type &iSlot)
void watchEndOfRun(const EndOfRunSignal::slot_type &iSlot)
sim_act::Signaler< BeginOfJob > BeginOfJobSignal
#define private
Definition: FWEveView.cc:22
BeginOfEventSignal beginOfEventSignal_
void watchBeginOfEvent(const BeginOfEventSignal::slot_type &iSlot)
EndOfRunSignal endOfRunSignal_
void connect(Observer< const T * > *iObs)
does not take ownership of memory
Definition: Signaler.h:59
void watchG4Step(const G4StepSignal::slot_type &iSlot)
DDDWorldSignal dddWorldSignal_
void watchBeginOfTrack(const BeginOfTrackSignal::slot_type &iSlot)
string const
Definition: compareJSON.py:14
void watchDDDWorld(const DDDWorldSignal::slot_type &iSlot)
EndOfTrackSignal endOfTrackSignal_
BeginOfTrackSignal beginOfTrackSignal_