CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CurrentG4Track.h
Go to the documentation of this file.
1 #ifndef SimG4Core_CurrentG4Track_H
2 #define SimG4Core_CurrentG4Track_H
3 
5 
6 #include "G4Track.hh"
7 
8 class TrackingAction;
9 
19 {
20 public:
21  static int id() { check(); return m_track->GetTrackID(); }
22  static const G4Track * track() { check(); return m_track; }
23 private:
24  static const G4Track * m_track;
25  static bool m_tracking;
26  static void setTrack(const G4Track *);
27  static void postTracking(const G4Track *);
28  static void check()
29  { if (m_track == 0) throw SimG4Exception("CurrentG4Track requested but not set"); }
30  friend class TrackingAction;
31 };
32 
33 #endif
static void setTrack(const G4Track *)
static int id()
static const G4Track * m_track
static void postTracking(const G4Track *)
static void check()
static bool m_tracking
static const G4Track * track()