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
Observer< const BeginOfJob * >
DDDWorld
Definition: DDDWorld.h:14
SimActivityRegistry::endOfEventSignal_
EndOfEventSignal endOfEventSignal_
Definition: SimActivityRegistry.h:80
SimActivityRegistry::dddWorldSignal_
DDDWorldSignal dddWorldSignal_
Definition: SimActivityRegistry.h:50
SimActivityRegistry::g4StepSignal_
G4StepSignal g4StepSignal_
Definition: SimActivityRegistry.h:70
watchdog.const
const
Definition: watchdog.py:83
EndOfTrack
Definition: EndOfTrack.h:6
SimActivityRegistry::watchEndOfRun
void watchEndOfRun(const EndOfRunSignal::slot_type &iSlot)
Definition: SimActivityRegistry.h:76
SimActivityRegistry::watchBeginOfTrack
void watchBeginOfTrack(const BeginOfTrackSignal::slot_type &iSlot)
Definition: SimActivityRegistry.h:66
SimActivityRegistry::watchBeginOfJob
void watchBeginOfJob(const BeginOfJobSignal::slot_type &iSlot)
Definition: SimActivityRegistry.h:46
BeginOfTrack
Definition: BeginOfTrack.h:6
BeginOfJob
Definition: BeginOfJob.h:8
SAR_CONNECT_METHOD
#define SAR_CONNECT_METHOD(signal)
Definition: SimActivityRegistry.h:36
EndOfEvent
Definition: EndOfEvent.h:6
sim_act::Signaler< BeginOfJob >
sim_act::Signaler::connect
void connect(Observer< const T * > *iObs)
does not take ownership of memory
Definition: Signaler.h:55
SimActivityRegistry::watchBeginOfRun
void watchBeginOfRun(const BeginOfRunSignal::slot_type &iSlot)
Definition: SimActivityRegistry.h:56
SimActivityRegistry::watchEndOfEvent
void watchEndOfEvent(const EndOfEventSignal::slot_type &iSlot)
Definition: SimActivityRegistry.h:81
SimActivityRegistry::watchBeginOfEvent
void watchBeginOfEvent(const BeginOfEventSignal::slot_type &iSlot)
Definition: SimActivityRegistry.h:61
SimActivityRegistry::endOfTrackSignal_
EndOfTrackSignal endOfTrackSignal_
Definition: SimActivityRegistry.h:85
SimActivityRegistry::SimActivityRegistry
SimActivityRegistry()
Definition: SimActivityRegistry.h:41
SimActivityRegistry::beginOfEventSignal_
BeginOfEventSignal beginOfEventSignal_
Definition: SimActivityRegistry.h:60
SimActivityRegistry::operator=
const SimActivityRegistry & operator=(const SimActivityRegistry &)=delete
SimActivityRegistry::endOfRunSignal_
EndOfRunSignal endOfRunSignal_
Definition: SimActivityRegistry.h:75
BeginOfEvent
Definition: BeginOfEvent.h:6
BeginOfRun
Definition: BeginOfRun.h:6
EndOfRun
Definition: EndOfRun.h:6
SimActivityRegistry::beginOfJobSignal_
BeginOfJobSignal beginOfJobSignal_
Definition: SimActivityRegistry.h:45
SimActivityRegistry::watchDDDWorld
void watchDDDWorld(const DDDWorldSignal::slot_type &iSlot)
Definition: SimActivityRegistry.h:51
SimActivityRegistry::beginOfTrackSignal_
BeginOfTrackSignal beginOfTrackSignal_
Definition: SimActivityRegistry.h:65
SimActivityRegistry::BeginOfJobSignal
sim_act::Signaler< BeginOfJob > BeginOfJobSignal
Definition: SimActivityRegistry.h:44
SimActivityRegistry
Definition: SimActivityRegistry.h:39
Signaler
Signaler.h
SimActivityRegistry::connect
void connect(Observer< const BeginOfJob * > *iObject)
Definition: SimActivityRegistry.h:47
sim_act
Definition: Signaler.h:34
SimActivityRegistry::beginOfRunSignal_
BeginOfRunSignal beginOfRunSignal_
Definition: SimActivityRegistry.h:55
SimActivityRegistry::watchEndOfTrack
void watchEndOfTrack(const EndOfTrackSignal::slot_type &iSlot)
Definition: SimActivityRegistry.h:86
SimActivityRegistry::watchG4Step
void watchG4Step(const G4StepSignal::slot_type &iSlot)
Definition: SimActivityRegistry.h:71