Geant4_10
RE04TrajectoryPoint.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
28 //
29 // $Id: $
30 //
31 #ifndef RE04TrajectoryPoint_h
32 #define RE04TrajectoryPoint_h 1
33 
34 #include "G4VTrajectoryPoint.hh"
35 #include "globals.hh"
36 #include "G4ThreeVector.hh"
37 #include "G4Allocator.hh"
38 class G4Material;
39 
40 //
56 //
60 {
61 
62 //--------
63 public:
64 //--------
65 
66 // Constructor/Destructor
70  virtual ~RE04TrajectoryPoint();
71 
72 // Operators
73  inline void *operator new(size_t);
74  inline void operator delete(void *aTrajectoryPoint);
75  inline int operator==(const RE04TrajectoryPoint& right) const
76  { return (this==&right); };
77 
78 // Get/Set functions
79  inline virtual const G4ThreeVector GetPosition() const
80  { return fPosition; };
81  inline const G4Material* GetMaterial() const
82  { return fpMaterial; };
83 
84 // Get method for HEPRep style attributes
85  virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
86  virtual std::vector<G4AttValue>* CreateAttValues() const;
87 
88 //---------
89  private:
90 //---------
91 
92 // Member data
93  G4ThreeVector fPosition;
94  const G4Material* fpMaterial;
95 
96 };
97 
99 
100 inline void* RE04TrajectoryPoint::operator new(size_t)
101 {
104  return (void *) faTrajPointAllocator->MallocSingle();
105 }
106 
107 inline void RE04TrajectoryPoint::operator delete(void *aTrajectoryPoint)
108 {
109  faTrajPointAllocator->FreeSingle((RE04TrajectoryPoint *) aTrajectoryPoint);
110 }
111 
112 #endif
113 
virtual const G4ThreeVector GetPosition() const
const G4Material * GetMaterial() const
int operator==(const RE04TrajectoryPoint &right) const
#define G4ThreadLocal
Definition: tls.hh:52
Float_t mat
Definition: plot.C:40
G4ThreadLocal G4Allocator< RE04TrajectoryPoint > * faTrajPointAllocator
virtual std::vector< G4AttValue > * CreateAttValues() const
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const