G4XnpTotal Class Reference

#include <G4XnpTotal.hh>

Inheritance diagram for G4XnpTotal:

G4CrossSectionPatch G4VCrossSectionSource

Public Member Functions

 G4XnpTotal ()
virtual ~G4XnpTotal ()
G4bool operator== (const G4XnpTotal &right) const
G4bool operator!= (const G4XnpTotal &right) const
virtual const G4CrossSectionVectorGetComponents () const
virtual G4String Name () const

Detailed Description

Definition at line 50 of file G4XnpTotal.hh.


Constructor & Destructor Documentation

G4XnpTotal::G4XnpTotal (  ) 

Definition at line 53 of file G4XnpTotal.cc.

00054 { 
00055   components = new G4CrossSectionVector;
00056 
00057   G4VCrossSectionSource* xnpTotalLowE = new G4XnpTotalLowE;
00058   components->push_back(xnpTotalLowE);
00059 
00060   G4VCrossSectionSource* xnpTotalHighE = new G4XPDGTotal;
00061   components->push_back(xnpTotalHighE);
00062 }

G4XnpTotal::~G4XnpTotal (  )  [virtual]

Definition at line 65 of file G4XnpTotal.cc.

References GetComponents().

00066 { 
00067   if (components != 0) 
00068     {
00069       G4int nComponents = this->GetComponents()->size();
00070       G4int i;
00071       for (i=0; i<nComponents; i++)
00072         {
00073           G4CrossSectionSourcePtr componentPtr = (*components)[i];
00074           G4VCrossSectionSource* component = componentPtr();
00075           delete component;
00076           component = 0;
00077           componentPtr = 0;
00078         }
00079     }
00080   delete components;
00081   components = 0;
00082 }


Member Function Documentation

virtual const G4CrossSectionVector* G4XnpTotal::GetComponents (  )  const [inline, virtual]

Implements G4CrossSectionPatch.

Definition at line 62 of file G4XnpTotal.hh.

Referenced by ~G4XnpTotal().

00062 { return components; } 

G4String G4XnpTotal::Name (  )  const [virtual]

Implements G4VCrossSectionSource.

Definition at line 97 of file G4XnpTotal.cc.

00098 {
00099   G4String name("npTotal");
00100   return name;
00101 }

G4bool G4XnpTotal::operator!= ( const G4XnpTotal right  )  const

Definition at line 91 of file G4XnpTotal.cc.

00092 {
00093   return (this != (G4XnpTotal*) &right);
00094 }

G4bool G4XnpTotal::operator== ( const G4XnpTotal right  )  const

Definition at line 85 of file G4XnpTotal.cc.

00086 {
00087   return (this == (G4XnpTotal*) &right);
00088 }


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