CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrackInformationExtractor.cc
Go to the documentation of this file.
2 
3 #include "G4Track.hh"
4 
5 const TrackInformation &
6 TrackInformationExtractor::operator()(const G4Track & gtk) const
7 {
8  G4VUserTrackInformation * gui = gtk.GetUserInformation();
9  if (gui == 0) missing(gtk);
10  const TrackInformation * tkInfo = dynamic_cast<const TrackInformation *>(gui);
11  if (tkInfo == 0) wrongType();
12  return * tkInfo;
13 }
14 
17 {
18  G4VUserTrackInformation * gui = gtk.GetUserInformation();
19  if (gui == 0) missing(gtk);
20  TrackInformation * tkInfo = dynamic_cast<TrackInformation *>(gui);
21  if (tkInfo == 0) wrongType();
22  return * tkInfo;
23 }
24 
const TrackInformation & operator()(const G4Track &gtk) const
void missing(const G4Track &gtk) const