G4SmoothTrajectoryPoint Class Reference

#include <G4SmoothTrajectoryPoint.hh>

Inheritance diagram for G4SmoothTrajectoryPoint:

G4VTrajectoryPoint

Public Member Functions

 G4SmoothTrajectoryPoint ()
 G4SmoothTrajectoryPoint (G4ThreeVector pos, std::vector< G4ThreeVector > *auxiliaryPoints)
 G4SmoothTrajectoryPoint (G4ThreeVector pos)
 G4SmoothTrajectoryPoint (const G4SmoothTrajectoryPoint &right)
virtual ~G4SmoothTrajectoryPoint ()
void * operator new (size_t)
void operator delete (void *aTrajectoryPoint)
int operator== (const G4SmoothTrajectoryPoint &right) const
const G4ThreeVector GetPosition () const
const std::vector< G4ThreeVector > * GetAuxiliaryPoints () const
virtual const std::map< G4String,
G4AttDef > * 
GetAttDefs () const
virtual std::vector< G4AttValue > * CreateAttValues () const

Detailed Description

Definition at line 47 of file G4SmoothTrajectoryPoint.hh.


Constructor & Destructor Documentation

G4SmoothTrajectoryPoint::G4SmoothTrajectoryPoint (  ) 

Definition at line 50 of file G4SmoothTrajectoryPoint.cc.

00051 : fAuxiliaryPointVector(0)
00052 {
00053   fPosition = G4ThreeVector(0.,0.,0.);
00054 }

G4SmoothTrajectoryPoint::G4SmoothTrajectoryPoint ( G4ThreeVector  pos,
std::vector< G4ThreeVector > *  auxiliaryPoints 
)

Definition at line 62 of file G4SmoothTrajectoryPoint.cc.

00064 : fPosition(pos),
00065   fAuxiliaryPointVector(auxiliaryPoints)
00066 {}

G4SmoothTrajectoryPoint::G4SmoothTrajectoryPoint ( G4ThreeVector  pos  ) 

Definition at line 56 of file G4SmoothTrajectoryPoint.cc.

00057 : fAuxiliaryPointVector(0)
00058 {
00059   fPosition = pos;
00060 }

G4SmoothTrajectoryPoint::G4SmoothTrajectoryPoint ( const G4SmoothTrajectoryPoint right  ) 

Definition at line 68 of file G4SmoothTrajectoryPoint.cc.

00069 : G4VTrajectoryPoint(),
00070   fPosition(right.fPosition),fAuxiliaryPointVector(right.fAuxiliaryPointVector)
00071 {
00072 }

G4SmoothTrajectoryPoint::~G4SmoothTrajectoryPoint (  )  [virtual]

Definition at line 74 of file G4SmoothTrajectoryPoint.cc.

00075 {
00076   if(fAuxiliaryPointVector) {
00077     delete fAuxiliaryPointVector;
00078   }
00079 }


Member Function Documentation

std::vector< G4AttValue > * G4SmoothTrajectoryPoint::CreateAttValues (  )  const [virtual]

Reimplemented from G4VTrajectoryPoint.

Definition at line 99 of file G4SmoothTrajectoryPoint.cc.

References G4BestUnit, G4cout, and GetAttDefs().

00100 {
00101   std::vector<G4AttValue>* values = new std::vector<G4AttValue>;
00102 
00103   if (fAuxiliaryPointVector) {
00104     std::vector<G4ThreeVector>::iterator iAux;
00105     for (iAux = fAuxiliaryPointVector->begin();
00106          iAux != fAuxiliaryPointVector->end(); ++iAux) {
00107       values->push_back(G4AttValue("Aux",G4BestUnit(*iAux,"Length"),""));
00108     }
00109   }
00110 
00111   values->push_back(G4AttValue("Pos",G4BestUnit(fPosition,"Length"),""));
00112 
00113 #ifdef G4ATTDEBUG
00114   G4cout << G4AttCheck(values,GetAttDefs());
00115 #endif
00116 
00117   return values;
00118 }

const std::map< G4String, G4AttDef > * G4SmoothTrajectoryPoint::GetAttDefs (  )  const [virtual]

Reimplemented from G4VTrajectoryPoint.

Definition at line 83 of file G4SmoothTrajectoryPoint.cc.

References G4AttDefStore::GetInstance().

Referenced by CreateAttValues().

00084 {
00085   G4bool isNew;
00086   std::map<G4String,G4AttDef>* store
00087     = G4AttDefStore::GetInstance("G4SmoothTrajectoryPoint",isNew);
00088   if (isNew) {
00089     G4String Pos("Pos");
00090     (*store)[Pos] = G4AttDef(Pos, "Step Position",
00091                              "Physics","G4BestUnit","G4ThreeVector");
00092     G4String Aux("Aux");
00093     (*store)[Aux] = G4AttDef(Aux, "Auxiliary Point Position",
00094                              "Physics","G4BestUnit","G4ThreeVector");
00095   }
00096   return store;
00097 }

const std::vector<G4ThreeVector>* G4SmoothTrajectoryPoint::GetAuxiliaryPoints (  )  const [inline, virtual]

Reimplemented from G4VTrajectoryPoint.

Definition at line 78 of file G4SmoothTrajectoryPoint.hh.

00079    { return fAuxiliaryPointVector; }

const G4ThreeVector G4SmoothTrajectoryPoint::GetPosition ( void   )  const [inline, virtual]

Implements G4VTrajectoryPoint.

Definition at line 76 of file G4SmoothTrajectoryPoint.hh.

00077    { return fPosition; }

void G4SmoothTrajectoryPoint::operator delete ( void *  aTrajectoryPoint  )  [inline]

Definition at line 107 of file G4SmoothTrajectoryPoint.hh.

References aSmoothTrajectoryPointAllocator.

00108 {
00109    aSmoothTrajectoryPointAllocator.FreeSingle((G4SmoothTrajectoryPoint *) aTrajectoryPoint);
00110 }

void * G4SmoothTrajectoryPoint::operator new ( size_t   )  [inline]

Definition at line 100 of file G4SmoothTrajectoryPoint.hh.

References aSmoothTrajectoryPointAllocator.

00101 {
00102    void *aTrajectoryPoint;
00103    aTrajectoryPoint = (void *) aSmoothTrajectoryPointAllocator.MallocSingle();
00104    return aTrajectoryPoint;
00105 }

int G4SmoothTrajectoryPoint::operator== ( const G4SmoothTrajectoryPoint right  )  const [inline]

Definition at line 72 of file G4SmoothTrajectoryPoint.hh.

00073    { return (this==&right); };


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:53:24 2013 for Geant4 by  doxygen 1.4.7