Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
xDataTOM.h File Reference
Include dependency graph for xDataTOM.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  xDataTOM_interpolation_s
 
struct  xDataTOM_axis_s
 
struct  xDataTOM_axes_s
 
struct  xDataTOM_subAxes_s
 
struct  xDataTOM_XYs_s
 
struct  xDataTOM_regionsXYs_s
 
struct  xDataTOM_W_XYs_s
 
struct  xDataTOM_V_W_XYs_s
 
struct  xDataTOM_LegendreSeries_s
 
struct  xDataTOM_W_XYs_LegendreSeries_s
 
struct  xDataTOM_regionsW_XYs_LegendreSeries_s
 
struct  xDataTOM_V_W_XYs_LegendreSeries_s
 
struct  xDataTOM_KalbachMannCoefficients_s
 
struct  xDataTOM_KalbachMann_s
 
struct  xDataTOM_polynomial_s
 
struct  xDataTOM_xDataInfo_s
 
struct  xDataTOM_attribute_s
 
struct  xDataTOM_attributionList_s
 
struct  xDataTOM_elementListItem_s
 
struct  xDataTOM_elementList_s
 
struct  xDataTOM_element_s
 
struct  xDataTOM_TOM_s
 

Macros

#define xDataTOMMisc_allocateCopyString2(smr, s, forItem)   xDataTOMMisc_allocateCopyString( smr, s, forItem, __FILE__, __LINE__ )
 

Typedefs

typedef int xDataTOM_Int
 
typedef struct
xDataTOM_interpolation_s 
xDataTOM_interpolation
 
typedef struct xDataTOM_axis_s xDataTOM_axis
 
typedef struct xDataTOM_axes_s xDataTOM_axes
 
typedef struct xDataTOM_subAxes_s xDataTOM_subAxes
 
typedef struct xDataTOM_XYs_s xDataTOM_XYs
 
typedef struct
xDataTOM_regionsXYs_s 
xDataTOM_regionsXYs
 
typedef struct xDataTOM_W_XYs_s xDataTOM_W_XYs
 
typedef struct xDataTOM_V_W_XYs_s xDataTOM_V_W_XYs
 
typedef struct
xDataTOM_LegendreSeries_s 
xDataTOM_LegendreSeries
 
typedef struct
xDataTOM_W_XYs_LegendreSeries_s 
xDataTOM_W_XYs_LegendreSeries
 
typedef struct
xDataTOM_regionsW_XYs_LegendreSeries_s 
xDataTOM_regionsW_XYs_LegendreSeries
 
typedef struct
xDataTOM_V_W_XYs_LegendreSeries_s 
xDataTOM_V_W_XYs_LegendreSeries
 
typedef struct
xDataTOM_KalbachMannCoefficients_s 
xDataTOM_KalbachMannCoefficients
 
typedef struct
xDataTOM_KalbachMann_s 
xDataTOM_KalbachMann
 
typedef struct
xDataTOM_polynomial_s 
xDataTOM_polynomial
 
typedef struct xDataTOM_xDataInfo_s xDataTOM_xDataInfo
 
typedef struct xDataTOM_attribute_s xDataTOM_attribute
 
typedef struct
xDataTOM_attributionList_s 
xDataTOM_attributionList
 
typedef struct
xDataTOM_elementListItem_s 
xDataTOM_elementListItem
 
typedef struct
xDataTOM_elementList_s 
xDataTOM_elementList
 
typedef struct xDataTOM_element_s xDataTOM_element
 
typedef struct xDataTOM_TOM_s xDataTOM_TOM
 
typedef int(* xDataTOM_sortElementFunc )(const void *, const void *)
 

Enumerations

enum  xDataTOM_interpolationFlag {
  xDataTOM_interpolationFlag_invalid, xDataTOM_interpolationFlag_linear, xDataTOM_interpolationFlag_log, xDataTOM_interpolationFlag_byRegion,
  xDataTOM_interpolationFlag_flat
}
 
enum  xDataTOM_interpolationQualifier {
  xDataTOM_interpolationQualifier_invalid, xDataTOM_interpolationQualifier_dependent, xDataTOM_interpolationQualifier_none, xDataTOM_interpolationQualifier_unitBase,
  xDataTOM_interpolationQualifier_correspondingPoints
}
 
enum  xDataTOM_frame { xDataTOM_frame_invalid, xDataTOM_frame_lab, xDataTOM_frame_centerOfMass }
 
enum  xDataTOM_subAxesType { xDataTOM_subAxesType_proxy, xDataTOM_subAxesType_intepolationAxes }
 
enum  xDataTOM_KalbachMannType { xDataTOM_KalbachMannType_fr, xDataTOM_KalbachMannType_fra }
 

Functions

xDataTOM_TOMxDataTOM_importFile (statusMessageReporting *smr, const char *fileName)
 
xDataTOM_TOMxDataTOM_mallocTOM (statusMessageReporting *smr)
 
int xDataTOM_initializeTOM (statusMessageReporting *smr, xDataTOM_TOM *doc)
 
voidxDataTOM_freeTOM (statusMessageReporting *smr, xDataTOM_TOM **TOM)
 
int xDataTOM_setFileNameTOM (statusMessageReporting *smr, xDataTOM_TOM *doc, const char *fileName)
 
void xDataTOM_displayTree (statusMessageReporting *smr, xDataTOM_TOM *TOM, int printAttributes)
 
xDataTOM_elementxDataTOM_mallocElement (statusMessageReporting *smr, xDataTOM_element *parent, int ordinal, int index, char const *name)
 
void xDataTOM_freeElement (xDataTOM_element **element)
 
void xDataTOM_releaseElement (xDataTOM_element *element)
 
xDataTOM_elementxDataTOM_addElementInElement (statusMessageReporting *smr, xDataTOM_element *parent, int index, char const *name)
 
xDataTOM_elementxDataTOM_getDocumentsElement (xDataTOM_TOM *TOM)
 
xDataTOM_elementxDataTOME_getFirstElement (xDataTOM_element *element)
 
xDataTOM_elementxDataTOME_getNextElement (xDataTOM_element *element)
 
xDataTOM_elementxDataTOME_getOneElementByName (statusMessageReporting *smr, xDataTOM_element *element, char const *name, int required)
 
int xDataTOM_numberOfElementsByName (statusMessageReporting *smr, xDataTOM_element *element, char const *name)
 
int xDataTOME_addAttribute (statusMessageReporting *smr, xDataTOM_element *element, char const *name, char const *value)
 
char const * xDataTOM_getAttributesValueInElement (xDataTOM_element *element, char const *name)
 
int xDataTOME_copyAttributionList (statusMessageReporting *smr, xDataTOM_attributionList *desc, xDataTOM_element *element)
 
int xDataTOME_convertAttributeToInteger (statusMessageReporting *smr, xDataTOM_element *element, char const *name, int *n)
 
int xDataTOME_convertAttributeToDouble (statusMessageReporting *smr, xDataTOM_element *element, char const *name, double *d)
 
int xDataTOME_convertAttributeToDoubleWithUnit (statusMessageReporting *smr, xDataTOM_element *element, char const *name, double *d, char *unit)
 
int xDataTOME_getInterpolation (statusMessageReporting *smr, xDataTOM_element *element, int index, enum xDataTOM_interpolationFlag *independent, enum xDataTOM_interpolationFlag *dependent, enum xDataTOM_interpolationQualifier *qualifier)
 
void xDataTOMAL_initial (statusMessageReporting *smr, xDataTOM_attributionList *attributes)
 
void xDataTOMAL_release (xDataTOM_attributionList *attributes)
 
int xDataTOMAL_addAttribute (statusMessageReporting *smr, xDataTOM_attributionList *attributes, char const *name, char const *value)
 
char const * xDataTOMAL_getAttributesValue (xDataTOM_attributionList *attributes, char const *name)
 
int xDataTOMAL_copyAttributionList (statusMessageReporting *smr, xDataTOM_attributionList *desc, xDataTOM_attributionList *src)
 
int xDataTOMAL_convertAttributeToInteger (statusMessageReporting *smr, xDataTOM_attributionList *attributes, char const *name, int *n)
 
int xDataTOMAL_convertAttributeToDouble (statusMessageReporting *smr, xDataTOM_attributionList *attributes, char const *name, double *d)
 
voidxData_initializeData (statusMessageReporting *smr, xDataTOM_element *TE, char const *ID, size_t size)
 
int xDataTOM_isXDataID (xDataTOM_element *TE, char const *ID)
 
char * xDataTOMMisc_getAbsPath (statusMessageReporting *smr, const char *fileName)
 
int xDataTOM_setMessageError_ReturnInt (int value, statusMessageReporting *smr, void *userData, const char *file, int line, int code, const char *fmt,...)
 
xDataTOM_elementxDataTOM_getLinksElement (statusMessageReporting *smr, xDataTOM_element *element, char const *link)
 
int xDataTOM_interpolation_set (statusMessageReporting *smr, xDataTOM_interpolation *interpolation, enum xDataTOM_interpolationFlag independent, enum xDataTOM_interpolationFlag dependent, enum xDataTOM_interpolationQualifier qualifier)
 
int xDataTOM_interpolation_setFromString (statusMessageReporting *smr, xDataTOM_interpolation *interpolation, char const *str)
 
int xDataTOM_interpolation_copy (statusMessageReporting *smr, xDataTOM_interpolation *desc, xDataTOM_interpolation *src)
 
int xDataTOM_axes_initialize (statusMessageReporting *smr, xDataTOM_axes *axes, int numberOfAxes)
 
int xDataTOM_axes_release (xDataTOM_axes *axes)
 
char const * xDataTOM_axes_getLabel (statusMessageReporting *smr, xDataTOM_axes *axes, int index)
 
char const * xDataTOM_axes_getUnit (statusMessageReporting *smr, xDataTOM_axes *axes, int index)
 
int xDataTOM_axes_getInterpolation (statusMessageReporting *smr, xDataTOM_axes *axes, int index, enum xDataTOM_interpolationFlag *independent, enum xDataTOM_interpolationFlag *dependent, enum xDataTOM_interpolationQualifier *qualifier)
 
int xDataTOM_subAxes_initialize (statusMessageReporting *smr, xDataTOM_subAxes *subAxes, enum xDataTOM_subAxesType type, int offset, xDataTOM_axes *axes, xDataTOM_interpolation *interpolation)
 
int xDataTOM_subAxes_release (xDataTOM_subAxes *subAxes)
 
char const * xDataTOM_subAxes_getLabel (statusMessageReporting *smr, xDataTOM_subAxes *subAxes, int index)
 
char const * xDataTOM_subAxes_getUnit (statusMessageReporting *smr, xDataTOM_subAxes *subAxes, int index)
 
xDataTOM_axisxDataTOM_axis_new (statusMessageReporting *smr, int index, char const *label, char const *unit, xDataTOM_interpolation *interpolation)
 
int xDataTOM_axis_initialize (statusMessageReporting *smr, xDataTOM_axis *axis, int index, char const *label, char const *unit, xDataTOM_interpolation *interpolation)
 
xDataTOM_axisxDataTOM_axis_release (statusMessageReporting *smr, xDataTOM_axis *axis)
 
enum xDataTOM_frame xDataTOM_axis_stringToFrame (statusMessageReporting *smr, char const *frame)
 
char const * xDataTOM_axis_frameToString (statusMessageReporting *smr, enum xDataTOM_frame frame)
 
int xDataTOM_XYs_free (xDataTOM_xDataInfo *xDI)
 
int xDataTOM_XYs_release (xDataTOM_XYs *XYs)
 
int xDataTOM_XYs_getData (xDataTOM_XYs *XYs, double **data)
 
int xDataTOM_XYs_getDataFromXDataInfo (xDataTOM_xDataInfo *xDI, double **data)
 
int xDataTOM_regionsXYs_free (xDataTOM_xDataInfo *xDI)
 
xDataTOM_W_XYsxDataTOM_W_XYs_new (statusMessageReporting *smr, int index, int length, double value, xDataTOM_axes *axes, int axesOffset)
 
int xDataTOM_W_XYs_initialize (statusMessageReporting *smr, xDataTOM_W_XYs *W_XYs, int index, int length, double value, xDataTOM_axes *axes, int axesOffset)
 
xDataTOM_W_XYsxDataTOM_W_XYs_free (xDataTOM_W_XYs *W_XYs)
 
int xDataTOM_W_XYs_freeFrom_xDataInfo (xDataTOM_xDataInfo *xDI)
 
int xDataTOM_W_XYs_release (xDataTOM_W_XYs *W_XYs)
 
xDataTOM_xDataInfoxDataTOME_getXData (xDataTOM_element *TE)
 
voidxDataTOME_getXDataIfID (statusMessageReporting *smr, xDataTOM_element *TE, char const *ID)
 
int xDataTOM_V_W_XYs_initialize (statusMessageReporting *smr, xDataTOM_V_W_XYs *V_W_XYs, int length, xDataTOM_axes *axes)
 
int xDataTOM_V_W_XYs_free (xDataTOM_xDataInfo *xDI)
 
int xDataTOM_LegendreSeries_initialize (statusMessageReporting *smr, xDataTOM_LegendreSeries *LegendreSeries, int index, int length, double value)
 
int xDataTOM_LegendreSeries_release (xDataTOM_LegendreSeries *LegendreSeries)
 
int xDataTOM_W_XYs_LegendreSeries_initialize (statusMessageReporting *smr, xDataTOM_W_XYs_LegendreSeries *W_XYs_LegendreSeries, int index, int length, double value, enum xDataTOM_subAxesType subAxesType, xDataTOM_axes *axes, xDataTOM_interpolation *interpolation)
 
int xDataTOM_W_XYs_LegendreSeries_free (xDataTOM_xDataInfo *xDI)
 
int xDataTOM_W_XYs_LegendreSeries_release (xDataTOM_W_XYs_LegendreSeries *W_XYs_LegendreSeries)
 
int xDataTOM_regionsW_XYs_LegendreSeries_initialize (statusMessageReporting *smr, xDataTOM_regionsW_XYs_LegendreSeries *regionsW_XYs_LegendreSeries, int length, xDataTOM_axes *axes)
 
int xDataTOM_regionsW_XYs_LegendreSeries_free (xDataTOM_xDataInfo *xDI)
 
int xDataTOM_regionsW_XYs_LegendreSeries_release (xDataTOM_regionsW_XYs_LegendreSeries *regionsW_XYs_LegendreSeries)
 
int xDataTOM_V_W_XYs_LegendreSeries_initialize (statusMessageReporting *smr, xDataTOM_V_W_XYs_LegendreSeries *V_W_XYs_LegendreSeries, int length, xDataTOM_axes *axes)
 
int xDataTOM_V_W_XYs_LegendreSeries_free (xDataTOM_xDataInfo *xDI)
 
int xDataTOM_KalbachMann_initialize (statusMessageReporting *smr, xDataTOM_KalbachMann *KalbachMann, int length, xDataTOM_axes *axes)
 
int xDataTOM_KalbachMann_free (xDataTOM_xDataInfo *xDI)
 
int xDataTOM_KalbachMann_release (xDataTOM_KalbachMann *KalbachMann)
 
int xDataTOM_polynomial_initialize (statusMessageReporting *smr, xDataTOM_polynomial *polynomial, int length, xDataTOM_axes *axes)
 
int xDataTOM_polynomial_free (xDataTOM_xDataInfo *xDI)
 
int xDataTOM_polynomial_release (xDataTOM_polynomial *polynomial)
 
int xDataTOM_polynomial_getData (xDataTOM_polynomial *polynomial, double **data)
 
int xDataTOM_polynomial_getDataFromXDataInfo (xDataTOM_xDataInfo *xDI, double **data)
 

Macro Definition Documentation

#define xDataTOMMisc_allocateCopyString2 (   smr,
  s,
  forItem 
)    xDataTOMMisc_allocateCopyString( smr, s, forItem, __FILE__, __LINE__ )

Definition at line 242 of file xDataTOM.h.

Typedef Documentation

Definition at line 47 of file xDataTOM.h.

Definition at line 48 of file xDataTOM.h.

Definition at line 29 of file xDataTOM.h.

Definition at line 28 of file xDataTOM.h.

Definition at line 51 of file xDataTOM.h.

Definition at line 50 of file xDataTOM.h.

Definition at line 49 of file xDataTOM.h.

typedef int xDataTOM_Int

Definition at line 16 of file xDataTOM.h.

Definition at line 27 of file xDataTOM.h.

Definition at line 42 of file xDataTOM.h.

Definition at line 37 of file xDataTOM.h.

Definition at line 43 of file xDataTOM.h.

Definition at line 33 of file xDataTOM.h.

typedef int(* xDataTOM_sortElementFunc)(const void *, const void *)

Definition at line 54 of file xDataTOM.h.

Definition at line 30 of file xDataTOM.h.

typedef struct xDataTOM_TOM_s xDataTOM_TOM

Definition at line 52 of file xDataTOM.h.

Definition at line 35 of file xDataTOM.h.

Definition at line 34 of file xDataTOM.h.

Definition at line 38 of file xDataTOM.h.

Definition at line 45 of file xDataTOM.h.

typedef struct xDataTOM_XYs_s xDataTOM_XYs

Definition at line 32 of file xDataTOM.h.

Enumeration Type Documentation

Enumerator
xDataTOM_frame_invalid 
xDataTOM_frame_lab 
xDataTOM_frame_centerOfMass 

Definition at line 23 of file xDataTOM.h.

Enumerator
xDataTOM_interpolationFlag_invalid 
xDataTOM_interpolationFlag_linear 
xDataTOM_interpolationFlag_log 
xDataTOM_interpolationFlag_byRegion 
xDataTOM_interpolationFlag_flat 

Definition at line 19 of file xDataTOM.h.

Enumerator
xDataTOM_interpolationQualifier_invalid 
xDataTOM_interpolationQualifier_dependent 
xDataTOM_interpolationQualifier_none 
xDataTOM_interpolationQualifier_unitBase 
xDataTOM_interpolationQualifier_correspondingPoints 

Definition at line 21 of file xDataTOM.h.

Enumerator
xDataTOM_KalbachMannType_fr 
xDataTOM_KalbachMannType_fra 

Definition at line 25 of file xDataTOM.h.

Enumerator
xDataTOM_subAxesType_proxy 
xDataTOM_subAxesType_intepolationAxes 

Definition at line 24 of file xDataTOM.h.

Function Documentation

void* xData_initializeData ( statusMessageReporting smr,
xDataTOM_element TE,
char const *  ID,
size_t  size 
)

Definition at line 479 of file xDataTOM.cc.

479  {
480 
481  xDataTOM_xDataInfo *xDI = &(TE->xDataInfo);
482 
483  xDI->data = NULL;
484  xDI->ID = ID;
485  xDI->element = TE;
486  return( xDI->data = (void *) smr_malloc2( smr, size, 1, "xDI->data" ) );
487 }
const char * ID
Definition: xDataTOM.h:151
#define smr_malloc2(smr, size, zero, forItem)
xDataTOM_xDataInfo xDataInfo
Definition: xDataTOM.h:187
xDataTOM_element * element
Definition: xDataTOM.h:152

Here is the caller graph for this function:

xDataTOM_element* xDataTOM_addElementInElement ( statusMessageReporting smr,
xDataTOM_element parent,
int  index,
char const *  name 
)

Definition at line 188 of file xDataTOM.cc.

188  {
189 
190  xDataTOM_element *element;
191 
192  if( ( element = xDataTOM_mallocElement( smr, parent, parent->numberOfChildren, index, name ) ) == NULL ) return( NULL );
193  if( parent->children == NULL ) {
194  parent->children = element; }
195  else {
196  xDataTOM_element *last;
197 
198  for( last = parent->children; last->next != NULL; last = last->next ) ;
199  last->next = element;
200  }
201  (parent->numberOfChildren)++;
202  return( element );
203 }
const XML_Char * name
Definition: expat.h:151
xDataTOM_element * next
Definition: xDataTOM.h:182
xDataTOM_element * children
Definition: xDataTOM.h:186
xDataTOM_element * xDataTOM_mallocElement(statusMessageReporting *smr, xDataTOM_element *parent, int ordinal, int index, char const *name)
Definition: xDataTOM.cc:125

Here is the call graph for this function:

Here is the caller graph for this function:

int xDataTOM_axes_getInterpolation ( statusMessageReporting smr,
xDataTOM_axes axes,
int  index,
enum xDataTOM_interpolationFlag independent,
enum xDataTOM_interpolationFlag dependent,
enum xDataTOM_interpolationQualifier qualifier 
)

Definition at line 66 of file xDataTOM_axes.cc.

67  {
68 
69  xDataTOM_interpolation *interpolation;
70 
71  if( ( index < 0 ) || ( index >= axes->numberOfAxes ) ) {
72  smr_setReportError2( smr, xDataTOM_smrLibraryID, -1, "invalid axes index = %d", index );
73  return( 1 );
74  }
75  interpolation = &(axes->axis[index].interpolation);
76  *independent = interpolation->independent;
77  *dependent = interpolation->dependent;
78  *qualifier = interpolation->qualifier;
79 
80  return( 0 );
81 }
enum xDataTOM_interpolationFlag independent dependent
Definition: xDataTOM.h:57
enum xDataTOM_interpolationQualifier qualifier
Definition: xDataTOM.h:58
int xDataTOM_smrLibraryID
Definition: xDataTOM.cc:34
int numberOfAxes
Definition: xDataTOM.h:69
xDataTOM_interpolation interpolation
Definition: xDataTOM.h:65
xDataTOM_axis * axis
Definition: xDataTOM.h:70
#define smr_setReportError2(smr, libraryID, code, fmt,...)

Here is the caller graph for this function:

char const* xDataTOM_axes_getLabel ( statusMessageReporting smr,
xDataTOM_axes axes,
int  index 
)

Definition at line 44 of file xDataTOM_axes.cc.

44  {
45 
46  if( ( index < 0 ) || ( index >= axes->numberOfAxes ) ) {
47  smr_setReportError2( smr, xDataTOM_smrLibraryID, -1, "invalid axes index = %d", index );
48  return( NULL );
49  }
50  return( axes->axis[index].label );
51 }
int xDataTOM_smrLibraryID
Definition: xDataTOM.cc:34
int numberOfAxes
Definition: xDataTOM.h:69
char * label
Definition: xDataTOM.h:63
xDataTOM_axis * axis
Definition: xDataTOM.h:70
#define smr_setReportError2(smr, libraryID, code, fmt,...)

Here is the caller graph for this function:

char const* xDataTOM_axes_getUnit ( statusMessageReporting smr,
xDataTOM_axes axes,
int  index 
)

Definition at line 55 of file xDataTOM_axes.cc.

55  {
56 
57  if( ( index < 0 ) || ( index >= axes->numberOfAxes ) ) {
58  smr_setReportError2( smr, xDataTOM_smrLibraryID, -1, "invalid axes index = %d", index );
59  return( NULL );
60  }
61  return( axes->axis[index].unit );
62 }
int xDataTOM_smrLibraryID
Definition: xDataTOM.cc:34
int numberOfAxes
Definition: xDataTOM.h:69
xDataTOM_axis * axis
Definition: xDataTOM.h:70
#define smr_setReportError2(smr, libraryID, code, fmt,...)
char * unit
Definition: xDataTOM.h:64

Here is the caller graph for this function:

int xDataTOM_axes_initialize ( statusMessageReporting smr,
xDataTOM_axes axes,
int  numberOfAxes 
)

Definition at line 21 of file xDataTOM_axes.cc.

21  {
22 
23  axes->numberOfAxes = 0;
24  if( ( axes->axis = (xDataTOM_axis *) smr_malloc2( smr, numberOfAxes * sizeof( xDataTOM_axis ), 1, "axes->axis" ) ) == NULL ) return( 1 );
25  axes->numberOfAxes = numberOfAxes;
26  return( 0 );
27 }
int numberOfAxes
Definition: xDataTOM.h:69
xDataTOM_axis * axis
Definition: xDataTOM.h:70
#define smr_malloc2(smr, size, zero, forItem)

Here is the caller graph for this function:

int xDataTOM_axes_release ( xDataTOM_axes axes)

Definition at line 31 of file xDataTOM_axes.cc.

31  {
32 
33  int i;
34 
35  for( i = 0; i < axes->numberOfAxes; i++ ) {
36  xDataTOM_axis_release( NULL, &(axes->axis[i]) );
37  }
38  smr_freeMemory( (void **) &(axes->axis) );
39  return( 0 );
40 }
int numberOfAxes
Definition: xDataTOM.h:69
xDataTOM_axis * axis
Definition: xDataTOM.h:70
xDataTOM_axis * xDataTOM_axis_release(statusMessageReporting *smr, xDataTOM_axis *axis)
void * smr_freeMemory(void **p)

Here is the call graph for this function:

Here is the caller graph for this function:

char const* xDataTOM_axis_frameToString ( statusMessageReporting smr,
enum xDataTOM_frame  frame 
)

Definition at line 191 of file xDataTOM_axes.cc.

191  {
192 
193  switch( frame ) {
196  default :
197  break;
198  }
200 }
static char const * xDataTOM_frame_labString
static char const * xDataTOM_frame_invalidString
static char const * xDataTOM_frame_centerOfMassString
int xDataTOM_axis_initialize ( statusMessageReporting smr,
xDataTOM_axis axis,
int  index,
char const *  label,
char const *  unit,
xDataTOM_interpolation interpolation 
)

Definition at line 155 of file xDataTOM_axes.cc.

155  {
156 
157  axis->index = index;
158  if( ( axis->label = smr_allocateCopyString2( smr, label, "label" ) ) == NULL ) goto err;
159  if( ( axis->unit = smr_allocateCopyString2( smr, unit, "unit" ) ) == NULL ) goto err;
160  if( xDataTOM_interpolation_copy( smr, &(axis->interpolation), interpolation ) != 0 ) goto err;
161 
162  return( 0 );
163 
164 err:
165  smr_freeMemory( (void **) &(axis->label) );
166  smr_freeMemory( (void **) &(axis->unit) );
167  return( 1 );
168 }
#define smr_allocateCopyString2(smr, s, forItem)
char * label
Definition: xDataTOM.h:63
xDataTOM_interpolation interpolation
Definition: xDataTOM.h:65
char * unit
Definition: xDataTOM.h:64
void * smr_freeMemory(void **p)
int xDataTOM_interpolation_copy(statusMessageReporting *smr, xDataTOM_interpolation *desc, xDataTOM_interpolation *src)

Here is the call graph for this function:

Here is the caller graph for this function:

xDataTOM_axis* xDataTOM_axis_new ( statusMessageReporting smr,
int  index,
char const *  label,
char const *  unit,
xDataTOM_interpolation interpolation 
)

Definition at line 144 of file xDataTOM_axes.cc.

144  {
145 
146  xDataTOM_axis *axis = NULL;
147 
148  if( ( axis = (xDataTOM_axis *) smr_malloc2( smr, sizeof( xDataTOM_axis ), 0, "axis" ) ) == NULL ) return( NULL );
149  if( xDataTOM_axis_initialize( smr, axis, index, label, unit, interpolation ) != 0 ) smr_freeMemory( (void **) &axis );
150  return( axis );
151 }
int xDataTOM_axis_initialize(statusMessageReporting *smr, xDataTOM_axis *axis, int index, char const *label, char const *unit, xDataTOM_interpolation *interpolation)
#define smr_malloc2(smr, size, zero, forItem)
void * smr_freeMemory(void **p)

Here is the call graph for this function:

xDataTOM_axis* xDataTOM_axis_release ( statusMessageReporting smr,
xDataTOM_axis axis 
)

Definition at line 172 of file xDataTOM_axes.cc.

172  {
173 
174  axis->index = -1;
175  smr_freeMemory( (void **) &(axis->label) );
176  smr_freeMemory( (void **) &(axis->unit) );
177  return( NULL );
178 }
char * label
Definition: xDataTOM.h:63
char * unit
Definition: xDataTOM.h:64
void * smr_freeMemory(void **p)

Here is the call graph for this function:

Here is the caller graph for this function:

enum xDataTOM_frame xDataTOM_axis_stringToFrame ( statusMessageReporting smr,
char const *  frame 
)

Definition at line 182 of file xDataTOM_axes.cc.

182  {
183 
184  if( strcmp( "lab", frame ) == 0 ) return( xDataTOM_frame_lab );
185  if( strcmp( "centerOfMass", frame ) == 0 ) return( xDataTOM_frame_centerOfMass );
186  return( xDataTOM_frame_invalid );
187 }

Here is the caller graph for this function:

void xDataTOM_displayTree ( statusMessageReporting smr,
xDataTOM_TOM TOM,
int  printAttributes 
)

Definition at line 114 of file xDataTOM.cc.

114  {
115 
116  if( TOM->root.children != NULL ) xDataTOME_displayTree( smr, TOM->root.children, printAttributes, 0 );
117 }
xDataTOM_element * children
Definition: xDataTOM.h:186
xDataTOM_element root
Definition: xDataTOM.h:193
static void xDataTOME_displayTree(statusMessageReporting *smr, xDataTOM_element *element, int printAttributes, int level)
Definition: xDataTOM.cc:326

Here is the call graph for this function:

void xDataTOM_freeElement ( xDataTOM_element **  element)

Definition at line 139 of file xDataTOM.cc.

139  {
140 
141  if( element == NULL ) return;
142  xDataTOM_releaseElement( *element );
143  smr_freeMemory( (void **) element );
144 }
void xDataTOM_releaseElement(xDataTOM_element *element)
Definition: xDataTOM.cc:148
void * smr_freeMemory(void **p)

Here is the call graph for this function:

Here is the caller graph for this function:

void* xDataTOM_freeTOM ( statusMessageReporting smr,
xDataTOM_TOM **  TOM 
)

Definition at line 78 of file xDataTOM.cc.

78  {
79 
80  xDataTOM_TOM *TOMp;
81 
82  if( TOM == NULL ) return( NULL );
83  TOMp = *TOM;
84  if( TOMp == NULL ) return( NULL );
85  xDataTOM_releaseElement( &(TOMp->root) );
86  smr_freeMemory( (void **) &(TOMp->fileName) );
87  smr_freeMemory( (void **) &(TOMp->realFileName) );
88  smr_freeMemory( (void **) TOM );
89  return( NULL );
90 }
void xDataTOM_releaseElement(xDataTOM_element *element)
Definition: xDataTOM.cc:148
char * realFileName
Definition: xDataTOM.h:192
char * fileName
Definition: xDataTOM.h:191
void * smr_freeMemory(void **p)
xDataTOM_element root
Definition: xDataTOM.h:193

Here is the call graph for this function:

Here is the caller graph for this function:

char const* xDataTOM_getAttributesValueInElement ( xDataTOM_element element,
char const *  name 
)

Definition at line 286 of file xDataTOM.cc.

286  {
287 
288  return( xDataTOMAL_getAttributesValue( &(element->attributes), name ) );
289 }
const XML_Char * name
Definition: expat.h:151
xDataTOM_attributionList attributes
Definition: xDataTOM.h:184
char const * xDataTOMAL_getAttributesValue(xDataTOM_attributionList *attributes, char const *name)
Definition: xDataTOM.cc:403

Here is the call graph for this function:

Here is the caller graph for this function:

xDataTOM_element* xDataTOM_getDocumentsElement ( xDataTOM_TOM TOM)

Definition at line 223 of file xDataTOM.cc.

223  {
224 
225  return( TOM->root.children );
226 }
xDataTOM_element * children
Definition: xDataTOM.h:186
xDataTOM_element root
Definition: xDataTOM.h:193

Here is the caller graph for this function:

xDataTOM_element* xDataTOM_getLinksElement ( statusMessageReporting smr,
xDataTOM_element element,
char const *  link 
)

Definition at line 89 of file xDataTOM_Misc.cc.

89  {
90 
91  xDataTOM_element *linkedElement = NULL;
92 
93  if( link[0] == '/' ) {
94  for( linkedElement = element; linkedElement->parent != NULL; ) linkedElement = linkedElement->parent;
95  linkedElement = xDataTOM_getLinksElement2( smr, linkedElement, &(link[1]), link ); }
96  else {
97  smr_setReportError2( smr, smr_unknownID, 1, "Only absolute link currently supported: requested link = '%s'", link );
98  }
99  return( linkedElement );
100 }
static xDataTOM_element * xDataTOM_getLinksElement2(statusMessageReporting *smr, xDataTOM_element *element, char const *link, char const *fullLink)
#define smr_setReportError2(smr, libraryID, code, fmt,...)
#define smr_unknownID
xDataTOM_element * parent
Definition: xDataTOM.h:181

Here is the call graph for this function:

Here is the caller graph for this function:

xDataTOM_TOM* xDataTOM_importFile ( statusMessageReporting smr,
const char *  fileName 
)

Definition at line 44 of file xDataTOM.cc.

44  {
45 /*
46 * Returns NULL is an error occurred.
47 */
48 
49  return( xDataXML_importFile( smr, fileName ) );
50 }
xDataTOM_TOM * xDataXML_importFile(statusMessageReporting *smr, char const *fileName)

Here is the call graph for this function:

Here is the caller graph for this function:

int xDataTOM_initializeTOM ( statusMessageReporting smr,
xDataTOM_TOM doc 
)

Definition at line 68 of file xDataTOM.cc.

68  {
69 
70  TOM->fileName = NULL;
71  TOM->realFileName = NULL;
72  xDataTOME_initializeElement( smr, &(TOM->root), NULL, 0, 0, "" );
73  return( !smr_isOk( smr ) );
74 }
static int xDataTOME_initializeElement(statusMessageReporting *smr, xDataTOM_element *element, xDataTOM_element *parent, int ordinal, int index, char const *name)
Definition: xDataTOM.cc:207
int smr_isOk(statusMessageReporting *smr)

Here is the call graph for this function:

Here is the caller graph for this function:

int xDataTOM_interpolation_copy ( statusMessageReporting smr,
xDataTOM_interpolation desc,
xDataTOM_interpolation src 
)

Definition at line 102 of file xDataTOM_interpolation.cc.

102  {
103 
104  return( xDataTOM_interpolation_set( smr, desc, src->independent, src->dependent, src->qualifier ) );
105 }
enum xDataTOM_interpolationFlag independent dependent
Definition: xDataTOM.h:57
enum xDataTOM_interpolationQualifier qualifier
Definition: xDataTOM.h:58
int xDataTOM_interpolation_set(statusMessageReporting *smr, xDataTOM_interpolation *interpolation, enum xDataTOM_interpolationFlag independent, enum xDataTOM_interpolationFlag dependent, enum xDataTOM_interpolationQualifier qualifier)

Here is the call graph for this function:

Here is the caller graph for this function:

int xDataTOM_interpolation_set ( statusMessageReporting smr,
xDataTOM_interpolation interpolation,
enum xDataTOM_interpolationFlag  independent,
enum xDataTOM_interpolationFlag  dependent,
enum xDataTOM_interpolationQualifier  qualifier 
)

Definition at line 22 of file xDataTOM_interpolation.cc.

23  {
24 
25  if( ( independent < xDataTOM_interpolationFlag_linear ) || ( independent > xDataTOM_interpolationFlag_byRegion ) ) {
26  smr_setReportError2( smr, xDataTOM_smrLibraryID, -1, "invalid independent interpolation = %d", independent );
27  return( 1 );
28  }
29  if( ( dependent < xDataTOM_interpolationFlag_linear ) || ( dependent > xDataTOM_interpolationFlag_flat ) ) {
30  smr_setReportError2( smr, xDataTOM_smrLibraryID, -1, "invalid dependent interpolation = %d", dependent );
31  return( 1 );
32  }
34  smr_setReportError2( smr, xDataTOM_smrLibraryID, -1, "invalid interpolation qualifier = %d", qualifier );
35  return( 1 );
36  }
37 
38  interpolation->independent = independent;
39  interpolation->dependent = dependent;
40  interpolation->qualifier = qualifier;
41  return( 0 );
42 }
enum xDataTOM_interpolationFlag independent dependent
Definition: xDataTOM.h:57
enum xDataTOM_interpolationQualifier qualifier
Definition: xDataTOM.h:58
int xDataTOM_smrLibraryID
Definition: xDataTOM.cc:34
#define smr_setReportError2(smr, libraryID, code, fmt,...)

Here is the caller graph for this function:

int xDataTOM_interpolation_setFromString ( statusMessageReporting smr,
xDataTOM_interpolation interpolation,
char const *  str 
)

Definition at line 46 of file xDataTOM_interpolation.cc.

46  {
47 
48  int flag = 0;
49  char const *c, *e;
51  enum xDataTOM_interpolationFlag independent, dependent;
52 
53  if( ( c = strchr( str, ':' ) ) != NULL ) {
54  if( strncmp( "unitBase:", str, 9 ) == 0 ) {
56  else if( strncmp( "correspondingPoints:", str, 20 ) == 0 ) {
58  else {
59  smr_setReportError2( smr, xDataTOM_smrLibraryID, -1, "invalid interpolation string qualifier '%s'", str );
60  return( 1 );
61  }
62  c++; }
63  else {
64  c = str;
65  }
66  if( ( independent = xDataTOM_interpolation_getFromString( smr, c, &e, str, flag ) ) == xDataTOM_interpolationFlag_invalid ) return( 1 );
67  if( *e != ',' ) {
68  smr_setReportError2( smr, xDataTOM_smrLibraryID, -1, "missing ',' separator in interpolation string'%s'", str );
69  return( 1 );
70  }
71  c = ++e;
72  flag |= dependentAxis;
73  if( ( dependent = xDataTOM_interpolation_getFromString( smr, c, &e, str, flag ) ) == xDataTOM_interpolationFlag_invalid ) return( 1 );
74  xDataTOM_interpolation_set( smr, interpolation, independent, dependent, qualifier );
75  return( 0 );
76 }
int xDataTOM_smrLibraryID
Definition: xDataTOM.cc:34
xDataTOM_interpolationFlag
Definition: xDataTOM.h:19
#define smr_setReportError2(smr, libraryID, code, fmt,...)
int xDataTOM_interpolation_set(statusMessageReporting *smr, xDataTOM_interpolation *interpolation, enum xDataTOM_interpolationFlag independent, enum xDataTOM_interpolationFlag dependent, enum xDataTOM_interpolationQualifier qualifier)
xDataTOM_interpolationQualifier
Definition: xDataTOM.h:21
#define dependentAxis
static enum xDataTOM_interpolationFlag xDataTOM_interpolation_getFromString(statusMessageReporting *smr, char const *s, char const **e, char const *str, int flag)
tuple c
Definition: test.py:13

Here is the call graph for this function:

Here is the caller graph for this function:

int xDataTOM_isXDataID ( xDataTOM_element TE,
char const *  ID 
)

Definition at line 491 of file xDataTOM.cc.

491  {
492 
493  xDataTOM_xDataInfo *xDI = &(TE->xDataInfo);
494 
495  if( xDI->ID != NULL ) {
496  return( !strcmp( xDI->ID, ID ) );
497  }
498 
499  return( 0 );
500 }
const char * ID
Definition: xDataTOM.h:151
xDataTOM_xDataInfo xDataInfo
Definition: xDataTOM.h:187
int xDataTOM_KalbachMann_free ( xDataTOM_xDataInfo xDI)

Definition at line 35 of file xDataTOM_KalbachMann.cc.

35  {
36 
37  if( xDI == NULL ) return( 0 );
38  if( strcmp( xDataTOM_KalbachMann_ID, xDI->ID ) != 0 ) return( 1 );
40  smr_freeMemory( (void **) &(xDI->data) );
41  return( 0 );
42 }
const char * ID
Definition: xDataTOM.h:151
char const * xDataTOM_KalbachMann_ID
void * smr_freeMemory(void **p)
int xDataTOM_KalbachMann_release(xDataTOM_KalbachMann *KalbachMann)

Here is the call graph for this function:

Here is the caller graph for this function:

int xDataTOM_KalbachMann_initialize ( statusMessageReporting smr,
xDataTOM_KalbachMann KalbachMann,
int  length,
xDataTOM_axes axes 
)

Definition at line 19 of file xDataTOM_KalbachMann.cc.

19  {
20 
21  KalbachMann->coefficients = NULL;
22  KalbachMann->numberOfEnergies = 0;
23  if( ( KalbachMann->coefficients = (xDataTOM_KalbachMannCoefficients *) smr_malloc2( smr, length * sizeof( xDataTOM_KalbachMannCoefficients ), 1, "KalbachMann->coefficients" ) ) == NULL ) return( 1 );
24  if( xDataTOM_subAxes_initialize( smr, &(KalbachMann->subAxes), xDataTOM_subAxesType_proxy, 0, axes, NULL ) != 0 ) {
25  smr_freeMemory( (void **) &(KalbachMann->coefficients) );
26  return( 1 );
27  }
28 
29  return( 0 );
30 }
xDataTOM_KalbachMannCoefficients * coefficients
Definition: xDataTOM.h:141
xDataTOM_subAxes subAxes
Definition: xDataTOM.h:140
int xDataTOM_subAxes_initialize(statusMessageReporting *smr, xDataTOM_subAxes *subAxes, enum xDataTOM_subAxesType type, int offset, xDataTOM_axes *axes, xDataTOM_interpolation *interpolation)
#define smr_malloc2(smr, size, zero, forItem)
void * smr_freeMemory(void **p)

Here is the call graph for this function:

Here is the caller graph for this function:

int xDataTOM_KalbachMann_release ( xDataTOM_KalbachMann KalbachMann)

Definition at line 46 of file xDataTOM_KalbachMann.cc.

46  {
47 
48  int i;
49 
50  xDataTOM_subAxes_release( &(KalbachMann->subAxes) );
51  for( i = 0; i < KalbachMann->numberOfEnergies; i++ ) smr_freeMemory( (void **) &(KalbachMann->coefficients[i].coefficients) );
52  KalbachMann->numberOfEnergies = 0;
53  smr_freeMemory( (void **) &(KalbachMann->coefficients) );
54 
55  return( 0 );
56 }
xDataTOM_KalbachMannCoefficients * coefficients
Definition: xDataTOM.h:141
int xDataTOM_subAxes_release(xDataTOM_subAxes *subAxes)
xDataTOM_subAxes subAxes
Definition: xDataTOM.h:140
void * smr_freeMemory(void **p)

Here is the call graph for this function:

Here is the caller graph for this function:

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 }
const XML_Char int const XML_Char * value
Definition: expat.h:331
#define smr_malloc2(smr, size, zero, forItem)

Here is the caller graph for this function:

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)

Here is the call graph for this function:

Here is the caller graph for this function:

xDataTOM_element* xDataTOM_mallocElement ( statusMessageReporting smr,
xDataTOM_element parent,
int  ordinal,
int  index,
char const *  name 
)

Definition at line 125 of file xDataTOM.cc.

125  {
126 /*
127 * Returns NULL is an error occurred.
128 */
129  xDataTOM_element *element;
130 
131  if( ( element = (xDataTOM_element *) smr_malloc2( smr, sizeof( xDataTOM_element ), 1, "xDataTOM_elelument" ) ) != NULL ) {
132  if( xDataTOME_initializeElement( smr, element, parent, ordinal, index, name ) ) smr_freeMemory( (void **) &element );
133  }
134  return( element );
135 }
const XML_Char * name
Definition: expat.h:151
static int xDataTOME_initializeElement(statusMessageReporting *smr, xDataTOM_element *element, xDataTOM_element *parent, int ordinal, int index, char const *name)
Definition: xDataTOM.cc:207
#define smr_malloc2(smr, size, zero, forItem)
void * smr_freeMemory(void **p)

Here is the call graph for this function:

Here is the caller graph for this function:

xDataTOM_TOM* xDataTOM_mallocTOM ( statusMessageReporting smr)

Definition at line 54 of file xDataTOM.cc.

54  {
55 /*
56 * Returns NULL is an error occurred.
57 */
58  xDataTOM_TOM *TOM;
59 
60  if( ( TOM = (xDataTOM_TOM *) smr_malloc2( smr, sizeof( xDataTOM_TOM ), 1, "xDataTOM_TOM" ) ) != NULL ) {
61  if( xDataTOM_initializeTOM( smr, TOM ) ) smr_freeMemory( (void **) &TOM );
62  }
63  return( TOM );
64 }
int xDataTOM_initializeTOM(statusMessageReporting *smr, xDataTOM_TOM *doc)
Definition: xDataTOM.cc:68
#define smr_malloc2(smr, size, zero, forItem)
void * smr_freeMemory(void **p)

Here is the call graph for this function:

Here is the caller graph for this function:

int xDataTOM_numberOfElementsByName ( statusMessageReporting smr,
xDataTOM_element element,
char const *  name 
)

Definition at line 268 of file xDataTOM.cc.

268  {
269 
270  int n = 0;
271  xDataTOM_element *child;
272 
273  for( child = xDataTOME_getFirstElement( element ); child != NULL; child = xDataTOME_getNextElement( child ) ) if( !strcmp( child->name, name ) ) n++;
274  return( n );
275 }
const XML_Char * name
Definition: expat.h:151
xDataTOM_element * xDataTOME_getFirstElement(xDataTOM_element *element)
Definition: xDataTOM.cc:230
const G4int n
xDataTOM_element * xDataTOME_getNextElement(xDataTOM_element *element)
Definition: xDataTOM.cc:238

Here is the call graph for this function:

Here is the caller graph for this function:

int xDataTOM_polynomial_free ( xDataTOM_xDataInfo xDI)

Definition at line 33 of file xDataTOM_polynomial.cc.

33  {
34 
35  if( xDI == NULL ) return( 0 );
36  if( strcmp( xDataTOM_polynomial_ID, xDI->ID ) != 0 ) return( 1 );
38  smr_freeMemory( (void **) &(xDI->data) );
39  return( 0 );
40 }
const char * ID
Definition: xDataTOM.h:151
int xDataTOM_polynomial_release(xDataTOM_polynomial *polynomial)
void * smr_freeMemory(void **p)
char const * xDataTOM_polynomial_ID

Here is the call graph for this function:

Here is the caller graph for this function:

int xDataTOM_polynomial_getData ( xDataTOM_polynomial polynomial,
double **  data 
)

Definition at line 55 of file xDataTOM_polynomial.cc.

55  {
56 
57  *data = polynomial->coefficients;
58  return( polynomial->length );
59 }
double * coefficients
Definition: xDataTOM.h:147
const XML_Char const XML_Char * data
Definition: expat.h:268

Here is the caller graph for this function:

int xDataTOM_polynomial_getDataFromXDataInfo ( xDataTOM_xDataInfo xDI,
double **  data 
)

Definition at line 63 of file xDataTOM_polynomial.cc.

63  {
64 
66 }
int xDataTOM_polynomial_getData(xDataTOM_polynomial *polynomial, double **data)
const XML_Char const XML_Char * data
Definition: expat.h:268

Here is the call graph for this function:

Here is the caller graph for this function:

int xDataTOM_polynomial_initialize ( statusMessageReporting smr,
xDataTOM_polynomial polynomial,
int  length,
xDataTOM_axes axes 
)

Definition at line 19 of file xDataTOM_polynomial.cc.

19  {
20 
21  polynomial->length = length;
22  if( ( polynomial->coefficients = (double *) smr_malloc2( smr, length * sizeof( double ), 1, "polynomial->coefficients" ) ) == NULL ) return( 1 );
23  if( xDataTOM_subAxes_initialize( smr, &(polynomial->subAxes), xDataTOM_subAxesType_proxy, 0, axes, NULL ) != 0 ) {
24  smr_freeMemory( (void **) &(polynomial->coefficients) );
25  return( 1 );
26  }
27 
28  return( 0 );
29 }
double * coefficients
Definition: xDataTOM.h:147
xDataTOM_subAxes subAxes
Definition: xDataTOM.h:146
int xDataTOM_subAxes_initialize(statusMessageReporting *smr, xDataTOM_subAxes *subAxes, enum xDataTOM_subAxesType type, int offset, xDataTOM_axes *axes, xDataTOM_interpolation *interpolation)
#define smr_malloc2(smr, size, zero, forItem)
void * smr_freeMemory(void **p)

Here is the call graph for this function:

Here is the caller graph for this function:

int xDataTOM_polynomial_release ( xDataTOM_polynomial polynomial)

Definition at line 44 of file xDataTOM_polynomial.cc.

44  {
45 
46  xDataTOM_subAxes_release( &(polynomial->subAxes) );
47  polynomial->length = 0;
48  smr_freeMemory( (void **) &(polynomial->coefficients) );
49 
50  return( 0 );
51 }
double * coefficients
Definition: xDataTOM.h:147
int xDataTOM_subAxes_release(xDataTOM_subAxes *subAxes)
xDataTOM_subAxes subAxes
Definition: xDataTOM.h:146
void * smr_freeMemory(void **p)

Here is the call graph for this function:

Here is the caller graph for this function:

int xDataTOM_regionsW_XYs_LegendreSeries_free ( xDataTOM_xDataInfo xDI)

Definition at line 33 of file xDataTOM_regionsW_XYs_LegendreSeries.cc.

33  {
34 
35  if( xDI == NULL ) return( 0 );
36  if( strcmp( xDataTOM_regionsW_XYs_LegendreSeries_ID, xDI->ID ) != 0 ) return( 1 );
38  smr_freeMemory( (void **) &(xDI->data) );
39  return( 0 );
40 }
int xDataTOM_regionsW_XYs_LegendreSeries_release(xDataTOM_regionsW_XYs_LegendreSeries *regionsW_XYs_LegendreSeries)
const char * ID
Definition: xDataTOM.h:151
void * smr_freeMemory(void **p)
char const * xDataTOM_regionsW_XYs_LegendreSeries_ID

Here is the call graph for this function:

Here is the caller graph for this function:

int xDataTOM_regionsW_XYs_LegendreSeries_initialize ( statusMessageReporting smr,
xDataTOM_regionsW_XYs_LegendreSeries regionsW_XYs_LegendreSeries,
int  length,
xDataTOM_axes axes 
)

Definition at line 19 of file xDataTOM_regionsW_XYs_LegendreSeries.cc.

20  {
21 
22  regionsW_XYs_LegendreSeries->W_XYs_LegendreSeries = NULL;
23  regionsW_XYs_LegendreSeries->length = length;
24  regionsW_XYs_LegendreSeries->axes = axes;
25  if( ( regionsW_XYs_LegendreSeries->W_XYs_LegendreSeries = (xDataTOM_W_XYs_LegendreSeries *) smr_malloc2( smr, length * sizeof( xDataTOM_W_XYs_LegendreSeries ), 1,
26  "regionsW_XYs_LegendreSeries->W_XYs_LegendreSeries" ) ) == NULL ) return( 1 );
27 
28  return( 0 );
29 }
xDataTOM_W_XYs_LegendreSeries * W_XYs_LegendreSeries
Definition: xDataTOM.h:122
#define smr_malloc2(smr, size, zero, forItem)

Here is the caller graph for this function:

int xDataTOM_regionsW_XYs_LegendreSeries_release ( xDataTOM_regionsW_XYs_LegendreSeries regionsW_XYs_LegendreSeries)

Definition at line 44 of file xDataTOM_regionsW_XYs_LegendreSeries.cc.

44  {
45 
46  int i;
47 
48  for( i = 0; i < regionsW_XYs_LegendreSeries->length; i++ ) xDataTOM_W_XYs_LegendreSeries_release( &(regionsW_XYs_LegendreSeries->W_XYs_LegendreSeries[i]) );
49  smr_freeMemory( (void **) &(regionsW_XYs_LegendreSeries->W_XYs_LegendreSeries) );
50  return( 0 );
51 }
xDataTOM_W_XYs_LegendreSeries * W_XYs_LegendreSeries
Definition: xDataTOM.h:122
int xDataTOM_W_XYs_LegendreSeries_release(xDataTOM_W_XYs_LegendreSeries *W_XYs_LegendreSeries)
void * smr_freeMemory(void **p)

Here is the call graph for this function:

Here is the caller graph for this function:

int xDataTOM_regionsXYs_free ( xDataTOM_xDataInfo xDI)

Definition at line 19 of file xDataTOM_regionsXYs.cc.

19  {
20 
21  int i;
22  xDataTOM_regionsXYs *regionsXYs;
23 
24  if( xDI == NULL ) return( 0 );
25  if( strcmp( xDataTOM_regionsXYs_ID, xDI->ID ) != 0 ) return( 1 );
26  regionsXYs = (xDataTOM_regionsXYs *) xDI->data;
27  for( i = 0; i < regionsXYs->length; i++ ) xDataTOM_XYs_release( &(regionsXYs->XYs[i]) );
28  smr_freeMemory( (void **) &(regionsXYs->XYs) );
29  smr_freeMemory( (void **) &(xDI->data) );
30  return( 0 );
31 }
int xDataTOM_XYs_release(xDataTOM_XYs *XYs)
Definition: xDataTOM_XYs.cc:31
const char * ID
Definition: xDataTOM.h:151
xDataTOM_XYs * XYs
Definition: xDataTOM.h:90
void * smr_freeMemory(void **p)
char const * xDataTOM_regionsXYs_ID

Here is the call graph for this function:

Here is the caller graph for this function:

void xDataTOM_releaseElement ( xDataTOM_element element)

Definition at line 148 of file xDataTOM.cc.

148  {
149 
150  xDataTOM_element *child, *nextChild;
151 
152  if( element == NULL ) return;
153  xDataTOMAL_release( &(element->attributes) );
154  for( child = element->children; child != NULL; child = nextChild ) {
155  nextChild = child->next;
156  xDataTOM_freeElement( &child );
157  }
158  if( element->xDataInfo.ID != NULL ) {
159  xDataTOM_axes_release( &(element->xDataInfo.axes) );
160  if( strcmp( element->xDataInfo.ID, xDataTOM_XYs_ID ) == 0 ) {
161  xDataTOM_XYs_free( &(element->xDataInfo ) ); }
162  else if( strcmp( element->xDataInfo.ID, xDataTOM_regionsXYs_ID ) == 0 ) {
163  xDataTOM_regionsXYs_free( &(element->xDataInfo ) ); }
164  else if( strcmp( element->xDataInfo.ID, xDataTOM_W_XYs_ID ) == 0 ) {
166  else if( strcmp( element->xDataInfo.ID, xDataTOM_V_W_XYs_ID ) == 0 ) {
167  xDataTOM_V_W_XYs_free( &(element->xDataInfo ) ); }
168  else if( strcmp( element->xDataInfo.ID, xDataTOM_W_XYs_LegendreSeries_ID ) == 0 ) {
170  else if( strcmp( element->xDataInfo.ID, xDataTOM_regionsW_XYs_LegendreSeries_ID ) == 0 ) {
172  else if( strcmp( element->xDataInfo.ID, xDataTOM_V_W_XYs_LegendreSeries_ID ) == 0 ) {
174  else if( strcmp( element->xDataInfo.ID, xDataTOM_KalbachMann_ID ) == 0 ) {
175  xDataTOM_KalbachMann_free( &(element->xDataInfo ) ); }
176  else if( strcmp( element->xDataInfo.ID, xDataTOM_polynomial_ID ) == 0 ) {
177  xDataTOM_polynomial_free( &(element->xDataInfo ) ); }
178  else {
179  printf( "not freed for %s\n", element->xDataInfo.ID );
180  }
181  }
182  element->parent = NULL;
183  smr_freeMemory( (void **) &(element->name) );
184 }
int xDataTOM_axes_release(xDataTOM_axes *axes)
int xDataTOM_polynomial_free(xDataTOM_xDataInfo *xDI)
xDataTOM_element * next
Definition: xDataTOM.h:182
int xDataTOM_regionsXYs_free(xDataTOM_xDataInfo *xDI)
char const * xDataTOM_XYs_ID
Definition: xDataTOM_XYs.cc:14
int xDataTOM_W_XYs_freeFrom_xDataInfo(xDataTOM_xDataInfo *xDI)
int xDataTOM_W_XYs_LegendreSeries_free(xDataTOM_xDataInfo *xDI)
void xDataTOM_freeElement(xDataTOM_element **element)
Definition: xDataTOM.cc:139
const char * ID
Definition: xDataTOM.h:151
xDataTOM_attributionList attributes
Definition: xDataTOM.h:184
char const * xDataTOM_V_W_XYs_ID
char const * xDataTOM_KalbachMann_ID
int xDataTOM_KalbachMann_free(xDataTOM_xDataInfo *xDI)
char const * xDataTOM_W_XYs_LegendreSeries_ID
void xDataTOMAL_release(xDataTOM_attributionList *attributes)
Definition: xDataTOM.cc:361
int xDataTOM_V_W_XYs_LegendreSeries_free(xDataTOM_xDataInfo *xDI)
int xDataTOM_regionsW_XYs_LegendreSeries_free(xDataTOM_xDataInfo *xDI)
void * smr_freeMemory(void **p)
xDataTOM_axes axes
Definition: xDataTOM.h:153
xDataTOM_element * children
Definition: xDataTOM.h:186
char const * xDataTOM_V_W_XYs_LegendreSeries_ID
int xDataTOM_V_W_XYs_free(xDataTOM_xDataInfo *xDI)
xDataTOM_xDataInfo xDataInfo
Definition: xDataTOM.h:187
char const * xDataTOM_regionsW_XYs_LegendreSeries_ID
char const * xDataTOM_W_XYs_ID
char const * xDataTOM_polynomial_ID
int xDataTOM_XYs_free(xDataTOM_xDataInfo *xDI)
Definition: xDataTOM_XYs.cc:19
char const * xDataTOM_regionsXYs_ID
xDataTOM_element * parent
Definition: xDataTOM.h:181

Here is the call graph for this function:

Here is the caller graph for this function:

int xDataTOM_setFileNameTOM ( statusMessageReporting smr,
xDataTOM_TOM doc,
const char *  fileName 
)

Definition at line 94 of file xDataTOM.cc.

94  {
95 /*
96 * Returns not zero value if error occurred.
97 */
98 
99  char realPath[PATH_MAX+1];
100 
101  smr_freeMemory( (void **) &(TOM->fileName) );
102  smr_freeMemory( (void **) &(TOM->realFileName) );
103  if( fileName != NULL ) {
104  if( ( TOM->fileName = smr_allocateCopyString2( smr, fileName, "fileName" ) ) == NULL ) return( 1 );
105  if( realpath( fileName, realPath ) != NULL ) {
106  if( ( TOM->realFileName = smr_allocateCopyString2( smr, realPath, "realFileName" ) ) == NULL ) return( 1 );
107  }
108  }
109  return( 0 );
110 }
#define smr_allocateCopyString2(smr, s, forItem)
#define PATH_MAX
Definition: xDataTOM.cc:31
void * smr_freeMemory(void **p)

Here is the call graph for this function:

Here is the caller graph for this function:

int xDataTOM_setMessageError_ReturnInt ( int  value,
statusMessageReporting smr,
void userData,
const char *  file,
int  line,
int  code,
const char *  fmt,
  ... 
)

Definition at line 76 of file xDataTOM_Misc.cc.

77  {
78 
79  va_list args;
80 
81  va_start( args, fmt );
82  smr_setReportError( smr, userInterface, packageName, lineNumber, __func__, xDataTOM_smrLibraryID, code, fmt, args );
83  va_end( args );
84  return( value );
85 }
int xDataTOM_smrLibraryID
Definition: xDataTOM.cc:34
const XML_Char int const XML_Char * value
Definition: expat.h:331
Definition: inftrees.h:24
int smr_setReportError(statusMessageReporting *smr, void *userInterface, char const *file, int line, char const *function, int libraryID, int code, char const *fmt,...)

Here is the call graph for this function:

char const* xDataTOM_subAxes_getLabel ( statusMessageReporting smr,
xDataTOM_subAxes subAxes,
int  index 
)

Definition at line 126 of file xDataTOM_axes.cc.

126  {
127 
128  return( xDataTOM_axes_getLabel( smr, subAxes->axes, index + subAxes->offset ) );
129 }
xDataTOM_axes * axes
Definition: xDataTOM.h:76
char const * xDataTOM_axes_getLabel(statusMessageReporting *smr, xDataTOM_axes *axes, int index)

Here is the call graph for this function:

char const* xDataTOM_subAxes_getUnit ( statusMessageReporting smr,
xDataTOM_subAxes subAxes,
int  index 
)

Definition at line 133 of file xDataTOM_axes.cc.

133  {
134 
135  return( xDataTOM_axes_getUnit( smr, subAxes->axes, index + subAxes->offset ) );
136 }
xDataTOM_axes * axes
Definition: xDataTOM.h:76
char const * xDataTOM_axes_getUnit(statusMessageReporting *smr, xDataTOM_axes *axes, int index)

Here is the call graph for this function:

Here is the caller graph for this function:

int xDataTOM_subAxes_initialize ( statusMessageReporting smr,
xDataTOM_subAxes subAxes,
enum xDataTOM_subAxesType  type,
int  offset,
xDataTOM_axes axes,
xDataTOM_interpolation interpolation 
)

Definition at line 89 of file xDataTOM_axes.cc.

90  {
91 
92  subAxes->type = type;
93  if( axes == NULL ) {
94  smr_setReportError2p( smr, xDataTOM_smrLibraryID, -1, "Axes must not be NULL" );
95  return( 1 );
96  }
97  subAxes->offset = offset;
98  if( ( offset < 0 ) || ( offset >= axes->numberOfAxes ) ) {
99  smr_setReportError2( smr, xDataTOM_smrLibraryID, -1, "offset = %d < 0 or >= axes->numberOfAxes = %d", offset, axes->numberOfAxes );
100  return( 1 );
101  }
103  if( interpolation == NULL ) {
104  smr_setReportError2p( smr, xDataTOM_smrLibraryID, -1, "Interpolation must not be NULL for intepolationAxes" );
105  return( 1 );
106  }
107  if( xDataTOM_interpolation_copy( smr, &(subAxes->interpolation), interpolation ) ) return( 1 ); }
108  else { /* Not used but fill in anyway. */
111  }
112  subAxes->axes = axes;
113  return( 0 );
114 }
xDataTOM_interpolation interpolation
Definition: xDataTOM.h:77
xDataTOM_axes * axes
Definition: xDataTOM.h:76
int xDataTOM_smrLibraryID
Definition: xDataTOM.cc:34
int numberOfAxes
Definition: xDataTOM.h:69
#define smr_setReportError2p(smr, libraryID, code, fmt)
#define smr_setReportError2(smr, libraryID, code, fmt,...)
int xDataTOM_interpolation_set(statusMessageReporting *smr, xDataTOM_interpolation *interpolation, enum xDataTOM_interpolationFlag independent, enum xDataTOM_interpolationFlag dependent, enum xDataTOM_interpolationQualifier qualifier)
enum xDataTOM_subAxesType type
Definition: xDataTOM.h:74
int xDataTOM_interpolation_copy(statusMessageReporting *smr, xDataTOM_interpolation *desc, xDataTOM_interpolation *src)

Here is the call graph for this function:

Here is the caller graph for this function:

int xDataTOM_subAxes_release ( xDataTOM_subAxes subAxes)

Definition at line 118 of file xDataTOM_axes.cc.

118  {
119 
120  subAxes->axes = NULL;
121  return( 0 );
122 }
xDataTOM_axes * axes
Definition: xDataTOM.h:76

Here is the caller graph for this function:

int xDataTOM_V_W_XYs_free ( xDataTOM_xDataInfo xDI)

Definition at line 34 of file xDataTOM_V_W_XYs.cc.

34  {
35 
36  int i;
37  xDataTOM_V_W_XYs *V_W_XYs;
38 
39  if( xDI == NULL ) return( 0 );
40  if( strcmp( xDataTOM_V_W_XYs_ID, xDI->ID ) != 0 ) return( 1 );
41  if( ( V_W_XYs = (xDataTOM_V_W_XYs *) xDI->data ) != NULL ) {
42  for( i = 0; i < V_W_XYs->length; i++ ) xDataTOM_W_XYs_release( &(V_W_XYs->W_XYs[i]) );
43  smr_freeMemory( (void **) &(V_W_XYs->W_XYs) );
44  smr_freeMemory( (void **) &(xDI->data) );
45  }
46  return( 0 );
47 }
xDataTOM_W_XYs * W_XYs
Definition: xDataTOM.h:103
const char * ID
Definition: xDataTOM.h:151
char const * xDataTOM_V_W_XYs_ID
int xDataTOM_W_XYs_release(xDataTOM_W_XYs *W_XYs)
void * smr_freeMemory(void **p)

Here is the call graph for this function:

Here is the caller graph for this function:

int xDataTOM_V_W_XYs_initialize ( statusMessageReporting smr,
xDataTOM_V_W_XYs V_W_XYs,
int  length,
xDataTOM_axes axes 
)

Definition at line 19 of file xDataTOM_V_W_XYs.cc.

19  {
20 
21  V_W_XYs->W_XYs = NULL;
22  V_W_XYs->length = length;
23  if( ( V_W_XYs->W_XYs = (xDataTOM_W_XYs *) smr_malloc2( smr, length * sizeof( xDataTOM_W_XYs ), 1, "V_W_XYs->W_XYs" ) ) == NULL ) return( 1 );
24  if( xDataTOM_subAxes_initialize( smr, &(V_W_XYs->subAxes), xDataTOM_subAxesType_proxy, 0, axes, NULL ) != 0 ) {
25  smr_freeMemory( (void **) &(V_W_XYs->W_XYs) );
26  return( 1 );
27  }
28 
29  return( 0 );
30 }
xDataTOM_W_XYs * W_XYs
Definition: xDataTOM.h:103
int xDataTOM_subAxes_initialize(statusMessageReporting *smr, xDataTOM_subAxes *subAxes, enum xDataTOM_subAxesType type, int offset, xDataTOM_axes *axes, xDataTOM_interpolation *interpolation)
#define smr_malloc2(smr, size, zero, forItem)
void * smr_freeMemory(void **p)
xDataTOM_subAxes subAxes
Definition: xDataTOM.h:102

Here is the call graph for this function:

Here is the caller graph for this function:

int xDataTOM_V_W_XYs_LegendreSeries_free ( xDataTOM_xDataInfo xDI)

Definition at line 33 of file xDataTOM_V_W_XYs_LegendreSeries.cc.

33  {
34 
35  int i;
36  xDataTOM_V_W_XYs_LegendreSeries *V_W_XYs_LegendreSeries;
37 
38  if( xDI == NULL ) return( 0 );
39  if( strcmp( xDataTOM_V_W_XYs_LegendreSeries_ID, xDI->ID ) != 0 ) return( 1 );
40  V_W_XYs_LegendreSeries = (xDataTOM_V_W_XYs_LegendreSeries *) xDI->data;
41  for( i = 0; i < V_W_XYs_LegendreSeries->length; i++ ) xDataTOM_W_XYs_LegendreSeries_release( &(V_W_XYs_LegendreSeries->W_XYs_LegendreSeries[i]) );
42  smr_freeMemory( (void **) &(V_W_XYs_LegendreSeries->W_XYs_LegendreSeries) );
43  smr_freeMemory( (void **) &(xDI->data) );
44  return( 0 );
45 }
const char * ID
Definition: xDataTOM.h:151
int xDataTOM_W_XYs_LegendreSeries_release(xDataTOM_W_XYs_LegendreSeries *W_XYs_LegendreSeries)
xDataTOM_W_XYs_LegendreSeries * W_XYs_LegendreSeries
Definition: xDataTOM.h:128
void * smr_freeMemory(void **p)
char const * xDataTOM_V_W_XYs_LegendreSeries_ID

Here is the call graph for this function:

Here is the caller graph for this function:

int xDataTOM_V_W_XYs_LegendreSeries_initialize ( statusMessageReporting smr,
xDataTOM_V_W_XYs_LegendreSeries V_W_XYs_LegendreSeries,
int  length,
xDataTOM_axes axes 
)

Definition at line 19 of file xDataTOM_V_W_XYs_LegendreSeries.cc.

20  {
21 
22  V_W_XYs_LegendreSeries->W_XYs_LegendreSeries = NULL;
23  V_W_XYs_LegendreSeries->length = length;
24  if( xDataTOM_subAxes_initialize( smr, &(V_W_XYs_LegendreSeries->subAxes), xDataTOM_subAxesType_proxy, 0, axes, NULL ) != 0 ) return( 1 );
25  if( ( V_W_XYs_LegendreSeries->W_XYs_LegendreSeries = (xDataTOM_W_XYs_LegendreSeries *) smr_malloc2( smr, length * sizeof( xDataTOM_W_XYs_LegendreSeries ), 1,
26  "V_W_XYs_LegendreSeries->W_XYs_LegendreSeries" ) ) == NULL ) return( 1 );
27 
28  return( 0 );
29 }
int xDataTOM_subAxes_initialize(statusMessageReporting *smr, xDataTOM_subAxes *subAxes, enum xDataTOM_subAxesType type, int offset, xDataTOM_axes *axes, xDataTOM_interpolation *interpolation)
#define smr_malloc2(smr, size, zero, forItem)
xDataTOM_W_XYs_LegendreSeries * W_XYs_LegendreSeries
Definition: xDataTOM.h:128

Here is the call graph for this function:

Here is the caller graph for this function:

xDataTOM_W_XYs* xDataTOM_W_XYs_free ( xDataTOM_W_XYs W_XYs)

Definition at line 48 of file xDataTOM_W_XYs.cc.

48  {
49 
50  if( W_XYs == NULL ) return( NULL );
51  xDataTOM_W_XYs_release( W_XYs );
52  smr_freeMemory( (void **) &W_XYs );
53  return( (xDataTOM_W_XYs *) NULL );
54 }
int xDataTOM_W_XYs_release(xDataTOM_W_XYs *W_XYs)
void * smr_freeMemory(void **p)

Here is the call graph for this function:

Here is the caller graph for this function:

int xDataTOM_W_XYs_freeFrom_xDataInfo ( xDataTOM_xDataInfo xDI)

Definition at line 58 of file xDataTOM_W_XYs.cc.

58  {
59 
60  if( xDI == NULL ) return( 0 );
61  if( strcmp( xDataTOM_W_XYs_ID, xDI->ID ) != 0 ) return( 1 );
63  return( 0 );
64 }
xDataTOM_W_XYs * xDataTOM_W_XYs_free(xDataTOM_W_XYs *W_XYs)
const char * ID
Definition: xDataTOM.h:151
char const * xDataTOM_W_XYs_ID

Here is the call graph for this function:

Here is the caller graph for this function:

int xDataTOM_W_XYs_initialize ( statusMessageReporting smr,
xDataTOM_W_XYs W_XYs,
int  index,
int  length,
double  value,
xDataTOM_axes axes,
int  axesOffset 
)

Definition at line 30 of file xDataTOM_W_XYs.cc.

31  {
32 
33  W_XYs->XYs = NULL;
34  W_XYs->index = index;
35  W_XYs->length = length;
36  W_XYs->value = value;
37  if( ( W_XYs->XYs = (xDataTOM_XYs *) smr_malloc2( smr, length * sizeof( xDataTOM_XYs ), 1, "W_XYs->XYs" ) ) == NULL ) return( 1 );
38  if( xDataTOM_subAxes_initialize( smr, &(W_XYs->subAxes), xDataTOM_subAxesType_proxy, axesOffset, axes, NULL ) != 0 ) {
39  smr_freeMemory( (void **) &(W_XYs->XYs) );
40  return( 1 );
41  }
42 
43  return( 0 );
44 }
xDataTOM_XYs * XYs
Definition: xDataTOM.h:97
xDataTOM_subAxes subAxes
Definition: xDataTOM.h:96
int xDataTOM_subAxes_initialize(statusMessageReporting *smr, xDataTOM_subAxes *subAxes, enum xDataTOM_subAxesType type, int offset, xDataTOM_axes *axes, xDataTOM_interpolation *interpolation)
const XML_Char int const XML_Char * value
Definition: expat.h:331
#define smr_malloc2(smr, size, zero, forItem)
double value
Definition: xDataTOM.h:95
void * smr_freeMemory(void **p)

Here is the call graph for this function:

Here is the caller graph for this function:

int xDataTOM_W_XYs_LegendreSeries_free ( xDataTOM_xDataInfo xDI)

Definition at line 34 of file xDataTOM_W_XYs_LegendreSeries.cc.

34  {
35 
36  if( xDI == NULL ) return( 0 );
37  if( strcmp( xDataTOM_W_XYs_LegendreSeries_ID, xDI->ID ) != 0 ) return( 1 );
39  smr_freeMemory( (void **) &(xDI->data) );
40  return( 0 );
41 }
const char * ID
Definition: xDataTOM.h:151
int xDataTOM_W_XYs_LegendreSeries_release(xDataTOM_W_XYs_LegendreSeries *W_XYs_LegendreSeries)
char const * xDataTOM_W_XYs_LegendreSeries_ID
void * smr_freeMemory(void **p)

Here is the call graph for this function:

Here is the caller graph for this function:

int xDataTOM_W_XYs_LegendreSeries_initialize ( statusMessageReporting smr,
xDataTOM_W_XYs_LegendreSeries W_XYs_LegendreSeries,
int  index,
int  length,
double  value,
enum xDataTOM_subAxesType  subAxesType,
xDataTOM_axes axes,
xDataTOM_interpolation interpolation 
)

Definition at line 19 of file xDataTOM_W_XYs_LegendreSeries.cc.

20  {
21 
22  W_XYs_LegendreSeries->LegendreSeries = NULL;
23  W_XYs_LegendreSeries->index = index;
24  W_XYs_LegendreSeries->length = length;
25  W_XYs_LegendreSeries->value = value;
26  if( xDataTOM_subAxes_initialize( smr, &(W_XYs_LegendreSeries->subAxes), subAxesType, 0, axes, interpolation ) != 0 ) return( 1 );
27  if( ( W_XYs_LegendreSeries->LegendreSeries = (xDataTOM_LegendreSeries *) smr_malloc2( smr, length * sizeof( xDataTOM_LegendreSeries ), 1, "W_XYs_LegendreSeries->LegendreSeries" ) ) == NULL ) return( 1 );
28 
29  return( 0 );
30 }
xDataTOM_LegendreSeries * LegendreSeries
Definition: xDataTOM.h:116
int xDataTOM_subAxes_initialize(statusMessageReporting *smr, xDataTOM_subAxes *subAxes, enum xDataTOM_subAxesType type, int offset, xDataTOM_axes *axes, xDataTOM_interpolation *interpolation)
const XML_Char int const XML_Char * value
Definition: expat.h:331
xDataTOM_subAxes subAxes
Definition: xDataTOM.h:115
#define smr_malloc2(smr, size, zero, forItem)

Here is the call graph for this function:

Here is the caller graph for this function:

int xDataTOM_W_XYs_LegendreSeries_release ( xDataTOM_W_XYs_LegendreSeries W_XYs_LegendreSeries)

Definition at line 45 of file xDataTOM_W_XYs_LegendreSeries.cc.

45  {
46 
47  int i;
48 
49  for( i = 0; i < W_XYs_LegendreSeries->length; i++ ) xDataTOM_LegendreSeries_release( &(W_XYs_LegendreSeries->LegendreSeries[i]) );
50  smr_freeMemory( (void **) &(W_XYs_LegendreSeries->LegendreSeries) );
51  return( 0 );
52 }
xDataTOM_LegendreSeries * LegendreSeries
Definition: xDataTOM.h:116
int xDataTOM_LegendreSeries_release(xDataTOM_LegendreSeries *LegendreSeries)
void * smr_freeMemory(void **p)

Here is the call graph for this function:

Here is the caller graph for this function:

xDataTOM_W_XYs* xDataTOM_W_XYs_new ( statusMessageReporting smr,
int  index,
int  length,
double  value,
xDataTOM_axes axes,
int  axesOffset 
)

Definition at line 19 of file xDataTOM_W_XYs.cc.

19  {
20 
21  xDataTOM_W_XYs *W_XYs;
22 
23  if( ( W_XYs = (xDataTOM_W_XYs *) smr_malloc2( smr, sizeof( xDataTOM_W_XYs ), 0, "W_XYs" ) ) == NULL ) return( NULL );
24  if( xDataTOM_W_XYs_initialize( smr, W_XYs, index, length, value, axes, axesOffset ) != 0 ) smr_freeMemory( (void **) &W_XYs );
25  return( W_XYs );
26 }
const XML_Char int const XML_Char * value
Definition: expat.h:331
int xDataTOM_W_XYs_initialize(statusMessageReporting *smr, xDataTOM_W_XYs *W_XYs, int index, int length, double value, xDataTOM_axes *axes, int axesOffset)
#define smr_malloc2(smr, size, zero, forItem)
void * smr_freeMemory(void **p)

Here is the call graph for this function:

int xDataTOM_W_XYs_release ( xDataTOM_W_XYs W_XYs)

Definition at line 68 of file xDataTOM_W_XYs.cc.

68  {
69 
70  int i;
71 
72  xDataTOM_subAxes_release( &(W_XYs->subAxes) );
73  for( i = 0; i < W_XYs->length; i++ ) xDataTOM_XYs_release( &(W_XYs->XYs[i]) );
74  W_XYs->length = 0;
75  smr_freeMemory( (void **) &(W_XYs->XYs) );
76 
77  return( 0 );
78 }
int xDataTOM_XYs_release(xDataTOM_XYs *XYs)
Definition: xDataTOM_XYs.cc:31
xDataTOM_XYs * XYs
Definition: xDataTOM.h:97
xDataTOM_subAxes subAxes
Definition: xDataTOM.h:96
int xDataTOM_subAxes_release(xDataTOM_subAxes *subAxes)
void * smr_freeMemory(void **p)

Here is the call graph for this function:

Here is the caller graph for this function:

int xDataTOM_XYs_free ( xDataTOM_xDataInfo xDI)

Definition at line 19 of file xDataTOM_XYs.cc.

19  {
20 
21  if( xDI == NULL ) return( 0 );
22  if( strcmp( xDataTOM_XYs_ID, xDI->ID ) != 0 ) return( 1 );
24  smr_freeMemory( (void **) &(xDI->data) );
25 
26  return( 0 );
27 }
int xDataTOM_XYs_release(xDataTOM_XYs *XYs)
Definition: xDataTOM_XYs.cc:31
char const * xDataTOM_XYs_ID
Definition: xDataTOM_XYs.cc:14
const char * ID
Definition: xDataTOM.h:151
void * smr_freeMemory(void **p)

Here is the call graph for this function:

Here is the caller graph for this function:

int xDataTOM_XYs_getData ( xDataTOM_XYs XYs,
double **  data 
)

Definition at line 42 of file xDataTOM_XYs.cc.

42  {
43 
44  *data = XYs->data;
45  return( XYs->length );
46 }
const XML_Char const XML_Char * data
Definition: expat.h:268
double * data
Definition: xDataTOM.h:84

Here is the caller graph for this function:

int xDataTOM_XYs_getDataFromXDataInfo ( xDataTOM_xDataInfo xDI,
double **  data 
)

Definition at line 50 of file xDataTOM_XYs.cc.

50  {
51 
52  return( xDataTOM_XYs_getData( (xDataTOM_XYs *) xDI->data, data ) );
53 }
const XML_Char const XML_Char * data
Definition: expat.h:268
int xDataTOM_XYs_getData(xDataTOM_XYs *XYs, double **data)
Definition: xDataTOM_XYs.cc:42

Here is the call graph for this function:

Here is the caller graph for this function:

int xDataTOM_XYs_release ( xDataTOM_XYs XYs)

Definition at line 31 of file xDataTOM_XYs.cc.

31  {
32 
34  XYs->length = 0;
35  smr_freeMemory( (void **) &(XYs->data) );
36 
37  return( 0 );
38 }
xDataTOM_subAxes subAxes
Definition: xDataTOM.h:83
int xDataTOM_subAxes_release(xDataTOM_subAxes *subAxes)
double * data
Definition: xDataTOM.h:84
void * smr_freeMemory(void **p)

Here is the call graph for this function:

Here is the caller graph for this function:

int xDataTOMAL_addAttribute ( statusMessageReporting smr,
xDataTOM_attributionList attributes,
char const *  name,
char const *  value 
)

Definition at line 376 of file xDataTOM.cc.

376  {
377 
378  xDataTOM_attribute *attribute;
379 
380  if( ( attribute = (xDataTOM_attribute *) smr_malloc2( smr, sizeof( xDataTOM_attribute ), 1, "xDataTOM_attribute" ) ) == NULL ) return( 1 );
381  if( ( attribute->name = smr_allocateCopyString2( smr, name, "name" ) ) == NULL ) goto err;
382  if( ( attribute->value = smr_allocateCopyString2( smr, value, "value" ) ) == NULL ) goto err;
383  if( attributes->attributes == NULL ) {
384  attributes->attributes = attribute; }
385  else {
386  xDataTOM_attribute *last;
387 
388  for( last = attributes->attributes; last->next != NULL; last = last->next ) ;
389  last->next = attribute;
390  }
391  attributes->number++;
392  return( 0 );
393 
394 err:
395  smr_freeMemory( (void **) &(attribute->name) );
396  smr_freeMemory( (void **) &(attribute->value) );
397  smr_freeMemory( (void **) &(attribute) );
398  return( 1 );
399 }
const XML_Char * name
Definition: expat.h:151
#define smr_allocateCopyString2(smr, s, forItem)
xDataTOM_attribute * attributes
Definition: xDataTOM.h:165
xDataTOM_attribute * next
Definition: xDataTOM.h:158
const XML_Char int const XML_Char * value
Definition: expat.h:331
#define smr_malloc2(smr, size, zero, forItem)
void * smr_freeMemory(void **p)

Here is the call graph for this function:

Here is the caller graph for this function:

int xDataTOMAL_convertAttributeToDouble ( statusMessageReporting smr,
xDataTOM_attributionList attributes,
char const *  name,
double *  d 
)

Definition at line 450 of file xDataTOM.cc.

450  {
451 
452  char const *value = xDataTOMAL_getAttributesValue( attributes, name );
453  char *e;
454 
455  if( value != NULL ) {
456  *d = strtod( value, &e );
457  if( *e == 0 ) return( 0 );
458  smr_setReportError2( smr, xDataTOM_smrLibraryID, 1, "could not convert attribute %s's values = '%s' to a double", name, value ); }
459  else {
460  smr_setReportError2( smr, xDataTOM_smrLibraryID, 1, "no attribute named '%s'", name );
461  }
462  return( 1 );
463 }
const XML_Char * name
Definition: expat.h:151
int xDataTOM_smrLibraryID
Definition: xDataTOM.cc:34
char const * xDataTOMAL_getAttributesValue(xDataTOM_attributionList *attributes, char const *name)
Definition: xDataTOM.cc:403
#define smr_setReportError2(smr, libraryID, code, fmt,...)
const XML_Char int const XML_Char * value
Definition: expat.h:331

Here is the call graph for this function:

Here is the caller graph for this function:

int xDataTOMAL_convertAttributeToInteger ( statusMessageReporting smr,
xDataTOM_attributionList attributes,
char const *  name,
int n 
)

Definition at line 433 of file xDataTOM.cc.

433  {
434 
435  char const *value = xDataTOMAL_getAttributesValue( attributes, name );
436  char *e;
437 
438  if( value != NULL ) {
439  *n = (int) strtoll( value, &e, 10 );
440  if( *e == 0 ) return( 0 );
441  smr_setReportError2( smr, xDataTOM_smrLibraryID, 1, "could not convert attribute %s's value = '%s' to an integer", name, value ); }
442  else {
443  smr_setReportError2( smr, xDataTOM_smrLibraryID, 1, "no attribute named '%s'", name );
444  }
445  return( 1 );
446 }
const XML_Char * name
Definition: expat.h:151
int xDataTOM_smrLibraryID
Definition: xDataTOM.cc:34
char const * xDataTOMAL_getAttributesValue(xDataTOM_attributionList *attributes, char const *name)
Definition: xDataTOM.cc:403
#define smr_setReportError2(smr, libraryID, code, fmt,...)
const XML_Char int const XML_Char * value
Definition: expat.h:331
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
const G4int n

Here is the call graph for this function:

Here is the caller graph for this function:

int xDataTOMAL_copyAttributionList ( statusMessageReporting smr,
xDataTOM_attributionList desc,
xDataTOM_attributionList src 
)

Definition at line 415 of file xDataTOM.cc.

415  {
416 
417  xDataTOM_attribute *attribute;
418 
419  xDataTOMAL_initial( smr, desc );
420  for( attribute = src->attributes; attribute != NULL; attribute = attribute->next ) {
421  if( xDataTOMAL_addAttribute( smr, desc, attribute->name, attribute->value ) != 0 ) goto err;
422 
423  }
424  return( 0 );
425 
426 err:
427  xDataTOMAL_release( desc );
428  return( 1 );
429 }
xDataTOM_attribute * attributes
Definition: xDataTOM.h:165
xDataTOM_attribute * next
Definition: xDataTOM.h:158
void xDataTOMAL_initial(statusMessageReporting *smr, xDataTOM_attributionList *attributes)
Definition: xDataTOM.cc:353
void xDataTOMAL_release(xDataTOM_attributionList *attributes)
Definition: xDataTOM.cc:361
int xDataTOMAL_addAttribute(statusMessageReporting *smr, xDataTOM_attributionList *attributes, char const *name, char const *value)
Definition: xDataTOM.cc:376

Here is the call graph for this function:

Here is the caller graph for this function:

char const* xDataTOMAL_getAttributesValue ( xDataTOM_attributionList attributes,
char const *  name 
)

Definition at line 403 of file xDataTOM.cc.

403  {
404 
405  xDataTOM_attribute *attribute;
406 
407  for( attribute = attributes->attributes; attribute != NULL; attribute = attribute->next ) {
408  if( !strcmp( attribute->name, name ) ) return( attribute->value );
409  }
410  return( NULL );
411 }
const XML_Char * name
Definition: expat.h:151
xDataTOM_attribute * attributes
Definition: xDataTOM.h:165
xDataTOM_attribute * next
Definition: xDataTOM.h:158

Here is the caller graph for this function:

void xDataTOMAL_initial ( statusMessageReporting smr,
xDataTOM_attributionList attributes 
)

Definition at line 353 of file xDataTOM.cc.

353  {
354 
355  attributes->number = 0;
356  attributes->attributes = NULL;
357 }
xDataTOM_attribute * attributes
Definition: xDataTOM.h:165

Here is the caller graph for this function:

void xDataTOMAL_release ( xDataTOM_attributionList attributes)

Definition at line 361 of file xDataTOM.cc.

361  {
362 
363  xDataTOM_attribute *attribute, *next;
364 
365  for( attribute = attributes->attributes; attribute != NULL; attribute = next ) {
366  next = attribute->next;
367  smr_freeMemory( (void **) &(attribute->name) );
368  smr_freeMemory( (void **) &(attribute->value) );
369  smr_freeMemory( (void **) &(attribute) );
370  }
371  xDataTOMAL_initial( NULL, attributes );
372 }
xDataTOM_attribute * attributes
Definition: xDataTOM.h:165
xDataTOM_attribute * next
Definition: xDataTOM.h:158
void xDataTOMAL_initial(statusMessageReporting *smr, xDataTOM_attributionList *attributes)
Definition: xDataTOM.cc:353
void * smr_freeMemory(void **p)

Here is the call graph for this function:

Here is the caller graph for this function:

int xDataTOME_addAttribute ( statusMessageReporting smr,
xDataTOM_element element,
char const *  name,
char const *  value 
)

Definition at line 279 of file xDataTOM.cc.

279  {
280 
281  return( xDataTOMAL_addAttribute( smr, &(element->attributes), name, value ) );
282 }
const XML_Char * name
Definition: expat.h:151
xDataTOM_attributionList attributes
Definition: xDataTOM.h:184
const XML_Char int const XML_Char * value
Definition: expat.h:331
int xDataTOMAL_addAttribute(statusMessageReporting *smr, xDataTOM_attributionList *attributes, char const *name, char const *value)
Definition: xDataTOM.cc:376

Here is the call graph for this function:

Here is the caller graph for this function:

int xDataTOME_convertAttributeToDouble ( statusMessageReporting smr,
xDataTOM_element element,
char const *  name,
double *  d 
)

Definition at line 307 of file xDataTOM.cc.

307  {
308 
309  return( xDataTOMAL_convertAttributeToDouble( smr, &(element->attributes), name, d ) );
310 }
const XML_Char * name
Definition: expat.h:151
xDataTOM_attributionList attributes
Definition: xDataTOM.h:184
int xDataTOMAL_convertAttributeToDouble(statusMessageReporting *smr, xDataTOM_attributionList *attributes, char const *name, double *d)
Definition: xDataTOM.cc:450

Here is the call graph for this function:

Here is the caller graph for this function:

int xDataTOME_convertAttributeToDoubleWithUnit ( statusMessageReporting smr,
xDataTOM_element element,
char const *  name,
double *  d,
char *  unit 
)
int xDataTOME_convertAttributeToInteger ( statusMessageReporting smr,
xDataTOM_element element,
char const *  name,
int n 
)

Definition at line 300 of file xDataTOM.cc.

300  {
301 
302  return( xDataTOMAL_convertAttributeToInteger( smr, &(element->attributes), name, n ) );
303 }
const XML_Char * name
Definition: expat.h:151
xDataTOM_attributionList attributes
Definition: xDataTOM.h:184
const G4int n
int xDataTOMAL_convertAttributeToInteger(statusMessageReporting *smr, xDataTOM_attributionList *attributes, char const *name, int *n)
Definition: xDataTOM.cc:433

Here is the call graph for this function:

Here is the caller graph for this function:

int xDataTOME_copyAttributionList ( statusMessageReporting smr,
xDataTOM_attributionList desc,
xDataTOM_element element 
)

Definition at line 293 of file xDataTOM.cc.

293  {
294 
295  return( xDataTOMAL_copyAttributionList( smr, desc, &(element->attributes) ) );
296 }
int xDataTOMAL_copyAttributionList(statusMessageReporting *smr, xDataTOM_attributionList *desc, xDataTOM_attributionList *src)
Definition: xDataTOM.cc:415
xDataTOM_attributionList attributes
Definition: xDataTOM.h:184

Here is the call graph for this function:

Here is the caller graph for this function:

xDataTOM_element* xDataTOME_getFirstElement ( xDataTOM_element element)

Definition at line 230 of file xDataTOM.cc.

230  {
231 
232  if( element != NULL ) element = element->children;
233  return( element );
234 }
xDataTOM_element * children
Definition: xDataTOM.h:186

Here is the caller graph for this function:

int xDataTOME_getInterpolation ( statusMessageReporting smr,
xDataTOM_element element,
int  index,
enum xDataTOM_interpolationFlag independent,
enum xDataTOM_interpolationFlag dependent,
enum xDataTOM_interpolationQualifier qualifier 
)

Definition at line 314 of file xDataTOM.cc.

315  {
316 
317  xDataTOM_xDataInfo *xDI = &(element->xDataInfo);
318 
319  if( xDI->ID == NULL ) return( 1 );
320 
321  return( xDataTOM_axes_getInterpolation( smr, &(xDI->axes), index, independent, dependent, qualifier ) );
322 }
int xDataTOM_axes_getInterpolation(statusMessageReporting *smr, xDataTOM_axes *axes, int index, enum xDataTOM_interpolationFlag *independent, enum xDataTOM_interpolationFlag *dependent, enum xDataTOM_interpolationQualifier *qualifier)
const char * ID
Definition: xDataTOM.h:151
xDataTOM_axes axes
Definition: xDataTOM.h:153
xDataTOM_xDataInfo xDataInfo
Definition: xDataTOM.h:187

Here is the call graph for this function:

Here is the caller graph for this function:

xDataTOM_element* xDataTOME_getNextElement ( xDataTOM_element element)

Definition at line 238 of file xDataTOM.cc.

238  {
239 
240  if( element != NULL ) element = element->next;
241  return( element );
242 }
xDataTOM_element * next
Definition: xDataTOM.h:182

Here is the caller graph for this function:

xDataTOM_element* xDataTOME_getOneElementByName ( statusMessageReporting smr,
xDataTOM_element element,
char const *  name,
int  required 
)

Definition at line 246 of file xDataTOM.cc.

246  {
247 
248  int n = 0;
249  xDataTOM_element *child, *desired = NULL;
250 
251  for( child = xDataTOME_getFirstElement( element ); child != NULL; child = xDataTOME_getNextElement( child ) ) {
252  if( strcmp( child->name, name ) == 0 ) {
253  if( n == 0 ) desired = child;
254  n++;
255  }
256  }
257  if( n == 0 ) {
258  if( required ) smr_setReportError2( smr, smr_unknownID, 1, "elements '%s' not found in element '%s'", name, element->name ); }
259  else if( n > 1 ) {
260  smr_setReportError2( smr, smr_unknownID, 1, "multiple (= %d) elements '%s' found in element '%s'", name, element->name );
261  desired = NULL;
262  }
263  return( desired );
264 }
const XML_Char * name
Definition: expat.h:151
xDataTOM_element * xDataTOME_getFirstElement(xDataTOM_element *element)
Definition: xDataTOM.cc:230
#define smr_setReportError2(smr, libraryID, code, fmt,...)
const G4int n
#define smr_unknownID
xDataTOM_element * xDataTOME_getNextElement(xDataTOM_element *element)
Definition: xDataTOM.cc:238

Here is the call graph for this function:

Here is the caller graph for this function:

xDataTOM_xDataInfo* xDataTOME_getXData ( xDataTOM_element TE)

Definition at line 504 of file xDataTOM.cc.

504  {
505 
506  if( TE->xDataInfo.ID == NULL ) return( NULL );
507  return( &(TE->xDataInfo) );
508 }
const char * ID
Definition: xDataTOM.h:151
xDataTOM_xDataInfo xDataInfo
Definition: xDataTOM.h:187

Here is the caller graph for this function:

void* xDataTOME_getXDataIfID ( statusMessageReporting smr,
xDataTOM_element TE,
char const *  ID 
)

Definition at line 512 of file xDataTOM.cc.

512  {
513 
515 
516  if( xDI == NULL ) {
517  smr_setReportError2( smr, xDataTOM_smrLibraryID, 1, "element '%s' does not have xData", TE->name );
518  return( NULL );
519  }
520  if( strcmp( ID, xDI->ID ) ) {
521  smr_setReportError2( smr, xDataTOM_smrLibraryID, 1, "xData has ID = '%s' not '%s' for element %s", xDI->ID, ID, TE->name );
522  return( NULL );
523  }
524  return( xDI->data );
525 
526 }
int xDataTOM_smrLibraryID
Definition: xDataTOM.cc:34
xDataTOM_xDataInfo * xDataTOME_getXData(xDataTOM_element *TE)
Definition: xDataTOM.cc:504
const char * ID
Definition: xDataTOM.h:151
#define smr_setReportError2(smr, libraryID, code, fmt,...)

Here is the call graph for this function:

Here is the caller graph for this function:

char* xDataTOMMisc_getAbsPath ( statusMessageReporting smr,
const char *  fileName 
)

Definition at line 29 of file xDataTOM_Misc.cc.

29  {
30 /*
31 * User must free returned string.
32 */
33  int n = (int) strlen( fileName ) + 1, nCwd = 0;
34  char *absPath, cwd[4 * 1024] = "", *p, *needle;
35 
36  if( fileName[0] != '/' ) {
37  //if( getcwd( cwd, sizeof( cwd ) + 1 ) == NULL ) {
38  //TK modified above line for compiler(gcc.4.8) warning message
39  if( getcwd( cwd, sizeof( cwd ) ) == NULL ) {
40  smr_setReportError2p( smr, xDataTOM_smrLibraryID, -1, "hardwired cwd too small" );
41  return( NULL );
42  }
43  nCwd = (int) strlen( cwd );
44  n += nCwd + 1; /* cwd + '/'. */
45  }
46  if( ( absPath = (char *) smr_malloc2( smr, n, 0, "absPath" ) ) == NULL ) return( NULL );
47  if( fileName[0] != '/' ) {
48  strcpy( absPath, cwd );
49  strcat( absPath, "/" );
50  strcat( absPath, fileName ); }
51  else {
52  strcpy( absPath, fileName );
53  }
54 
55  while( 1 ) { /* Remove all ./ from path. */
56  if( ( needle = strstr( absPath, "/./" ) ) == NULL ) break;
57  p = needle;
58  for( needle += 2; *needle; p++, needle++ ) *p = *needle;
59  *p = 0;
60  } // Loop checking, 11.06.2015, T. Koi
61 
62  while( 1 ) { /* Remove all ../ from path. */
63  if( ( needle = strstr( absPath, "/../" ) ) == NULL ) break;
64  p = needle - 1;
65  while( ( p > absPath ) && ( *p != '/' ) ) p--; // Loop checking, 11.06.2015, T. Koi
66  if( *p != '/' ) break; /* This should not happen if path is legit, I think, and I do not know what to do so will leave it. */
67  if( p == absPath ) break; /* Ditto. */
68  for( needle += 3; *needle; p++, needle++ ) *p = *needle;
69  *p = 0;
70  } // Loop checking, 11.06.2015, T. Koi
71  return( absPath );
72 }
int xDataTOM_smrLibraryID
Definition: xDataTOM.cc:34
const char * p
Definition: xmltok.h:285
#define smr_setReportError2p(smr, libraryID, code, fmt)
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
#define smr_malloc2(smr, size, zero, forItem)
const G4int n

Here is the call graph for this function:

Here is the caller graph for this function: