Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
xDataTOM.h
Go to the documentation of this file.
1 /*
2 # <<BEGIN-copyright>>
3 # <<END-copyright>>
4 */
5 
6 #ifndef xDataTOM_h_included
7 #define xDataTOM_h_included
8 
10 
11 #if defined __cplusplus
12  extern "C" {
13  namespace GIDI {
14 #endif
15 
16 typedef int xDataTOM_Int;
17 
18 /* Note: xDataTOM_interpolationFlag_flat must be last for current logic in xDataTOM_interpolation.c to work. */
26 
31 
36 
44 
46 
53 
54 typedef int (*xDataTOM_sortElementFunc)( const void *, const void * );
55 
57  enum xDataTOM_interpolationFlag independent, dependent;
59 };
60 
62  int index;
63  char *label;
64  char *unit;
66 };
67 
71 };
72 
75  int offset;
78 };
79 
81  int index, length;
82  double value, accuracy;
84  double *data;
85 };
86 
88  int length;
91 };
92 
94  int index, length;
95  double value;
98 };
99 
101  int length;
104 };
105 
107  int index, length;
108  double value;
109  double *LegendreSeries;
110 };
111 
113  int index, length;
114  double value;
117 };
118 
120  int length;
123 };
124 
126  int length;
129 };
130 
132  int index, length;
133  double value;
134  double *coefficients;
135 };
136 
142 };
143 
145  int length;
147  double *coefficients;
148 };
149 
151  const char *ID;
154  void *data;
155 };
156 
159  char *name;
160  char *value;
161 };
162 
164  int number;
166 };
167 
170  const char *sortString;
171 };
172 
174  int n;
176 };
177 
179  int ordinal; /* Counting from 0. */
180  int index; /* Value from "index" attribute if present or -1. */
183  char *name;
188 };
189 
191  char *fileName;
194 };
195 
196 /*
197 * Stuff in common/xDataTOM.c
198 */
199 xDataTOM_TOM *xDataTOM_importFile( statusMessageReporting *smr, const char *fileName );
203 int xDataTOM_setFileNameTOM( statusMessageReporting *smr, xDataTOM_TOM *doc, const char *fileName );
204 void xDataTOM_displayTree( statusMessageReporting *smr, xDataTOM_TOM *TOM, int printAttributes );
205 
206 xDataTOM_element *xDataTOM_mallocElement( statusMessageReporting *smr, xDataTOM_element *parent, int ordinal, int index, char const *name );
207 void xDataTOM_freeElement( xDataTOM_element **element );
215 int xDataTOME_addAttribute( statusMessageReporting *smr, xDataTOM_element *element, char const *name, char const *value );
216 char const *xDataTOM_getAttributesValueInElement( xDataTOM_element *element, char const *name );
218 int xDataTOME_convertAttributeToInteger( statusMessageReporting *smr, xDataTOM_element *element, char const *name, int *n );
219 int xDataTOME_convertAttributeToDouble( statusMessageReporting *smr, xDataTOM_element *element, char const *name, double *d );
220 int xDataTOME_convertAttributeToDoubleWithUnit( statusMessageReporting *smr, xDataTOM_element *element, char const *name, double *d, char *unit );
222  enum xDataTOM_interpolationFlag *independent, enum xDataTOM_interpolationFlag *dependent, enum xDataTOM_interpolationQualifier *qualifier );
223 
225 void xDataTOMAL_release( xDataTOM_attributionList *attributes );
226 int xDataTOMAL_addAttribute( statusMessageReporting *smr, xDataTOM_attributionList *attributes, char const *name, char const *value );
227 char const *xDataTOMAL_getAttributesValue( xDataTOM_attributionList *attributes, char const *name );
230 int xDataTOMAL_convertAttributeToDouble( statusMessageReporting *smr, xDataTOM_attributionList *attributes, char const *name, double *d );
231 
232 void *xData_initializeData( statusMessageReporting *smr, xDataTOM_element *TE, char const *ID, size_t size );
233 int xDataTOM_isXDataID( xDataTOM_element *TE, char const *ID );
234 
235 /*
236 * Stuff in common/xDataTOMMisc.c
237 */
238 char *xDataTOMMisc_getAbsPath( statusMessageReporting *smr, const char *fileName );
239 int xDataTOM_setMessageError_ReturnInt( int value, statusMessageReporting *smr, void *userData, const char *file, int line, int code, const char *fmt, ... );
241 
242 #define xDataTOMMisc_allocateCopyString2( smr, s, forItem ) xDataTOMMisc_allocateCopyString( smr, s, forItem, __FILE__, __LINE__ )
243 
244 /*
245 * Stuff in common/xDataTOM_interpolation.c
246 */
248  enum xDataTOM_interpolationFlag dependent, enum xDataTOM_interpolationQualifier qualifier );
249 int xDataTOM_interpolation_setFromString( statusMessageReporting *smr, xDataTOM_interpolation *interpolation, char const *str );
251 
252 /*
253 * Stuff in common/xDataTOM_axes.c
254 */
255 int xDataTOM_axes_initialize( statusMessageReporting *smr, xDataTOM_axes *axes, int numberOfAxes );
257 char const *xDataTOM_axes_getLabel( statusMessageReporting *smr, xDataTOM_axes *axes, int index );
258 char const *xDataTOM_axes_getUnit( statusMessageReporting *smr, xDataTOM_axes *axes, int index );
260  enum xDataTOM_interpolationFlag *dependent, enum xDataTOM_interpolationQualifier *qualifier );
261 
263  xDataTOM_axes *axes, xDataTOM_interpolation *interpolation );
265 char const *xDataTOM_subAxes_getLabel( statusMessageReporting *smr, xDataTOM_subAxes *subAxes, int index );
266 char const *xDataTOM_subAxes_getUnit( statusMessageReporting *smr, xDataTOM_subAxes *subAxes, int index );
267 
268 xDataTOM_axis *xDataTOM_axis_new( statusMessageReporting *smr, int index, char const *label, char const *unit, xDataTOM_interpolation *interpolation );
269 int xDataTOM_axis_initialize( statusMessageReporting *smr, xDataTOM_axis *axis, int index, char const *label, char const *unit,
270  xDataTOM_interpolation *interpolation );
274 
275 /*
276 * Stuff in common/xDataTOM_XYs.c
277 */
280 int xDataTOM_XYs_getData( xDataTOM_XYs *XYs, double **data );
282 
283 /*
284 * Stuff in common/xDataTOM_regionsXYs.c
285 */
287 
288 /*
289 * Stuff in common/xDataTOM_W_XYs.c
290 */
291 xDataTOM_W_XYs *xDataTOM_W_XYs_new( statusMessageReporting *smr, int index, int length, double value, xDataTOM_axes *axes, int axesOffset );
292 int xDataTOM_W_XYs_initialize( statusMessageReporting *smr, xDataTOM_W_XYs *W_XYs, int index, int length, double value, xDataTOM_axes *axes,
293  int axesOffset );
298 void *xDataTOME_getXDataIfID( statusMessageReporting *smr, xDataTOM_element *TE, char const *ID );
299 
300 /*
301 * Stuff in common/xDataTOM_V_W_XYs.c
302 */
305 
306 /*
307 * Stuff in common/xDataTOM_LegendreSeries.c
308 */
309 int xDataTOM_LegendreSeries_initialize( statusMessageReporting *smr, xDataTOM_LegendreSeries *LegendreSeries, int index, int length, double value );
311 
312 /*
313 * Stuff in common/xDataTOM_W_XYs_LegendreSeries.c
314 */
316  int length, double value, enum xDataTOM_subAxesType subAxesType, xDataTOM_axes *axes, xDataTOM_interpolation *interpolation );
319 
320 /*
321 * Stuff in common/xDataTOM_regionsW_XYs_LegendreSeries.c
322 */
324  int length, xDataTOM_axes *axes );
327 
328 /*
329 * Stuff in common/xDataTOM_V_W_XYs_LegendreSeries.c
330 */
332  int length, xDataTOM_axes *axes );
334 
335 /*
336 * Stuff in common/xDataTOM_KalbachMann.c
337 */
341 
342 /*
343 * Stuff in common/xDataTOM_polynomial.c
344 */
348 int xDataTOM_polynomial_getData( xDataTOM_polynomial *polynomial, double **data );
350 
351 #if defined __cplusplus
352  }
353  }
354 #endif
355 
356 #endif /* End of xDataTOM_h_included. */
xDataTOM_TOM * xDataTOM_mallocTOM(statusMessageReporting *smr)
Definition: xDataTOM.cc:54
xDataTOM_W_XYs * xDataTOM_W_XYs_free(xDataTOM_W_XYs *W_XYs)
int xDataTOM_axes_release(xDataTOM_axes *axes)
int xDataTOM_polynomial_free(xDataTOM_xDataInfo *xDI)
int xDataTOM_regionsW_XYs_LegendreSeries_release(xDataTOM_regionsW_XYs_LegendreSeries *regionsW_XYs_LegendreSeries)
const XML_Char * name
Definition: expat.h:151
xDataTOM_element * next
Definition: xDataTOM.h:182
char const * xDataTOM_subAxes_getLabel(statusMessageReporting *smr, xDataTOM_subAxes *subAxes, int index)
int xDataTOM_regionsXYs_free(xDataTOM_xDataInfo *xDI)
xDataTOM_interpolation interpolation
Definition: xDataTOM.h:77
xDataTOM_axes * axes
Definition: xDataTOM.h:76
int xDataTOM_XYs_release(xDataTOM_XYs *XYs)
Definition: xDataTOM_XYs.cc:31
xDataTOM_W_XYs * W_XYs
Definition: xDataTOM.h:103
void xDataTOM_releaseElement(xDataTOM_element *element)
Definition: xDataTOM.cc:148
int xDataTOM_initializeTOM(statusMessageReporting *smr, xDataTOM_TOM *doc)
Definition: xDataTOM.cc:68
int xDataTOME_addAttribute(statusMessageReporting *smr, xDataTOM_element *element, char const *name, char const *value)
Definition: xDataTOM.cc:279
int xDataTOM_W_XYs_freeFrom_xDataInfo(xDataTOM_xDataInfo *xDI)
xDataTOM_xDataInfo * xDataTOME_getXData(xDataTOM_element *TE)
Definition: xDataTOM.cc:504
xDataTOM_XYs * XYs
Definition: xDataTOM.h:97
char const * xDataTOM_axes_getUnit(statusMessageReporting *smr, xDataTOM_axes *axes, int index)
int xDataTOM_W_XYs_LegendreSeries_free(xDataTOM_xDataInfo *xDI)
int xDataTOM_polynomial_getData(xDataTOM_polynomial *polynomial, double **data)
xDataTOM_attribute * attributes
Definition: xDataTOM.h:165
int numberOfAxes
Definition: xDataTOM.h:69
xDataTOM_element * xDataTOME_getFirstElement(xDataTOM_element *element)
Definition: xDataTOM.cc:230
int xDataTOM_polynomial_getDataFromXDataInfo(xDataTOM_xDataInfo *xDI, double **data)
void xDataTOM_freeElement(xDataTOM_element **element)
Definition: xDataTOM.cc:139
xDataTOM_subAxes subAxes
Definition: xDataTOM.h:83
xDataTOM_subAxes subAxes
Definition: xDataTOM.h:96
xDataTOM_W_XYs_LegendreSeries * W_XYs_LegendreSeries
Definition: xDataTOM.h:122
xDataTOM_attribute * next
Definition: xDataTOM.h:158
xDataTOM_KalbachMannCoefficients * coefficients
Definition: xDataTOM.h:141
int xDataTOM_axis_initialize(statusMessageReporting *smr, xDataTOM_axis *axis, int index, char const *label, char const *unit, xDataTOM_interpolation *interpolation)
xDataTOM_LegendreSeries * LegendreSeries
Definition: xDataTOM.h:116
char * label
Definition: xDataTOM.h:63
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
int xDataTOM_polynomial_release(xDataTOM_polynomial *polynomial)
int xDataTOME_convertAttributeToInteger(statusMessageReporting *smr, xDataTOM_element *element, char const *name, int *n)
Definition: xDataTOM.cc:300
xDataTOM_XYs * XYs
Definition: xDataTOM.h:90
char * realFileName
Definition: xDataTOM.h:192
double * coefficients
Definition: xDataTOM.h:147
int xDataTOM_subAxes_release(xDataTOM_subAxes *subAxes)
enum xDataTOM_frame xDataTOM_axis_stringToFrame(statusMessageReporting *smr, char const *frame)
xDataTOM_W_XYs * xDataTOM_W_XYs_new(statusMessageReporting *smr, int index, int length, double value, xDataTOM_axes *axes, int axesOffset)
int xDataTOM_isXDataID(xDataTOM_element *TE, char const *ID)
Definition: xDataTOM.cc:491
xDataTOM_interpolation interpolation
Definition: xDataTOM.h:65
xDataTOM_subAxes subAxes
Definition: xDataTOM.h:140
int xDataTOM_Int
Definition: xDataTOM.h:16
int xDataTOMAL_copyAttributionList(statusMessageReporting *smr, xDataTOM_attributionList *desc, xDataTOM_attributionList *src)
Definition: xDataTOM.cc:415
xDataTOM_subAxes subAxes
Definition: xDataTOM.h:146
xDataTOM_attributionList attributes
Definition: xDataTOM.h:184
int xDataTOM_LegendreSeries_release(xDataTOM_LegendreSeries *LegendreSeries)
#define userData
Definition: xmlparse.cc:572
void xDataTOMAL_initial(statusMessageReporting *smr, xDataTOM_attributionList *attributes)
Definition: xDataTOM.cc:353
xDataTOM_axes * axes
Definition: xDataTOM.h:89
xDataTOM_element * xDataTOM_getLinksElement(statusMessageReporting *smr, xDataTOM_element *element, char const *link)
int xDataTOME_convertAttributeToDouble(statusMessageReporting *smr, xDataTOM_element *element, char const *name, double *d)
Definition: xDataTOM.cc:307
int xDataTOME_getInterpolation(statusMessageReporting *smr, xDataTOM_element *element, int index, enum xDataTOM_interpolationFlag *independent, enum xDataTOM_interpolationFlag *dependent, enum xDataTOM_interpolationQualifier *qualifier)
Definition: xDataTOM.cc:314
xDataTOM_KalbachMannType
Definition: xDataTOM.h:25
xDataTOM_interpolationFlag
Definition: xDataTOM.h:19
int xDataTOM_V_W_XYs_initialize(statusMessageReporting *smr, xDataTOM_V_W_XYs *V_W_XYs, int length, xDataTOM_axes *axes)
int xDataTOM_W_XYs_LegendreSeries_release(xDataTOM_W_XYs_LegendreSeries *W_XYs_LegendreSeries)
char const * xDataTOMAL_getAttributesValue(xDataTOM_attributionList *attributes, char const *name)
Definition: xDataTOM.cc:403
int xDataTOM_XYs_getDataFromXDataInfo(xDataTOM_xDataInfo *xDI, double **data)
Definition: xDataTOM_XYs.cc:50
const XML_Char const XML_Char * data
Definition: expat.h:268
int xDataTOM_W_XYs_release(xDataTOM_W_XYs *W_XYs)
int(* xDataTOM_sortElementFunc)(const void *, const void *)
Definition: xDataTOM.h:54
int xDataTOM_KalbachMann_free(xDataTOM_xDataInfo *xDI)
xDataTOM_element * xDataTOM_getDocumentsElement(xDataTOM_TOM *TOM)
Definition: xDataTOM.cc:223
xDataTOM_TOM * xDataTOM_importFile(statusMessageReporting *smr, const char *fileName)
Definition: xDataTOM.cc:44
int xDataTOM_setFileNameTOM(statusMessageReporting *smr, xDataTOM_TOM *doc, const char *fileName)
Definition: xDataTOM.cc:94
int xDataTOM_V_W_XYs_LegendreSeries_initialize(statusMessageReporting *smr, xDataTOM_V_W_XYs_LegendreSeries *V_W_XYs_LegendreSeries, int length, xDataTOM_axes *axes)
int xDataTOME_convertAttributeToDoubleWithUnit(statusMessageReporting *smr, xDataTOM_element *element, char const *name, double *d, char *unit)
xDataTOM_axis * axis
Definition: xDataTOM.h:70
int xDataTOM_subAxes_initialize(statusMessageReporting *smr, xDataTOM_subAxes *subAxes, enum xDataTOM_subAxesType type, int offset, xDataTOM_axes *axes, xDataTOM_interpolation *interpolation)
xDataTOM_element * xDataTOM_addElementInElement(statusMessageReporting *smr, xDataTOM_element *parent, int index, char const *name)
Definition: xDataTOM.cc:188
xDataTOM_element * element
Definition: xDataTOM.h:169
void xDataTOM_displayTree(statusMessageReporting *smr, xDataTOM_TOM *TOM, int printAttributes)
Definition: xDataTOM.cc:114
int xDataTOM_interpolation_set(statusMessageReporting *smr, xDataTOM_interpolation *interpolation, enum xDataTOM_interpolationFlag independent, enum xDataTOM_interpolationFlag dependent, enum xDataTOM_interpolationQualifier qualifier)
const XML_Char int const XML_Char * value
Definition: expat.h:331
xDataTOM_element * xDataTOME_getOneElementByName(statusMessageReporting *smr, xDataTOM_element *element, char const *name, int required)
Definition: xDataTOM.cc:246
int xDataTOM_regionsW_XYs_LegendreSeries_initialize(statusMessageReporting *smr, xDataTOM_regionsW_XYs_LegendreSeries *regionsW_XYs_LegendreSeries, int length, xDataTOM_axes *axes)
xDataTOM_axis * xDataTOM_axis_release(statusMessageReporting *smr, xDataTOM_axis *axis)
int xDataTOMAL_convertAttributeToDouble(statusMessageReporting *smr, xDataTOM_attributionList *attributes, char const *name, double *d)
Definition: xDataTOM.cc:450
void xDataTOMAL_release(xDataTOM_attributionList *attributes)
Definition: xDataTOM.cc:361
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
const char * sortString
Definition: xDataTOM.h:170
void * xData_initializeData(statusMessageReporting *smr, xDataTOM_element *TE, char const *ID, size_t size)
Definition: xDataTOM.cc:479
double * data
Definition: xDataTOM.h:84
int xDataTOM_W_XYs_initialize(statusMessageReporting *smr, xDataTOM_W_XYs *W_XYs, int index, int length, double value, xDataTOM_axes *axes, int axesOffset)
void * xDataTOME_getXDataIfID(statusMessageReporting *smr, xDataTOM_element *TE, char const *ID)
Definition: xDataTOM.cc:512
xDataTOM_subAxes subAxes
Definition: xDataTOM.h:115
char * fileName
Definition: xDataTOM.h:191
const G4int n
int xDataTOMAL_addAttribute(statusMessageReporting *smr, xDataTOM_attributionList *attributes, char const *name, char const *value)
Definition: xDataTOM.cc:376
int xDataTOM_KalbachMann_initialize(statusMessageReporting *smr, xDataTOM_KalbachMann *KalbachMann, int length, xDataTOM_axes *axes)
int xDataTOM_V_W_XYs_LegendreSeries_free(xDataTOM_xDataInfo *xDI)
double value
Definition: xDataTOM.h:95
double value
Definition: xDataTOM.h:82
char const * xDataTOM_axis_frameToString(statusMessageReporting *smr, enum xDataTOM_frame frame)
xDataTOM_subAxesType
Definition: xDataTOM.h:24
xDataTOM_W_XYs_LegendreSeries * W_XYs_LegendreSeries
Definition: xDataTOM.h:128
xDataTOM_interpolationQualifier
Definition: xDataTOM.h:21
Definition: inftrees.h:24
char * unit
Definition: xDataTOM.h:64
int xDataTOM_regionsW_XYs_LegendreSeries_free(xDataTOM_xDataInfo *xDI)
xDataTOM_axes axes
Definition: xDataTOM.h:153
xDataTOM_element * children
Definition: xDataTOM.h:186
int xDataTOM_numberOfElementsByName(statusMessageReporting *smr, xDataTOM_element *element, char const *name)
Definition: xDataTOM.cc:268
xDataTOM_element root
Definition: xDataTOM.h:193
int xDataTOM_setMessageError_ReturnInt(int value, statusMessageReporting *smr, void *userData, const char *file, int line, int code, const char *fmt,...)
xDataTOM_element * xDataTOM_mallocElement(statusMessageReporting *smr, xDataTOM_element *parent, int ordinal, int index, char const *name)
Definition: xDataTOM.cc:125
int xDataTOM_V_W_XYs_free(xDataTOM_xDataInfo *xDI)
void * xDataTOM_freeTOM(statusMessageReporting *smr, xDataTOM_TOM **TOM)
Definition: xDataTOM.cc:78
int xDataTOM_interpolation_setFromString(statusMessageReporting *smr, xDataTOM_interpolation *interpolation, char const *str)
xDataTOM_elementListItem * items
Definition: xDataTOM.h:175
xDataTOM_xDataInfo xDataInfo
Definition: xDataTOM.h:187
int xDataTOM_axes_initialize(statusMessageReporting *smr, xDataTOM_axes *axes, int numberOfAxes)
int xDataTOM_polynomial_initialize(statusMessageReporting *smr, xDataTOM_polynomial *polynomial, int length, xDataTOM_axes *axes)
xDataTOM_element * xDataTOME_getNextElement(xDataTOM_element *element)
Definition: xDataTOM.cc:238
xDataTOM_frame
Definition: xDataTOM.h:23
int xDataTOM_KalbachMann_release(xDataTOM_KalbachMann *KalbachMann)
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 xDataTOMAL_convertAttributeToInteger(statusMessageReporting *smr, xDataTOM_attributionList *attributes, char const *name, int *n)
Definition: xDataTOM.cc:433
int xDataTOM_XYs_getData(xDataTOM_XYs *XYs, double **data)
Definition: xDataTOM_XYs.cc:42
char const * xDataTOM_axes_getLabel(statusMessageReporting *smr, xDataTOM_axes *axes, int index)
int xDataTOM_interpolation_copy(statusMessageReporting *smr, xDataTOM_interpolation *desc, xDataTOM_interpolation *src)
int xDataTOM_XYs_free(xDataTOM_xDataInfo *xDI)
Definition: xDataTOM_XYs.cc:19
xDataTOM_subAxes subAxes
Definition: xDataTOM.h:102
int xDataTOME_copyAttributionList(statusMessageReporting *smr, xDataTOM_attributionList *desc, xDataTOM_element *element)
Definition: xDataTOM.cc:293
char * xDataTOMMisc_getAbsPath(statusMessageReporting *smr, const char *fileName)
xDataTOM_axis * xDataTOM_axis_new(statusMessageReporting *smr, int index, char const *label, char const *unit, xDataTOM_interpolation *interpolation)
char const * xDataTOM_getAttributesValueInElement(xDataTOM_element *element, char const *name)
Definition: xDataTOM.cc:286
char const * xDataTOM_subAxes_getUnit(statusMessageReporting *smr, xDataTOM_subAxes *subAxes, int index)
xDataTOM_element * element
Definition: xDataTOM.h:152
int xDataTOM_LegendreSeries_initialize(statusMessageReporting *smr, xDataTOM_LegendreSeries *LegendreSeries, int index, int length, double value)
xDataTOM_element * parent
Definition: xDataTOM.h:181