CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 // user include files
23 
24 // forward declarations
25 class BeginOfJob;
26 class BeginOfRun;
27 class BeginOfEvent;
28 class BeginOfTrack;
29 class BeginOfStep;
30 class EndOfRun;
31 class EndOfEvent;
32 class EndOfTrack;
33 class DDDWorld;
34 class G4Step;
35 
36 #define SAR_CONNECT_METHOD(signal) \
37  void connect(Observer<const signal*>* iObject) { watch##signal(iObject); }
38 
40 public:
42  //virtual ~SimActivityRegistry();
43 
48 
49  typedef sim_act::Signaler<DDDWorld> DDDWorldSignal;
50  DDDWorldSignal dddWorldSignal_;
51  void watchDDDWorld(const DDDWorldSignal::slot_type& iSlot) { dddWorldSignal_.connect(iSlot); }
53 
55  BeginOfRunSignal beginOfRunSignal_;
56  void watchBeginOfRun(const BeginOfRunSignal::slot_type& iSlot) { beginOfRunSignal_.connect(iSlot); }
58 
60  BeginOfEventSignal beginOfEventSignal_;
61  void watchBeginOfEvent(const BeginOfEventSignal::slot_type& iSlot) { beginOfEventSignal_.connect(iSlot); }
63 
65  BeginOfTrackSignal beginOfTrackSignal_;
66  void watchBeginOfTrack(const BeginOfTrackSignal::slot_type& iSlot) { beginOfTrackSignal_.connect(iSlot); }
68 
69  typedef sim_act::Signaler<G4Step> G4StepSignal;
70  G4StepSignal g4StepSignal_;
71  void watchG4Step(const G4StepSignal::slot_type& iSlot) { g4StepSignal_.connect(iSlot); }
73 
74  typedef sim_act::Signaler<EndOfRun> EndOfRunSignal;
75  EndOfRunSignal endOfRunSignal_;
76  void watchEndOfRun(const EndOfRunSignal::slot_type& iSlot) { endOfRunSignal_.connect(iSlot); }
78 
80  EndOfEventSignal endOfEventSignal_;
81  void watchEndOfEvent(const EndOfEventSignal::slot_type& iSlot) { endOfEventSignal_.connect(iSlot); }
83 
85  EndOfTrackSignal endOfTrackSignal_;
86  void watchEndOfTrack(const EndOfTrackSignal::slot_type& iSlot) { endOfTrackSignal_.connect(iSlot); }
88 
89 
90  void connect(SimActivityRegistry& iOther);
91 
92  // stop default
95 };
96 
97 #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
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:55
void watchG4Step(const G4StepSignal::slot_type &iSlot)
DDDWorldSignal dddWorldSignal_
void watchBeginOfTrack(const BeginOfTrackSignal::slot_type &iSlot)
void watchDDDWorld(const DDDWorldSignal::slot_type &iSlot)
EndOfTrackSignal endOfTrackSignal_
BeginOfTrackSignal beginOfTrackSignal_