source: trunk/source/tracking/src/G4TrajectoryPoint.cc@ 1251

Last change on this file since 1251 was 1228, checked in by garnier, 16 years ago

update geant4.9.3 tag

File size: 3.1 KB
Line 
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// $Id: G4TrajectoryPoint.cc,v 1.19 2006/06/29 21:16:15 gunter Exp $
28// GEANT4 tag $Name: geant4-09-03 $
29//
30// ---------------------------------------------------------------
31//
32// G4TrajectoryPoint.cc
33//
34// ---------------------------------------------------------------
35
36#include "G4TrajectoryPoint.hh"
37
38#include "G4AttDefStore.hh"
39#include "G4AttDef.hh"
40#include "G4AttValue.hh"
41#include "G4UnitsTable.hh"
42
43//#define G4ATTDEBUG
44#ifdef G4ATTDEBUG
45#include "G4AttCheck.hh"
46#endif
47
48G4Allocator<G4TrajectoryPoint> aTrajectoryPointAllocator;
49
50G4TrajectoryPoint::G4TrajectoryPoint()
51{
52 fPosition = G4ThreeVector(0.,0.,0.);
53}
54
55G4TrajectoryPoint::G4TrajectoryPoint(G4ThreeVector pos)
56{
57 fPosition = pos;
58}
59
60G4TrajectoryPoint::G4TrajectoryPoint(const G4TrajectoryPoint &right)
61 : G4VTrajectoryPoint(),fPosition(right.fPosition)
62{
63}
64
65G4TrajectoryPoint::~G4TrajectoryPoint()
66{
67}
68
69const std::map<G4String,G4AttDef>* G4TrajectoryPoint::GetAttDefs() const
70{
71 G4bool isNew;
72 std::map<G4String,G4AttDef>* store
73 = G4AttDefStore::GetInstance("G4TrajectoryPoint",isNew);
74 if (isNew) {
75 G4String Pos("Pos");
76 (*store)[Pos] =
77 G4AttDef(Pos, "Position", "Physics","G4BestUnit","G4ThreeVector");
78 }
79 return store;
80}
81
82std::vector<G4AttValue>* G4TrajectoryPoint::CreateAttValues() const
83{
84 std::vector<G4AttValue>* values = new std::vector<G4AttValue>;
85
86 values->push_back(G4AttValue("Pos",G4BestUnit(fPosition,"Length"),""));
87
88#ifdef G4ATTDEBUG
89 G4cout << G4AttCheck(values,GetAttDefs());
90#endif
91
92 return values;
93}
Note: See TracBrowser for help on using the repository browser.