CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions
Observer< T > Class Template Referenceabstract

#include <SimG4Core/Notification/interface/Observer.h>

Public Member Functions

 Observer ()
 
void slotForUpdate (T iT)
 
virtual ~Observer ()
 

Protected Member Functions

virtual void update (T)=0
 This routine will be called when the appropriate signal arrives. More...
 

Detailed Description

template<class T>
class Observer< T >

Description: Adapts the COBRA signal handling for use in the OscarProducer

Usage: If a class that is loaded by OscarProducer, via its configuraiton file, inherits from Observer<T>, (e.g., Observer<const BeginOfTrack*>), the OscarProducer will make sure the appropriate signal is sent to an object of that class (e.g., the object will see the BeginOfTrack signal). To handle the signal the class must override the 'void update(T)' method (e.g., void update(const BeginOfTrack*)).

Definition at line 25 of file Observer.h.

Constructor & Destructor Documentation

template<class T>
Observer< T >::Observer ( )
inline

Definition at line 28 of file Observer.h.

28 {}
template<class T>
virtual Observer< T >::~Observer ( )
inlinevirtual

Definition at line 29 of file Observer.h.

29 {}

Member Function Documentation

template<class T>
void Observer< T >::slotForUpdate ( T  iT)
inline

This method is what is called when the signal is actually sent. The signal is not sent directly to 'update' because if we did 1) If the user did not declare 'update' to be 'public' then we get a compilation failure 2) we would not have a 'hook' to allow the 'pre' and 'post' functions to be called

Definition at line 36 of file Observer.h.

36  {
37  update(iT);
38  }
virtual void update(T)=0
This routine will be called when the appropriate signal arrives.
template<class T>
virtual void Observer< T >::update ( T  )
protectedpure virtual

This routine will be called when the appropriate signal arrives.

Implemented in BscTest, BscTest, BscTest, FP420Test, BscTest, FP420Test, BscTest, FP420Test, BscTest, FP420Test, BscTest, FP420Test, BscTest, FP420Test, FP420Test, FP420Test, CastorShowerLibraryMaker, CastorShowerLibraryMaker, CastorShowerLibraryMaker, CastorShowerLibraryMaker, CastorShowerLibraryMaker, CastorShowerLibraryMaker, FP420SD, FP420SD, CaloSD, BscSD, CaloSD, BscSD, CastorTestAnalysis, ZdcTestAnalysis, CaloSD, CastorTestAnalysis, ZdcTestAnalysis, CaloSD, CastorTestAnalysis, ZdcTestAnalysis, CastorTestAnalysis, DoCastorAnalysis, ZdcTestAnalysis, CastorTestAnalysis, DoCastorAnalysis, ZdcTestAnalysis, CastorTestAnalysis, DoCastorAnalysis, ZdcTestAnalysis, DoCastorAnalysis, DoCastorAnalysis, DoCastorAnalysis, sim_act::Signaler< T >, sim_act::Signaler< G4Step >, sim_act::Signaler< EndOfEvent >, sim_act::Signaler< BeginOfRun >, sim_act::Signaler< BeginOfEvent >, sim_act::Signaler< BeginOfTrack >, sim_act::Signaler< DDDWorld >, sim_act::Signaler< BeginOfJob >, sim_act::Signaler< EndOfRun >, sim_act::Signaler< EndOfTrack >, HcalTB04Analysis, LaserAlignmentSimulation, HcalTB04Analysis, HcalTB04Analysis, HcalForwardAnalysis, LaserAlignmentSimulation, HcalTB04Analysis, HcalForwardAnalysis, HcalTB06Analysis, HcalForwardAnalysis, LaserAlignmentSimulation, HcalTB06Analysis, MuonSensitiveDetector, HcalForwardAnalysis, TotemSD, HcalTB06Analysis, LaserAlignmentSimulation, HcalTB06Analysis, LaserAlignmentSimulation, LaserAlignmentSimulation, HcalTB02Analysis, HcalTB02Analysis, LaserAlignmentSimulation, TkAccumulatingSensitiveDetector, TkAccumulatingSensitiveDetector, PLTSensitiveDetector, TkAccumulatingSensitiveDetector, PLTSensitiveDetector, PLTSensitiveDetector, TotemTestGem, TotemTestGem, SimG4HcalValidation, SimG4HcalValidation, simwatcher::BeginOfTrackCounter, MaterialBudgetAction, SimG4HcalValidation, TrackingVerboseAction, MaterialBudgetAction, SimG4HcalValidation, FiberSD, TrackingVerboseAction, MaterialBudgetAction, SimG4HcalValidation, FiberSD, TrackingVerboseAction, MaterialBudgetAction, TrackingVerboseAction, MaterialBudgetAction, HcalTestAnalysis, TrackingVerboseAction, HcalTestAnalysis, HcalTestAnalysis, CaloTrkProcessing, HcalTestAnalysis, CheckSecondary, CaloTrkProcessing, HcalTestAnalysis, CheckSecondary, MaterialBudgetForward, CheckSecondary, GflashG4Watcher, EcalSimHitsValidProducer, MaterialBudgetForward, CheckSecondary, GflashG4Watcher, EcalSimHitsValidProducer, MaterialBudgetForward, GflashG4Watcher, TrackingMaterialProducer, EcalSimHitsValidProducer, MaterialBudgetForward, TrackingMaterialProducer, TrackingMaterialProducer, StoreSecondary, TrackingMaterialProducer, MaterialBudgetHcal, StoreSecondary, TrackingMaterialProducer, MaterialBudgetHcal, StoreSecondary, CountProcessesAction, MaterialBudgetHcal, CountProcessesAction, MaterialBudgetHcal, CountProcessesAction, PrintGeomInfoAction, PrintMaterialBudgetInfo, CountProcessesAction, PrintGeomInfoAction, PrintMaterialBudgetInfo, CheckOverlap, RHStopTracer, RHStopTracer, MonopoleSteppingAction, PrintSensitive, RHStopTracer, MonopoleSteppingAction, RHStopTracer, MonopoleSteppingAction, MonopoleSteppingAction, PrintTrackNumberAction, PrintTrackNumberAction, KillSecondariesRunAction, KillSecondariesTrackAction, and SaveSimTrack.

Referenced by progressbar.ProgressBar::__next__(), relval_steps.Matrix::__setitem__(), relval_steps.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), relval_steps.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), Observer< const Event * >::slotForUpdate(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().