#include <SimG4Core/Notification/interface/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 |
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.
Definition at line 28 of file CurrentG4Track.h.
References m_track.
Referenced by id(), and track().
00029 { if (m_track == 0) throw SimG4Exception("CurrentG4Track requested but not set"); }
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().
00015 { 00016 if (t != m_track) 00017 throw SimG4Exception("CurrentG4Track: tracking finishes for a different track"); 00018 if (!m_tracking) 00019 throw SimG4Exception("CurrentG4Track: tracking finishes without having started"); 00020 m_tracking = false; 00021 }
void CurrentG4Track::setTrack | ( | const G4Track * | t | ) | [static, private] |
Definition at line 6 of file CurrentG4Track.cc.
References m_track, and m_tracking.
Referenced by TrackingAction::PreUserTrackingAction().
00007 { 00008 if (m_tracking) 00009 throw SimG4Exception("CurrentG4Track: new track set while previous is being tracked"); 00010 m_track = t; 00011 m_tracking = true; 00012 }
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] |