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

#include <GIDI_settings.hh>

Public Member Functions

 GIDI_settings_flux (std::string const &label, double temperature_MeV)
 
 GIDI_settings_flux (char const *label, double temperature_MeV)
 
 GIDI_settings_flux (GIDI_settings_flux const &flux)
 
GIDI_settings_fluxoperator= (const GIDI_settings_flux &flux)
 
 ~GIDI_settings_flux ()
 
GIDI_settings_flux_order const * operator[] (int order) const
 
int getMaxOrder (void) const
 
int size (void) const
 
std::string getLabel () const
 
bool isLabel (std::string const &label) const
 
bool isLabel (char const *label) const
 
double getTemperature () const
 
void addFluxOrder (GIDI_settings_flux_order const &fluxOrder)
 
void print (bool outline=true, int valuesPerLine=10) const
 

Detailed Description

Definition at line 122 of file GIDI_settings.hh.

Constructor & Destructor Documentation

◆ GIDI_settings_flux() [1/3]

GIDI_settings_flux::GIDI_settings_flux ( std::string const & label,
double temperature_MeV )

Definition at line 98 of file GIDI_settings_flux.cc.

98 {
99
100 mLabel = label;
101 mTemperature = temperature;
102}

◆ GIDI_settings_flux() [2/3]

GIDI_settings_flux::GIDI_settings_flux ( char const * label,
double temperature_MeV )

Definition at line 106 of file GIDI_settings_flux.cc.

106 {
107
108 mLabel = label;
109 mTemperature = temperature;
110}

◆ GIDI_settings_flux() [3/3]

GIDI_settings_flux::GIDI_settings_flux ( GIDI_settings_flux const & flux)

Definition at line 114 of file GIDI_settings_flux.cc.

114 {
115
116 mLabel = flux.getLabel( );
117 mTemperature = flux.mTemperature;
118 for( std::vector<GIDI_settings_flux_order>::const_iterator iter = flux.mFluxOrders.begin( ); iter < flux.mFluxOrders.end( ); ++iter ) addFluxOrder( *iter );
119}
void addFluxOrder(GIDI_settings_flux_order const &fluxOrder)

◆ ~GIDI_settings_flux()

GIDI_settings_flux::~GIDI_settings_flux ( )

Definition at line 134 of file GIDI_settings_flux.cc.

134 {
135
136}

Member Function Documentation

◆ addFluxOrder()

void GIDI_settings_flux::addFluxOrder ( GIDI_settings_flux_order const & fluxOrder)

Definition at line 147 of file GIDI_settings_flux.cc.

147 {
148/*
149* Orders can only be added in sequence (e.g., 0 first, then 1, ...).
150*/
151 int order = fluxOrder.getOrder( );
152
153 if( order > (int) mFluxOrders.size( ) ) throw 1;
154 mFluxOrders.push_back( fluxOrder );
155}

Referenced by GIDI_settings_flux(), and operator=().

◆ getLabel()

std::string GIDI_settings_flux::getLabel ( ) const
inline

Definition at line 140 of file GIDI_settings.hh.

140{ return( mLabel ); }

Referenced by GIDI_settings_flux(), and operator=().

◆ getMaxOrder()

int GIDI_settings_flux::getMaxOrder ( void ) const
inline

Definition at line 137 of file GIDI_settings.hh.

137{ return( (int) mFluxOrders.size( ) - 1 ); }

◆ getTemperature()

double GIDI_settings_flux::getTemperature ( ) const
inline

Definition at line 143 of file GIDI_settings.hh.

143{ return( mTemperature ); }

Referenced by GIDI_settings_particle::addFlux(), and GIDI_settings_processedFlux::getTemperature().

◆ isLabel() [1/2]

bool GIDI_settings_flux::isLabel ( char const * label) const
inline

Definition at line 142 of file GIDI_settings.hh.

142{ return( label == mLabel ); }

◆ isLabel() [2/2]

bool GIDI_settings_flux::isLabel ( std::string const & label) const
inline

Definition at line 141 of file GIDI_settings.hh.

141{ return( label == mLabel ); }

◆ operator=()

GIDI_settings_flux & GIDI_settings_flux::operator= ( const GIDI_settings_flux & flux)

Definition at line 123 of file GIDI_settings_flux.cc.

123 {
124 if ( this != &flux ) {
125 mLabel = flux.getLabel();
126 mTemperature = flux.mTemperature;
127 for( std::vector<GIDI_settings_flux_order>::const_iterator iter = flux.mFluxOrders.begin( ); iter < flux.mFluxOrders.end( ); ++iter ) addFluxOrder( *iter );
128 }
129 return *this;
130}
std::string getLabel() const

◆ operator[]()

GIDI_settings_flux_order const * GIDI_settings_flux::operator[] ( int order) const

Definition at line 140 of file GIDI_settings_flux.cc.

140 {
141
142 return( &(mFluxOrders[index]) );
143}

◆ print()

void GIDI_settings_flux::print ( bool outline = true,
int valuesPerLine = 10 ) const

Definition at line 159 of file GIDI_settings_flux.cc.

159 {
160
161 std::cout << "FLUX: label = '" << mLabel << "': maximum order = " << ( size( ) + 1 ) << std::endl;
162 if( outline ) return;
163 for( std::vector<GIDI_settings_flux_order>::const_iterator iter = mFluxOrders.begin( ); iter < mFluxOrders.end( ); ++iter ) iter->print( valuesPerLine );
164}
int size(void) const

◆ size()

int GIDI_settings_flux::size ( void ) const
inline

Definition at line 138 of file GIDI_settings.hh.

138{ return( (int) mFluxOrders.size( ) ); }

Referenced by GIDI_settings_processedFlux::GIDI_settings_processedFlux(), GIDI_settings_processedFlux::operator=(), and print().


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