Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4TrajectoryPoint.cc
이 파일의 문서화 페이지로 가기
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 110262 2018-05-17 14:25:55Z gcosmo $
28 //
29 // ---------------------------------------------------------------
30 //
31 // G4TrajectoryPoint.cc
32 //
33 // ---------------------------------------------------------------
34 
35 #include "G4TrajectoryPoint.hh"
36 
37 #include "G4AttDefStore.hh"
38 #include "G4AttDef.hh"
39 #include "G4AttValue.hh"
40 #include "G4UnitsTable.hh"
41 
42 //#define G4ATTDEBUG
43 #ifdef G4ATTDEBUG
44 #include "G4AttCheck.hh"
45 #endif
46 
48 {
50  return _instance;
51 }
52 
54 {
55  fPosition = G4ThreeVector(0.,0.,0.);
56 }
57 
59 {
60  fPosition = pos;
61 }
62 
64  : G4VTrajectoryPoint(),fPosition(right.fPosition)
65 {
66 }
67 
69 {
70 }
71 
72 const std::map<G4String,G4AttDef>* G4TrajectoryPoint::GetAttDefs() const
73 {
74  G4bool isNew;
75  std::map<G4String,G4AttDef>* store
76  = G4AttDefStore::GetInstance("G4TrajectoryPoint",isNew);
77  if (isNew) {
78  G4String Pos("Pos");
79  (*store)[Pos] =
80  G4AttDef(Pos, "Position", "Physics","G4BestUnit","G4ThreeVector");
81  }
82  return store;
83 }
84 
85 std::vector<G4AttValue>* G4TrajectoryPoint::CreateAttValues() const
86 {
87  std::vector<G4AttValue>* values = new std::vector<G4AttValue>;
88 
89  values->push_back(G4AttValue("Pos",G4BestUnit(fPosition,"Length"),""));
90 
91 #ifdef G4ATTDEBUG
92  G4cout << G4AttCheck(values,GetAttDefs());
93 #endif
94 
95  return values;
96 }
CLHEP::Hep3Vector G4ThreeVector
static const G4double pos
ush Pos
Definition: deflate.h:92
#define G4ThreadLocalStatic
Definition: tls.hh:68
G4TRACKING_DLL G4Allocator< G4TrajectoryPoint > *& aTrajectoryPointAllocator()
bool G4bool
Definition: G4Types.hh:79
virtual ~G4TrajectoryPoint()
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
std::map< G4String, G4AttDef > * GetInstance(const G4String &storeKey, G4bool &isNew)
G4GLOB_DLL std::ostream G4cout
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
virtual std::vector< G4AttValue > * CreateAttValues() const
G4ThreeVector fPosition