CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
SimTracer Class Reference

#include <SimG4Core/HelpfulWatchers/interface/SimTracer.h>

Inheritance diagram for SimTracer:
Observer< const EndOfTrack *> Observer< const EndOfEvent *> Observer< const EndOfRun *> Observer< const G4Step *> Observer< const BeginOfTrack *> Observer< const BeginOfEvent *> Observer< const BeginOfRun *> Observer< const BeginOfJob *> Observer< const DDDWorld *> SimWatcher

Public Member Functions

 SimTracer (const edm::ParameterSet &pSet)
 
void update (const DDDWorld *) override
 This routine will be called when the appropriate signal arrives. More...
 
void update (const BeginOfJob *) override
 This routine will be called when the appropriate signal arrives. More...
 
void update (const BeginOfRun *) override
 This routine will be called when the appropriate signal arrives. More...
 
void update (const BeginOfEvent *) override
 This routine will be called when the appropriate signal arrives. More...
 
void update (const BeginOfTrack *) override
 This routine will be called when the appropriate signal arrives. More...
 
void update (const G4Step *iStep) override
 This routine will be called when the appropriate signal arrives. More...
 
void update (const EndOfRun *) override
 This routine will be called when the appropriate signal arrives. More...
 
void update (const EndOfEvent *) override
 This routine will be called when the appropriate signal arrives. More...
 
void update (const EndOfTrack *) override
 This routine will be called when the appropriate signal arrives. More...
 
- Public Member Functions inherited from SimWatcher
virtual void beginRun (edm::EventSetup const &)
 
bool isMT () const
 
const SimWatcheroperator= (const SimWatcher &)=delete
 
virtual void registerConsumes (edm::ConsumesCollector)
 
 SimWatcher ()
 
 SimWatcher (const SimWatcher &)=delete
 
virtual ~SimWatcher ()
 
- Public Member Functions inherited from Observer< const DDDWorld *>
 Observer ()
 
void slotForUpdate (const DDDWorld * iT)
 
virtual ~Observer ()
 
- Public Member Functions inherited from Observer< const BeginOfJob *>
 Observer ()
 
void slotForUpdate (const BeginOfJob * iT)
 
virtual ~Observer ()
 
- Public Member Functions inherited from Observer< const BeginOfRun *>
 Observer ()
 
void slotForUpdate (const BeginOfRun * iT)
 
virtual ~Observer ()
 
- Public Member Functions inherited from Observer< const BeginOfEvent *>
 Observer ()
 
void slotForUpdate (const BeginOfEvent * iT)
 
virtual ~Observer ()
 
- Public Member Functions inherited from Observer< const BeginOfTrack *>
 Observer ()
 
void slotForUpdate (const BeginOfTrack * iT)
 
virtual ~Observer ()
 
- Public Member Functions inherited from Observer< const G4Step *>
 Observer ()
 
void slotForUpdate (const G4Step * iT)
 
virtual ~Observer ()
 
- Public Member Functions inherited from Observer< const EndOfRun *>
 Observer ()
 
void slotForUpdate (const EndOfRun * iT)
 
virtual ~Observer ()
 
- Public Member Functions inherited from Observer< const EndOfEvent *>
 Observer ()
 
void slotForUpdate (const EndOfEvent * iT)
 
virtual ~Observer ()
 
- Public Member Functions inherited from Observer< const EndOfTrack *>
 Observer ()
 
void slotForUpdate (const EndOfTrack * iT)
 
virtual ~Observer ()
 

Private Attributes

bool m_verbose
 

Additional Inherited Members

- Protected Member Functions inherited from SimWatcher
void setMT (bool val)
 

Detailed Description

Description: Prints a message for each Oscar signal

Usage: <usage>

Definition at line 47 of file SimTracer.h.

Constructor & Destructor Documentation

◆ SimTracer()

SimTracer::SimTracer ( const edm::ParameterSet pSet)
inline

Definition at line 58 of file SimTracer.h.

58 : m_verbose(pSet.getUntrackedParameter<bool>("verbose", false)) {}
T getUntrackedParameter(std::string const &, T const &) const
bool m_verbose
Definition: SimTracer.h:94

Member Function Documentation

◆ update() [1/9]

void SimTracer::update ( const DDDWorld )
inlineoverridevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const DDDWorld *>.

Definition at line 66 of file SimTracer.h.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), progressbar.ProgressBar::finish(), and MatrixUtil.Steps::overwrite().

71 {

◆ update() [2/9]

void SimTracer::update ( const BeginOfJob )
inlineoverridevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfJob *>.

Definition at line 67 of file SimTracer.h.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), progressbar.ProgressBar::finish(), and MatrixUtil.Steps::overwrite().

71 {

◆ update() [3/9]

void SimTracer::update ( const BeginOfRun )
inlineoverridevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfRun *>.

Definition at line 68 of file SimTracer.h.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), progressbar.ProgressBar::finish(), and MatrixUtil.Steps::overwrite().

71 {

◆ update() [4/9]

void SimTracer::update ( const BeginOfEvent )
inlineoverridevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfEvent *>.

Definition at line 69 of file SimTracer.h.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), progressbar.ProgressBar::finish(), and MatrixUtil.Steps::overwrite().

71 {

◆ update() [5/9]

void SimTracer::update ( const BeginOfTrack )
inlineoverridevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfTrack *>.

Definition at line 70 of file SimTracer.h.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), progressbar.ProgressBar::finish(), and MatrixUtil.Steps::overwrite().

71 {

◆ update() [6/9]

void SimTracer::update ( const G4Step *  )
inlineoverridevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const G4Step *>.

Definition at line 71 of file SimTracer.h.

References gather_cfg::cout, m_verbose, and findAndChange::post.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), progressbar.ProgressBar::finish(), and MatrixUtil.Steps::overwrite().

71  {
72  std::cout << "++ signal G4Step ";
73  if (m_verbose) {
74  const G4StepPoint *post = iStep->GetPostStepPoint();
75  const G4ThreeVector &pos = post->GetPosition();
76  std::cout << "( " << pos.x() << "," << pos.y() << "," << pos.z() << ") ";
77  if (post->GetPhysicalVolume()) {
78  std::cout << post->GetPhysicalVolume()->GetName();
79  }
80  }
81  std::cout << std::endl;
82  }
bool m_verbose
Definition: SimTracer.h:94

◆ update() [7/9]

void SimTracer::update ( const EndOfRun )
inlineoverridevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const EndOfRun *>.

Definition at line 84 of file SimTracer.h.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), progressbar.ProgressBar::finish(), and MatrixUtil.Steps::overwrite().

88 :
89  // SimTracer(const SimTracer&); // stop default

◆ update() [8/9]

void SimTracer::update ( const EndOfEvent )
inlineoverridevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const EndOfEvent *>.

Definition at line 85 of file SimTracer.h.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), progressbar.ProgressBar::finish(), and MatrixUtil.Steps::overwrite().

88 :
89  // SimTracer(const SimTracer&); // stop default

◆ update() [9/9]

void SimTracer::update ( const EndOfTrack )
inlineoverridevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const EndOfTrack *>.

Definition at line 86 of file SimTracer.h.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), progressbar.ProgressBar::finish(), and MatrixUtil.Steps::overwrite().

88 :
89  // SimTracer(const SimTracer&); // stop default

Member Data Documentation

◆ m_verbose

bool SimTracer::m_verbose
private

Definition at line 94 of file SimTracer.h.

Referenced by update().