00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #include "G4TrajectoryPoint.hh"
00036
00037 #include "G4AttDefStore.hh"
00038 #include "G4AttDef.hh"
00039 #include "G4AttValue.hh"
00040 #include "G4UnitsTable.hh"
00041
00042
00043 #ifdef G4ATTDEBUG
00044 #include "G4AttCheck.hh"
00045 #endif
00046
00047 G4Allocator<G4TrajectoryPoint> aTrajectoryPointAllocator;
00048
00049 G4TrajectoryPoint::G4TrajectoryPoint()
00050 {
00051 fPosition = G4ThreeVector(0.,0.,0.);
00052 }
00053
00054 G4TrajectoryPoint::G4TrajectoryPoint(G4ThreeVector pos)
00055 {
00056 fPosition = pos;
00057 }
00058
00059 G4TrajectoryPoint::G4TrajectoryPoint(const G4TrajectoryPoint &right)
00060 : G4VTrajectoryPoint(),fPosition(right.fPosition)
00061 {
00062 }
00063
00064 G4TrajectoryPoint::~G4TrajectoryPoint()
00065 {
00066 }
00067
00068 const std::map<G4String,G4AttDef>* G4TrajectoryPoint::GetAttDefs() const
00069 {
00070 G4bool isNew;
00071 std::map<G4String,G4AttDef>* store
00072 = G4AttDefStore::GetInstance("G4TrajectoryPoint",isNew);
00073 if (isNew) {
00074 G4String Pos("Pos");
00075 (*store)[Pos] =
00076 G4AttDef(Pos, "Position", "Physics","G4BestUnit","G4ThreeVector");
00077 }
00078 return store;
00079 }
00080
00081 std::vector<G4AttValue>* G4TrajectoryPoint::CreateAttValues() const
00082 {
00083 std::vector<G4AttValue>* values = new std::vector<G4AttValue>;
00084
00085 values->push_back(G4AttValue("Pos",G4BestUnit(fPosition,"Length"),""));
00086
00087 #ifdef G4ATTDEBUG
00088 G4cout << G4AttCheck(values,GetAttDefs());
00089 #endif
00090
00091 return values;
00092 }