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 BeginOfEvent *) 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 BeginOfTrack *) override
 This routine will be called when the appropriate signal arrives. More...
 
void update (const DDDWorld *) 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 EndOfRun *) 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...
 
void update (const G4Step *iStep) override
 This routine will be called when the appropriate signal arrives. More...
 
- Public Member Functions inherited from SimWatcher
 SimWatcher ()
 
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

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)) {}

Member Function Documentation

◆ update() [1/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.

71 {

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

◆ 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.

71 {

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

◆ 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.

71 {

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

◆ update() [4/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.

71 {

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

◆ update() [5/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.

71 {

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

◆ update() [6/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.

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

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

◆ 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.

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

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

◆ update() [8/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.

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

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

◆ update() [9/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.

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  }

References gather_cfg::cout, and m_verbose.

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

Member Data Documentation

◆ m_verbose

bool SimTracer::m_verbose
private

Definition at line 94 of file SimTracer.h.

Referenced by update().

gather_cfg.cout
cout
Definition: gather_cfg.py:144
pos
Definition: PixelAliasList.h:18
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
SimTracer::m_verbose
bool m_verbose
Definition: SimTracer.h:94