Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4VUserTrackInformation Class Reference

#include <G4VUserTrackInformation.hh>

+ Inheritance diagram for G4VUserTrackInformation:

Public Member Functions

 G4VUserTrackInformation ()=default
 
 G4VUserTrackInformation (const G4String &infoType)
 
 G4VUserTrackInformation (const G4VUserTrackInformation &)
 
G4VUserTrackInformationoperator= (const G4VUserTrackInformation &)
 
virtual ~G4VUserTrackInformation ()
 
virtual void Print () const
 
const G4StringGetType () const
 

Protected Attributes

G4StringpType = nullptr
 

Detailed Description

Definition at line 54 of file G4VUserTrackInformation.hh.

Constructor & Destructor Documentation

◆ G4VUserTrackInformation() [1/3]

G4VUserTrackInformation::G4VUserTrackInformation ( )
default

◆ G4VUserTrackInformation() [2/3]

G4VUserTrackInformation::G4VUserTrackInformation ( const G4String & infoType)

Definition at line 34 of file G4VUserTrackInformation.cc.

35{
36 pType = new G4String(infoType);
37}

◆ G4VUserTrackInformation() [3/3]

G4VUserTrackInformation::G4VUserTrackInformation ( const G4VUserTrackInformation & right)

Definition at line 46 of file G4VUserTrackInformation.cc.

48{
49 if(right.pType != nullptr)
50 pType = new G4String(*(right.pType));
51}

◆ ~G4VUserTrackInformation()

G4VUserTrackInformation::~G4VUserTrackInformation ( )
virtual

Definition at line 40 of file G4VUserTrackInformation.cc.

41{
42 delete pType;
43}

Member Function Documentation

◆ GetType()

const G4String & G4VUserTrackInformation::GetType ( ) const

Definition at line 70 of file G4VUserTrackInformation.cc.

71{
72 static const G4String NOTYPE = "NONE";
73 if(pType != nullptr)
74 return *pType;
75 return NOTYPE;
76}

Referenced by G4ScintillationTrackInformation::IsScintillationTrackInformation().

◆ operator=()

G4VUserTrackInformation & G4VUserTrackInformation::operator= ( const G4VUserTrackInformation & right)

Definition at line 55 of file G4VUserTrackInformation.cc.

56{
57 if(this != &right)
58 {
59 delete pType;
60
61 if(right.pType != nullptr)
62 pType = new G4String(*(right.pType));
63 else
64 pType = nullptr;
65 }
66 return *this;
67}

◆ Print()

virtual void G4VUserTrackInformation::Print ( ) const
inlinevirtual

Reimplemented in G4IT, and G4ScintillationTrackInformation.

Definition at line 68 of file G4VUserTrackInformation.hh.

68{};

Member Data Documentation

◆ pType

G4String* G4VUserTrackInformation::pType = nullptr
protected

The documentation for this class was generated from the following files: