#include <CurrentG4Track.h>
Static Public Member Functions | |
static int | id () |
static const G4Track * | track () |
Static Private Member Functions | |
static void | check () |
static void | postTracking (const G4Track *) |
static void | setTrack (const G4Track *) |
Static Private Attributes | |
static const G4Track * | m_track = 0 |
static bool | m_tracking = false |
Friends | |
class | TrackingAction |
This class is NOT intended for general use. It provides immediate access to the currently tracked G4Track for places that can't access this information easily, like StackingAction. If an acceptable geant4 mechanism is found for this, this class will be removed.
Definition at line 18 of file CurrentG4Track.h.
static void CurrentG4Track::check | ( | void | ) | [inline, static, private] |
Definition at line 28 of file CurrentG4Track.h.
References m_track.
Referenced by id(), and track().
{ if (m_track == 0) throw SimG4Exception("CurrentG4Track requested but not set"); }
static int CurrentG4Track::id | ( | void | ) | [inline, static] |
void CurrentG4Track::postTracking | ( | const G4Track * | t | ) | [static, private] |
Definition at line 14 of file CurrentG4Track.cc.
References m_track, and m_tracking.
Referenced by TrackingAction::PostUserTrackingAction().
{ if (t != m_track) throw SimG4Exception("CurrentG4Track: tracking finishes for a different track"); if (!m_tracking) throw SimG4Exception("CurrentG4Track: tracking finishes without having started"); m_tracking = false; }
void CurrentG4Track::setTrack | ( | const G4Track * | t | ) | [static, private] |
Definition at line 6 of file CurrentG4Track.cc.
References m_track, m_tracking, and lumiQTWidget::t.
Referenced by TrackingAction::PreUserTrackingAction().
{ if (m_tracking) throw SimG4Exception("CurrentG4Track: new track set while previous is being tracked"); m_track = t; m_tracking = true; }
static const G4Track* CurrentG4Track::track | ( | void | ) | [inline, static] |
Definition at line 22 of file CurrentG4Track.h.
References check(), and m_track.
Referenced by StackingAction::ClassifyNewTrack(), and KillSecondariesStackingAction::ClassifyNewTrack().
friend class TrackingAction [friend] |
Definition at line 30 of file CurrentG4Track.h.
const G4Track * CurrentG4Track::m_track = 0 [static, private] |
Definition at line 24 of file CurrentG4Track.h.
Referenced by check(), id(), postTracking(), setTrack(), and track().
bool CurrentG4Track::m_tracking = false [static, private] |
Definition at line 25 of file CurrentG4Track.h.
Referenced by postTracking(), and setTrack().