Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
xDataTOM_LegendreSeries.cc File Reference
#include <string.h>
#include "xDataTOM_private.h"

Go to the source code of this file.

Functions

int xDataTOM_LegendreSeries_initialize (statusMessageReporting *smr, xDataTOM_LegendreSeries *LegendreSeries, int index, int length, double value)
 
int xDataTOM_LegendreSeries_release (xDataTOM_LegendreSeries *LegendreSeries)
 

Function Documentation

◆ xDataTOM_LegendreSeries_initialize()

int xDataTOM_LegendreSeries_initialize ( statusMessageReporting smr,
xDataTOM_LegendreSeries LegendreSeries,
int  index,
int  length,
double  value 
)

Definition at line 17 of file xDataTOM_LegendreSeries.cc.

17 {
18
19 LegendreSeries->LegendreSeries = NULL;
20 LegendreSeries->index = index;
21 LegendreSeries->length = length;
22 LegendreSeries->value = value;
23 if( ( LegendreSeries->LegendreSeries = (double *) smr_malloc2( smr, length * sizeof( double ), 0, "LegendreSeries->LegendreSeries" ) ) == NULL ) return( 1 );
24
25 return( 0 );
26}
#define smr_malloc2(smr, size, zero, forItem)

◆ xDataTOM_LegendreSeries_release()

int xDataTOM_LegendreSeries_release ( xDataTOM_LegendreSeries LegendreSeries)

Definition at line 30 of file xDataTOM_LegendreSeries.cc.

30 {
31
32 if( LegendreSeries == NULL ) return( 0 );
33 smr_freeMemory( (void **) &(LegendreSeries->LegendreSeries) );
34 return( 0 );
35}
void * smr_freeMemory(void **p)

Referenced by xDataTOM_W_XYs_LegendreSeries_release().