#include <GIDI_settings.hh>
Definition at line 35 of file GIDI_settings.hh.
GIDI_settings_group::GIDI_settings_group |
( |
std::string const & |
label = "empty" , |
|
|
int |
size = 0 |
|
) |
| |
GIDI_settings_group::GIDI_settings_group |
( |
std::string const & |
label, |
|
|
int |
length, |
|
|
double const * |
values |
|
) |
| |
GIDI_settings_group::GIDI_settings_group |
( |
std::string const & |
label, |
|
|
std::vector< double > const & |
boundaries |
|
) |
| |
Definition at line 28 of file GIDI_settings_group.cc.
30 int size1 = (
int) boundaries.size( );
32 initialize( label, size1, size1, &(boundaries[0]) );
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
Definition at line 37 of file GIDI_settings_group.cc.
39 initialize( group.mLabel, group.size( ), group.size( ), &(group.mBoundaries[0]) );
GIDI_settings_group::~GIDI_settings_group |
( |
| ) |
|
int GIDI_settings_group::getGroupIndexFromEnergy |
( |
double |
energy, |
|
|
bool |
encloseOutOfRange |
|
) |
| const |
Definition at line 63 of file GIDI_settings_group.cc.
65 int iMin = 0, iMid, iMax = (
int) mBoundaries.size( ), iMaxM1 = iMax - 1;
67 if( iMax == 0 )
return( -3 );
68 if(
energy < mBoundaries[0] ) {
69 if( encloseOutOfRange )
return( 0 );
72 if(
energy > mBoundaries[iMaxM1] ) {
73 if( encloseOutOfRange )
return( iMax - 2 );
77 iMid = ( iMin + iMax ) >> 1;
78 if( iMid == iMin )
break;
79 if(
energy < mBoundaries[iMid] ) {
85 if( iMin == iMaxM1 ) iMin--;
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
G4double energy(const ThreeVector &p, const G4double m)
std::string GIDI_settings_group::getLabel |
( |
| ) |
const |
|
inline |
int GIDI_settings_group::getNumberOfGroups |
( |
void |
| ) |
const |
|
inline |
Definition at line 50 of file GIDI_settings.hh.
50 {
return( (
int) ( mBoundaries.size( ) - 1 ) ); }
bool GIDI_settings_group::isLabel |
( |
std::string & |
label | ) |
const |
|
inline |
double GIDI_settings_group::operator[] |
( |
int const |
index | ) |
const |
|
inline |
double const* GIDI_settings_group::pointer |
( |
void |
| ) |
const |
|
inline |
void GIDI_settings_group::print |
( |
bool |
outline = false , |
|
|
int |
valuesPerLine = 10 |
|
) |
| const |
Definition at line 91 of file GIDI_settings_group.cc.
96 std::cout <<
"GROUP: label = '" << mLabel <<
"': length = " << nbs << std::endl;
98 for(
int ib = 0; ib < nbs; ib++ ) {
99 sprintf( buffer,
"%16.8e", mBoundaries[ib] );
101 if( ( ( ib + 1 ) % valuesPerLine ) == 0 ) std::cout << std::endl;
103 if( nbs % valuesPerLine ) std::cout << std::endl;
void GIDI_settings_group::setFromCDoubleArray |
( |
int |
length, |
|
|
double * |
values |
|
) |
| |
int GIDI_settings_group::size |
( |
void |
| ) |
const |
|
inline |
Definition at line 49 of file GIDI_settings.hh.
49 {
return( (
int) mBoundaries.size( ) ); }
The documentation for this class was generated from the following files: