source: trunk/examples/extended/field/field04/include/F04TrajectoryPoint.hh@ 1036

Last change on this file since 1036 was 807, checked in by garnier, 17 years ago

update

File size: 3.7 KB
RevLine 
[807]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//
26//
27//
28//
29
30//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
31//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
32
33#ifndef F04TrajectoryPoint_h
34#define F04TrajectoryPoint_h 1
35
36#include "globals.hh"
37
38#include "G4Allocator.hh"
39#include "G4ThreeVector.hh"
40#include "G4TrajectoryPoint.hh"
41
42#include "G4StepStatus.hh"
43
44class G4Track;
45class G4Step;
46class G4VProcess;
47
48class F04TrajectoryPoint : public G4TrajectoryPoint {
49
50//--------
51 public: // without description
52//--------
53
54// Constructor/Destructor
55
56 F04TrajectoryPoint();
57 F04TrajectoryPoint(const G4Track* aTrack);
58 F04TrajectoryPoint(const G4Step* aStep);
59 F04TrajectoryPoint(const F04TrajectoryPoint &right);
60 virtual ~F04TrajectoryPoint();
61
62// Operators
63
64 inline void *operator new(size_t);
65 inline void operator delete(void *aTrajectoryPoint);
66 inline int operator==(const F04TrajectoryPoint& right) const
67 { return (this==&right); };
68
69// Get/Set functions
70
71 inline G4double GetTime() const { return fTime; };
72 inline const G4ThreeVector GetMomentum() const { return fMomentum; };
73 inline G4StepStatus GetStepStatus() const { return fStepStatus; };
74 inline G4String GetVolumeName() const { return fVolumeName; };
75
76// Get method for HEPRep style attributes
77
78 virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
79 virtual std::vector<G4AttValue>* CreateAttValues() const;
80
81//---------
82 private:
83//---------
84
85// Member data
86
87 G4double fTime;
88 G4ThreeVector fMomentum;
89 G4StepStatus fStepStatus;
90 G4String fVolumeName;
91
92};
93
94#if defined G4TRACKING_ALLOC_EXPORT
95 extern G4DLLEXPORT G4Allocator<F04TrajectoryPoint> aTrajPointAllocator;
96#else
97 extern G4DLLIMPORT G4Allocator<F04TrajectoryPoint> aTrajPointAllocator;
98#endif
99
100inline void* F04TrajectoryPoint::operator new(size_t)
101{
102 void *aTrajectoryPoint = (void *) aTrajPointAllocator.MallocSingle();
103 return aTrajectoryPoint;
104}
105
106inline void F04TrajectoryPoint::operator delete(void *aTrajectoryPoint)
107{
108 aTrajPointAllocator.FreeSingle(
109 (F04TrajectoryPoint *) aTrajectoryPoint);
110}
111
112#endif
Note: See TracBrowser for help on using the repository browser.