G4SmoothTrajectoryPoint.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // $Id: G4SmoothTrajectoryPoint.hh 67009 2013-01-29 16:00:21Z gcosmo $
00028 //
00029 //---------------------------------------------------------------
00030 //
00031 // G4SmoothTrajectoryPoint.hh
00032 //
00033 // class description:
00034 //  This class contains position and auxiliary points of a trajectory point.
00035 //
00036 // ---------------------------------------------------------------
00037 
00038 #ifndef G4SmoothTrajectoryPoint_h
00039 #define G4SmoothTrajectoryPoint_h 1
00040 
00041 #include "G4VTrajectoryPoint.hh"
00042 #include "globals.hh"                // Include from 'global'
00043 #include "G4ThreeVector.hh"          // Include from 'geometry'
00044 #include "G4Allocator.hh"            // Include from 'particle+matter'
00045 
00046 
00047 class G4SmoothTrajectoryPoint : public G4VTrajectoryPoint
00048 {
00049 
00050 //--------
00051 public: // without description
00052 //--------
00053 
00054 // Constructor/Destructor
00055    G4SmoothTrajectoryPoint();
00056    // No auxiliary points setter, so must set the points in the
00057    // constructor already (jacek 31/10/2002)
00058    G4SmoothTrajectoryPoint(G4ThreeVector pos,
00059                            std::vector<G4ThreeVector>* auxiliaryPoints);
00060    G4SmoothTrajectoryPoint(G4ThreeVector pos);
00061    G4SmoothTrajectoryPoint(const G4SmoothTrajectoryPoint &right);
00062    virtual ~G4SmoothTrajectoryPoint();
00063 
00064 private:
00065    G4SmoothTrajectoryPoint& operator= (const G4SmoothTrajectoryPoint&);
00066 
00067 public:
00068 
00069 // Operators
00070    inline void *operator new(size_t);
00071    inline void operator delete(void *aTrajectoryPoint);
00072    inline int operator==(const G4SmoothTrajectoryPoint& right) const
00073    { return (this==&right); };
00074 
00075 // Get/Set functions
00076    inline const G4ThreeVector GetPosition() const
00077    { return fPosition; }
00078    inline const std::vector<G4ThreeVector>* GetAuxiliaryPoints() const
00079    { return fAuxiliaryPointVector; }
00080 
00081 // Get method for HEPRep style attributes
00082    virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
00083    virtual std::vector<G4AttValue>* CreateAttValues() const;
00084 
00085 //---------
00086    private:
00087 //---------
00088 
00089 // Member data
00090    G4ThreeVector fPosition;
00091    std::vector<G4ThreeVector>* fAuxiliaryPointVector;
00092 };
00093 
00094 #if defined G4TRACKING_ALLOC_EXPORT
00095   extern G4DLLEXPORT G4Allocator<G4SmoothTrajectoryPoint> aSmoothTrajectoryPointAllocator;
00096 #else
00097   extern G4DLLIMPORT G4Allocator<G4SmoothTrajectoryPoint> aSmoothTrajectoryPointAllocator;
00098 #endif
00099 
00100 inline void* G4SmoothTrajectoryPoint::operator new(size_t)
00101 {
00102    void *aTrajectoryPoint;
00103    aTrajectoryPoint = (void *) aSmoothTrajectoryPointAllocator.MallocSingle();
00104    return aTrajectoryPoint;
00105 }
00106 
00107 inline void G4SmoothTrajectoryPoint::operator delete(void *aTrajectoryPoint)
00108 {
00109    aSmoothTrajectoryPointAllocator.FreeSingle((G4SmoothTrajectoryPoint *) aTrajectoryPoint);
00110 }
00111 
00112 #endif
00113 

Generated on Mon May 27 17:49:51 2013 for Geant4 by  doxygen 1.4.7