test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 {
22 public:
26  const TrackInformation & operator()(const G4Track & gtk) const;
27  const TrackInformation & operator()(const G4Track * gtk) const { return operator()(*gtk); }
31  TrackInformation & operator()(G4Track & gtk) const;
32  TrackInformation & operator()(G4Track * gtk) const { return operator()(*gtk); }
33 private:
34  void missing(const G4Track & gtk) const
35  { throw SimG4Exception("TrackInformationExtractor: G4Track has no TrackInformation"); }
36  void wrongType() const
37  { 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