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

#include <GIDI_settings.hh>

Public Member Functions

 GIDI_settings_processedFlux (GIDI_settings_flux const &flux, GIDI::ptwXPoints *groupX)
 
 GIDI_settings_processedFlux (GIDI_settings_processedFlux const &flux)
 
GIDI_settings_processedFluxoperator= (const GIDI_settings_processedFlux &flux)
 
 ~GIDI_settings_processedFlux ()
 
double getTemperature () const
 
GIDI::ptwXPoints * groupFunction (GIDI::statusMessageReporting *smr, GIDI::ptwXPoints *groupX, GIDI::ptwXYPoints *ptwXY1, int order) const
 

Detailed Description

Definition at line 171 of file GIDI_settings.hh.

Constructor & Destructor Documentation

◆ GIDI_settings_processedFlux() [1/2]

GIDI_settings_processedFlux::GIDI_settings_processedFlux ( GIDI_settings_flux const &  flux,
GIDI::ptwXPoints *  groupX 
)

◆ GIDI_settings_processedFlux() [2/2]

GIDI_settings_processedFlux::GIDI_settings_processedFlux ( GIDI_settings_processedFlux const &  flux)

Definition at line 156 of file GIDI_settings_particle.cc.

156 : mFlux( flux.mFlux ) {
157
158 nfu_status status_nf;
159 ptwXYPoints *fluxXY;
160 ptwXPoints *fluxX;
161
162 for( int order = 0; order < (int) mFlux.size( ); ++order ) {
163 if( ( fluxXY = ptwXY_clone( flux.mFluxXY[order], &status_nf ) ) == NULL ) goto err;
164 mFluxXY.push_back( fluxXY );
165 if( ( fluxX = ptwX_clone( flux.mGroupedFlux[order], &status_nf ) ) == NULL ) goto err;
166 mGroupedFlux.push_back( fluxX );
167 }
168 return;
169
170err:
171 for( std::vector<ptwXYPoints *>::iterator iter = mFluxXY.begin( ); iter != mFluxXY.end( ); ++iter ) ptwXY_free( *iter );
172 for( std::vector<ptwXPoints *>::iterator iter = mGroupedFlux.begin( ); iter != mGroupedFlux.end( ); ++iter ) ptwX_free( *iter );
173 throw 1;
174}
int size(void) const
enum nfu_status_e nfu_status
ptwXYPoints * ptwXY_free(ptwXYPoints *ptwXY)
Definition: ptwXY_core.cc:574
ptwXYPoints * ptwXY_clone(ptwXYPoints *ptwXY, nfu_status *status)
Definition: ptwXY_core.cc:208
ptwXPoints * ptwX_clone(ptwXPoints *ptwX, nfu_status *status)
Definition: ptwX_core.cc:88
ptwXPoints * ptwX_free(ptwXPoints *ptwX)
Definition: ptwX_core.cc:158

◆ ~GIDI_settings_processedFlux()

GIDI_settings_processedFlux::~GIDI_settings_processedFlux ( )

Definition at line 205 of file GIDI_settings_particle.cc.

205 {
206
207 for( std::vector<ptwXYPoints *>::iterator iter = mFluxXY.begin( ); iter != mFluxXY.end( ); ++iter ) ptwXY_free( *iter );
208 for( std::vector<ptwXPoints *>::iterator iter = mGroupedFlux.begin( ); iter != mGroupedFlux.end( ); ++iter ) ptwX_free( *iter );
209}

Member Function Documentation

◆ getTemperature()

double GIDI_settings_processedFlux::getTemperature ( ) const
inline

Definition at line 184 of file GIDI_settings.hh.

184{ return( mFlux.getTemperature( ) ); }
double getTemperature() const

◆ groupFunction()

ptwXPoints * GIDI_settings_processedFlux::groupFunction ( GIDI::statusMessageReporting *  smr,
GIDI::ptwXPoints *  groupX,
GIDI::ptwXYPoints *  ptwXY1,
int  order 
) const

Definition at line 213 of file GIDI_settings_particle.cc.

213 {
214
215 nfu_status status_nf;
216 ptwXYPoints *fluxXY;
217 ptwXPoints *groupedX;
218
219 if( groupX == NULL ) return( NULL );
220 if( order < 0 ) order = 0;
221 if( order >= (int) mFluxXY.size( ) ) order = (int) mFluxXY.size( ) - 1;
222
223 fluxXY = ptwXY_xSlice( mFluxXY[order], ptwXY_getXMin( ptwXY1 ), ptwXY_getXMax( ptwXY1 ), 10, 1, &status_nf );
224// if( fluxXY == NULL ) smr_setReportError2( smr, smr_unknownID, 1, "ptwXY_xSlice error %d: %s", status_nf, nfu_statusMessage( status_nf ) );
225
226 groupedX = ptwXY_groupTwoFunctions( ptwXY1, fluxXY, groupX, ptwXY_group_normType_norm, mGroupedFlux[order], &status_nf );
227 ptwXY_free( fluxXY );
228// if( groupedX == NULL ) smr_setReportError2( smr, smr_unknownID, 1, "ptwXY_groupTwoFunctions error %d: %s", status_nf, nfu_statusMessage( status_nf ) );
229 return( groupedX );
230}
ptwXYPoints * ptwXY_xSlice(ptwXYPoints *ptwXY, double xMin, double xMax, int64_t secondarySize, int fill, nfu_status *status)
Definition: ptwXY_core.cc:274
@ ptwXY_group_normType_norm
Definition: ptwXY.h:28
double ptwXY_getXMin(ptwXYPoints *ptwXY)
Definition: ptwXY_core.cc:1206
ptwXPoints * ptwXY_groupTwoFunctions(ptwXYPoints *ptwXY1, ptwXYPoints *ptwXY2, ptwXPoints *groupBoundaries, ptwXY_group_normType normType, ptwXPoints *ptwX_norm, nfu_status *status)
double ptwXY_getXMax(ptwXYPoints *ptwXY)
Definition: ptwXY_core.cc:1239

Referenced by GIDI_settings_particle::groupFunction().

◆ operator=()

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

Definition at line 178 of file GIDI_settings_particle.cc.

178 {
179 if ( this != &flux ) {
180 // Clean-up existing things
181 for( std::vector<ptwXYPoints *>::iterator iter = mFluxXY.begin( ); iter != mFluxXY.end( ); ++iter ) ptwXY_free( *iter );
182 for( std::vector<ptwXPoints *>::iterator iter = mGroupedFlux.begin( ); iter != mGroupedFlux.end( ); ++iter ) ptwX_free( *iter );
183 // Now assign
184 mFlux = flux.mFlux;
185 nfu_status status_nf;
186 ptwXYPoints *fluxXY;
187 ptwXPoints *fluxX;
188 for( int order = 0; order < (int) mFlux.size( ); ++order ) {
189 if( ( fluxXY = ptwXY_clone( flux.mFluxXY[order], &status_nf ) ) == NULL ) goto err;
190 mFluxXY.push_back( fluxXY );
191 if( ( fluxX = ptwX_clone( flux.mGroupedFlux[order], &status_nf ) ) == NULL ) goto err;
192 mGroupedFlux.push_back( fluxX );
193 }
194 }
195 return *this;
196
197err:
198 for( std::vector<ptwXYPoints *>::iterator iter = mFluxXY.begin( ); iter != mFluxXY.end( ); ++iter ) ptwXY_free( *iter );
199 for( std::vector<ptwXPoints *>::iterator iter = mGroupedFlux.begin( ); iter != mGroupedFlux.end( ); ++iter ) ptwX_free( *iter );
200 throw 1;
201}

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