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 // system include files
22 #include "boost/bind.hpp"
23 #include "boost/mem_fn.hpp"
24 
25 // user include files
27 
28 // forward declarations
29 class BeginOfJob;
30 class BeginOfRun;
31 class BeginOfEvent;
32 class BeginOfTrack;
33 class BeginOfStep;
34 class EndOfRun;
35 class EndOfEvent;
36 class EndOfTrack;
37 class DDDWorld;
38 class G4Step;
39 
40 #define SAR_CONNECT_METHOD(signal) \
41  void connect(Observer<const signal*>* iObject) { watch##signal(iObject); }
42 
44 public:
46  //virtual ~SimActivityRegistry();
47 
52 
55  void watchDDDWorld(const DDDWorldSignal::slot_type& iSlot) { dddWorldSignal_.connect(iSlot); }
57 
60  void watchBeginOfRun(const BeginOfRunSignal::slot_type& iSlot) { beginOfRunSignal_.connect(iSlot); }
62 
67 
72 
73  typedef sim_act::Signaler<G4Step> G4StepSignal;
75  void watchG4Step(const G4StepSignal::slot_type& iSlot) { g4StepSignal_.connect(iSlot); }
77 
80  void watchEndOfRun(const EndOfRunSignal::slot_type& iSlot) { endOfRunSignal_.connect(iSlot); }
82 
85  void watchEndOfEvent(const EndOfEventSignal::slot_type& iSlot) { endOfEventSignal_.connect(iSlot); }
87 
90  void watchEndOfTrack(const EndOfTrackSignal::slot_type& iSlot) { endOfTrackSignal_.connect(iSlot); }
92 
93 
94  void connect(SimActivityRegistry& iOther);
95 
96 private:
97  SimActivityRegistry(const SimActivityRegistry&) = delete; // stop default
98 
99  const SimActivityRegistry& operator=(const SimActivityRegistry&) = delete; // stop default
100 
101  // ---------- member data --------------------------------
102 };
103 
104 #endif
Observer< const BeginOfJob * >
DDDWorld
Definition: DDDWorld.h:14
SimActivityRegistry::endOfEventSignal_
EndOfEventSignal endOfEventSignal_
Definition: SimActivityRegistry.h:84
SimActivityRegistry::dddWorldSignal_
DDDWorldSignal dddWorldSignal_
Definition: SimActivityRegistry.h:54
SimActivityRegistry::g4StepSignal_
G4StepSignal g4StepSignal_
Definition: SimActivityRegistry.h:74
watchdog.const
const
Definition: watchdog.py:83
EndOfTrack
Definition: EndOfTrack.h:6
SimActivityRegistry::watchEndOfRun
void watchEndOfRun(const EndOfRunSignal::slot_type &iSlot)
Definition: SimActivityRegistry.h:80
SimActivityRegistry::watchBeginOfTrack
void watchBeginOfTrack(const BeginOfTrackSignal::slot_type &iSlot)
Definition: SimActivityRegistry.h:70
SimActivityRegistry::watchBeginOfJob
void watchBeginOfJob(const BeginOfJobSignal::slot_type &iSlot)
Definition: SimActivityRegistry.h:50
BeginOfTrack
Definition: BeginOfTrack.h:6
BeginOfJob
Definition: BeginOfJob.h:8
SAR_CONNECT_METHOD
#define SAR_CONNECT_METHOD(signal)
Definition: SimActivityRegistry.h:40
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:60
SimActivityRegistry::watchEndOfEvent
void watchEndOfEvent(const EndOfEventSignal::slot_type &iSlot)
Definition: SimActivityRegistry.h:85
SimActivityRegistry::watchBeginOfEvent
void watchBeginOfEvent(const BeginOfEventSignal::slot_type &iSlot)
Definition: SimActivityRegistry.h:65
SimActivityRegistry::endOfTrackSignal_
EndOfTrackSignal endOfTrackSignal_
Definition: SimActivityRegistry.h:89
SimActivityRegistry::SimActivityRegistry
SimActivityRegistry()
Definition: SimActivityRegistry.h:45
SimActivityRegistry::beginOfEventSignal_
BeginOfEventSignal beginOfEventSignal_
Definition: SimActivityRegistry.h:64
SimActivityRegistry::operator=
const SimActivityRegistry & operator=(const SimActivityRegistry &)=delete
SimActivityRegistry::endOfRunSignal_
EndOfRunSignal endOfRunSignal_
Definition: SimActivityRegistry.h:79
BeginOfEvent
Definition: BeginOfEvent.h:6
BeginOfRun
Definition: BeginOfRun.h:6
EndOfRun
Definition: EndOfRun.h:6
SimActivityRegistry::beginOfJobSignal_
BeginOfJobSignal beginOfJobSignal_
Definition: SimActivityRegistry.h:49
SimActivityRegistry::watchDDDWorld
void watchDDDWorld(const DDDWorldSignal::slot_type &iSlot)
Definition: SimActivityRegistry.h:55
SimActivityRegistry::beginOfTrackSignal_
BeginOfTrackSignal beginOfTrackSignal_
Definition: SimActivityRegistry.h:69
SimActivityRegistry::BeginOfJobSignal
sim_act::Signaler< BeginOfJob > BeginOfJobSignal
Definition: SimActivityRegistry.h:48
SimActivityRegistry
Definition: SimActivityRegistry.h:43
Signaler
Signaler.h
SimActivityRegistry::connect
void connect(Observer< const BeginOfJob * > *iObject)
Definition: SimActivityRegistry.h:51
sim_act
Definition: Signaler.h:34
SimActivityRegistry::beginOfRunSignal_
BeginOfRunSignal beginOfRunSignal_
Definition: SimActivityRegistry.h:59
SimActivityRegistry::watchEndOfTrack
void watchEndOfTrack(const EndOfTrackSignal::slot_type &iSlot)
Definition: SimActivityRegistry.h:90
SimActivityRegistry::watchG4Step
void watchG4Step(const G4StepSignal::slot_type &iSlot)
Definition: SimActivityRegistry.h:75