Geant4-11
Public Member Functions | Private Attributes
GIDI_settings_flux Class Reference

#include <GIDI_settings.hh>

Public Member Functions

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

Private Attributes

std::vector< GIDI_settings_flux_ordermFluxOrders
 
std::string mLabel
 
double mTemperature
 

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}

References mLabel, and mTemperature.

◆ 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}

References mLabel, and mTemperature.

◆ 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)

References addFluxOrder(), getLabel(), mFluxOrders, mLabel, and mTemperature.

◆ ~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}
std::vector< GIDI_settings_flux_order > mFluxOrders

References GIDI_settings_flux_order::getOrder(), and mFluxOrders.

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 ); }

References 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 ); }

References mFluxOrders.

◆ getTemperature()

double GIDI_settings_flux::getTemperature ( ) const
inline

Definition at line 143 of file GIDI_settings.hh.

143{ return( mTemperature ); }

References 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 ); }

References 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 ); }

References 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();
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

References addFluxOrder(), getLabel(), mFluxOrders, mLabel, and mTemperature.

◆ 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}

References mFluxOrders.

◆ 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

References mFluxOrders, mLabel, and size().

◆ size()

int GIDI_settings_flux::size ( void  ) const
inline

Definition at line 138 of file GIDI_settings.hh.

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

References mFluxOrders.

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

Field Documentation

◆ mFluxOrders

std::vector<GIDI_settings_flux_order> GIDI_settings_flux::mFluxOrders
private

List of fluxes for each Legendre order, l, sorted by Legendre order starting with l = 0.

Definition at line 127 of file GIDI_settings.hh.

Referenced by addFluxOrder(), getMaxOrder(), GIDI_settings_flux(), operator=(), operator[](), print(), and size().

◆ mLabel

std::string GIDI_settings_flux::mLabel
private

Label for the flux.

Definition at line 125 of file GIDI_settings.hh.

Referenced by getLabel(), GIDI_settings_flux(), isLabel(), operator=(), and print().

◆ mTemperature

double GIDI_settings_flux::mTemperature
private

Definition at line 126 of file GIDI_settings.hh.

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


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