Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GIDI_settings_flux_order Class Reference

#include <GIDI_settings.hh>

Public Member Functions

 GIDI_settings_flux_order (int order)
 
 GIDI_settings_flux_order (int order, int length, double const *energies, double const *fluxes)
 
 GIDI_settings_flux_order (int order, std::vector< double > const &energies, std::vector< double > const &fluxes)
 
 GIDI_settings_flux_order (GIDI_settings_flux_order const &fluxOrder)
 
 ~GIDI_settings_flux_order ()
 
int getOrder (void) const
 
int size (void) const
 
double const * getEnergies (void) const
 
double const * getFluxes (void) const
 
void print (int valuesPerLine=10) const
 

Detailed Description

This class stores the flux for one Legendre order (see class GIDI_settings_flux).

Definition at line 91 of file GIDI_settings.hh.

Constructor & Destructor Documentation

GIDI_settings_flux_order::GIDI_settings_flux_order ( int  order)
Parameters
orderThe Legendre order for this flux data.

Definition at line 15 of file GIDI_settings_flux.cc.

15  {
16 
17  if( order < 0 ) throw 1;
18  mOrder = order;
19 }
GIDI_settings_flux_order::GIDI_settings_flux_order ( int  order,
int  length,
double const *  energies,
double const *  fluxes 
)
Parameters
orderThe Legendre order for this flux data.
lengthThe number or values in energies and fluxes.
energiesList of energies where flux is given.
fluxesList of flux value for each energies value.

Definition at line 23 of file GIDI_settings_flux.cc.

23  {
24 
25  initialize( order, length, energies, fluxes );
26 }

Here is the call graph for this function:

GIDI_settings_flux_order::GIDI_settings_flux_order ( int  order,
std::vector< double > const &  energies,
std::vector< double > const &  fluxes 
)
Parameters
orderThe Legendre order for this flux data.
energiesList of energies where flux is given.
fluxesList of flux value for each energies value.

Definition at line 30 of file GIDI_settings_flux.cc.

30  {
31 
32  int length = (int) energies.size( );
33 
34  if( length != (int) fluxes.size( ) ) throw 1;
35  initialize( order, length, &(energies[0]), &(fluxes[0]) );
36 }
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)

Here is the call graph for this function:

GIDI_settings_flux_order::GIDI_settings_flux_order ( GIDI_settings_flux_order const &  fluxOrder)
Parameters
fluxOrderLegendre flux order to copy.

Definition at line 40 of file GIDI_settings_flux.cc.

40  {
41 
42  initialize( fluxOrder.mOrder, fluxOrder.size( ), &(fluxOrder.mEnergies[0]), &(fluxOrder.mFluxes[0]) );
43 }

Here is the call graph for this function:

GIDI_settings_flux_order::~GIDI_settings_flux_order ( )

Definition at line 59 of file GIDI_settings_flux.cc.

59  {
60 
61 }

Member Function Documentation

double const* GIDI_settings_flux_order::getEnergies ( void  ) const
inline

Definition at line 112 of file GIDI_settings.hh.

112 { return( &(mEnergies[0]) ); }
double const* GIDI_settings_flux_order::getFluxes ( void  ) const
inline

Definition at line 113 of file GIDI_settings.hh.

113 { return( &(mFluxes[0]) ); }
int GIDI_settings_flux_order::getOrder ( void  ) const
inline

Definition at line 110 of file GIDI_settings.hh.

110 { return( mOrder ); }

Here is the caller graph for this function:

void GIDI_settings_flux_order::print ( int  valuesPerLine = 10) const

Definition at line 65 of file GIDI_settings_flux.cc.

65  {
66 
67  int nE = (int) mEnergies.size( );
68  bool printIndent = true;
69  char buffer[2 * 128];
70 
71  std::cout << " ORDER: " << mOrder << std::endl;
72  for( int iE = 0; iE < nE; ++iE ) {
73  if( printIndent ) std::cout << " ";
74  printIndent = false;
75  sprintf( buffer, " %15.8e %15.8e", mEnergies[iE], mFluxes[iE] );
76  std::cout << buffer;
77  if( ( ( iE + 1 ) % valuesPerLine ) == 0 ) {
78  std::cout << std::endl;
79  printIndent = true;
80  }
81  }
82  if( nE % valuesPerLine ) std::cout << std::endl;
83 }
#define buffer
Definition: xmlparse.cc:628
static const G4int nE
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)

Here is the call graph for this function:

int GIDI_settings_flux_order::size ( void  ) const
inline

Definition at line 111 of file GIDI_settings.hh.

111 { return( (int) mEnergies.size( ) ); }

Here is the caller graph for this function:


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