38 #include <rl_DielectricPODArray.h> 56 int diel_compare(
const void *ck,
66 {
if ( data_ ) {
delete [] data_; } }
88 }
catch ( std::exception& bad_alloc ) {
90 char msg[256] =
"rl_DielectricPODArray(nelts,energy,alpha,gamma): " 91 "unable to allocate rl_DielectricPOD array";
96 init( nelts, energy, alpha, gamma );
108 }
catch ( std::exception& bad_alloc ) {
110 char msg[] =
"rl_DielectricPODArray(nelts,diel): " 111 "unable to allocate rl_DielectricPOD array";
121 double const* energy,
123 double const* gamma )
125 for (
size_t n = 0 ; n < nelts ; ++n )
141 for (
size_t n = 0 ; n < nelts ; ++n )
154 cprint_on( std::FILE* of,
char const pre[],
char const pst[] )
const 156 if ( std::strlen(pre) ) { std::fprintf(of,
"%s", pre); }
157 for (
size_t i = 0 ; i <
nelts_ ; ++i )
159 std::fprintf(of,
"%.15e %.15e %.15e\n",
162 if ( std::strlen(pst) ) { std::fprintf(of,
"%s", pst); }
165 int diel_compare(
const void *ck,
169 double *pk = (
double*) ck;
172 if ( *pk < pe->energy_ )
rl_Traits::rl_DielectricPOD * data_
pointer to the data
double alpha_
dielectric decrement, real part
The exception thrown by the rl_RayLib and rl_RaySupLib libraries.
double gamma_
dielectric decrement, imag part
void init(size_t nelts, double const *energy, double const *alpha, double const *gamma)
Initializer.
size_t nelts_
number of dielectric decrements read in
~rl_DielectricPODArray()
Destructor.
double energy_
energy (keV)
void cprint_on(std::FILE *of, char const pre[]="", char const pst[]="") const
Accessor.
rl_DielectricPODArray()
Default constructor.