CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CurrentG4Track.cc
Go to the documentation of this file.
2 
3 const G4Track * CurrentG4Track::m_track = 0;
4 bool CurrentG4Track::m_tracking = false;
5 
6 void CurrentG4Track::setTrack(const G4Track * t)
7 {
8  if (m_tracking)
9  throw SimG4Exception("CurrentG4Track: new track set while previous is being tracked");
10  m_track = t;
11  m_tracking = true;
12 }
13 
14 void CurrentG4Track::postTracking(const G4Track * t)
15 {
16  if (t != m_track)
17  throw SimG4Exception("CurrentG4Track: tracking finishes for a different track");
18  if (!m_tracking)
19  throw SimG4Exception("CurrentG4Track: tracking finishes without having started");
20  m_tracking = false;
21 }
22 
static void setTrack(const G4Track *)
static const G4Track * m_track
static void postTracking(const G4Track *)
static bool m_tracking