CMS 3D CMS Logo

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 
51  void watchDDDWorld(const DDDWorldSignal::slot_type& iSlot) { dddWorldSignal_.connect(iSlot); }
53 
56  void watchBeginOfRun(const BeginOfRunSignal::slot_type& iSlot) { beginOfRunSignal_.connect(iSlot); }
58 
63 
68 
69  typedef sim_act::Signaler<G4Step> G4StepSignal;
71  void watchG4Step(const G4StepSignal::slot_type& iSlot) { g4StepSignal_.connect(iSlot); }
73 
76  void watchEndOfRun(const EndOfRunSignal::slot_type& iSlot) { endOfRunSignal_.connect(iSlot); }
78 
81  void watchEndOfEvent(const EndOfEventSignal::slot_type& iSlot) { endOfEventSignal_.connect(iSlot); }
83 
86  void watchEndOfTrack(const EndOfTrackSignal::slot_type& iSlot) { endOfTrackSignal_.connect(iSlot); }
88 
89 
90  void connect(SimActivityRegistry& iOther);
91 
92  // stop default
94  const SimActivityRegistry& operator=(const SimActivityRegistry&) = delete;
95 };
96 
97 #endif
void connect(Observer< const T *> *iObs)
does not take ownership of memory
Definition: Signaler.h:55
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 watchG4Step(const G4StepSignal::slot_type &iSlot)
const SimActivityRegistry & operator=(const SimActivityRegistry &)=delete
DDDWorldSignal dddWorldSignal_
void watchBeginOfTrack(const BeginOfTrackSignal::slot_type &iSlot)
void watchDDDWorld(const DDDWorldSignal::slot_type &iSlot)
EndOfTrackSignal endOfTrackSignal_
BeginOfTrackSignal beginOfTrackSignal_