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
TrackInformationExtractor::operator()
const TrackInformation & operator()(const G4Track &gtk) const
Definition: TrackInformationExtractor.cc:5
SimG4Exception
Definition: SimG4Exception.h:13
TrackInformationExtractor::operator()
const TrackInformation & operator()(const G4Track *gtk) const
Definition: TrackInformationExtractor.h:26
TrackInformationExtractor
Definition: TrackInformationExtractor.h:20
SimG4Exception.h
TrackInformationExtractor::operator()
TrackInformation & operator()(G4Track *gtk) const
Definition: TrackInformationExtractor.h:31
TrackInformation
Definition: TrackInformation.h:12
TrackInformation.h
TrackInformationExtractor::wrongType
void wrongType() const
Definition: TrackInformationExtractor.h:37
TrackInformationExtractor::missing
void missing(const G4Track &gtk) const
Definition: TrackInformationExtractor.h:34