CMS 3D CMS Logo

TrackInformationExtractor.h
Go to the documentation of this file.
1 #ifndef SimG4Core_TrackInformationExtractor_H
2 #define SimG4Core_TrackInformationExtractor_H
3 
6 
7 class G4Track;
8 
21 public:
25  const TrackInformation& operator()(const G4Track& gtk) const;
26  const TrackInformation& operator()(const G4Track* gtk) const { return operator()(*gtk); }
30  TrackInformation& operator()(G4Track& gtk) const;
31  TrackInformation& operator()(G4Track* gtk) const { return operator()(*gtk); }
32 
33 private:
34  void missing(const G4Track& gtk) const {
35  throw SimG4Exception("TrackInformationExtractor: G4Track has no TrackInformation");
36  }
37  void wrongType() const { throw SimG4Exception("User information in G4Track is not of TrackInformation type"); }
38 };
39 
40 #endif
TrackInformation & operator()(G4Track *gtk) const
const TrackInformation & operator()(const G4Track &gtk) const
const TrackInformation & operator()(const G4Track *gtk) const
void missing(const G4Track &gtk) const