![]() |
![]() |
00001 #include "SimG4Core/Notification/interface/TrackInformationExtractor.h" 00002 00003 #include "G4Track.hh" 00004 00005 const TrackInformation & 00006 TrackInformationExtractor::operator()(const G4Track & gtk) const 00007 { 00008 G4VUserTrackInformation * gui = gtk.GetUserInformation(); 00009 if (gui == 0) missing(gtk); 00010 const TrackInformation * tkInfo = dynamic_cast<const TrackInformation *>(gui); 00011 if (tkInfo == 0) wrongType(); 00012 return * tkInfo; 00013 } 00014 00015 TrackInformation & 00016 TrackInformationExtractor::operator()(G4Track & gtk) const 00017 { 00018 G4VUserTrackInformation * gui = gtk.GetUserInformation(); 00019 if (gui == 0) missing(gtk); 00020 TrackInformation * tkInfo = dynamic_cast<TrackInformation *>(gui); 00021 if (tkInfo == 0) wrongType(); 00022 return * tkInfo; 00023 } 00024