Geant4
10.00.p01
|
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include "xData.h"
Go to the source code of this file.
Functions | |
static void * | xData_parseFreeElement (statusMessageReporting *smr, xData_element *element) |
static void | xData_parseFreeElementItems (statusMessageReporting *smr, xData_element *element) |
static void XMLCALL | xData_parseStartElement (void *userData, const char *name, const char **attris) |
static void XMLCALL | xData_parseEndElement (void *userData, const char *name) |
static void XMLCALL | xData_parseCharacterData (void *userData, const XML_Char *s, int len) |
static void | xData_parseInitializeRootElement (xData_document *doc, xData_rootElement *re, xData_element *parentElement, int depth) |
static int | xData_parseInitializeText (xData_document *doc, xData_text *text) |
static int | xData_parseAddElementToRoot (statusMessageReporting *smr, xData_rootElement *parentRoot, const char *name, const char **attris) |
static enum xData_errorCodes | xData_parseGetCurrentPosition (xData_document *doc, xData_docInfo *docInfo) |
static int | xData_init_xDataTypeNone (xDataType *xDT, xData_element *element) |
static char * | xData_getTraceback (statusMessageReporting *smr, xData_element *element) |
static char * | xData_getTraceback2 (statusMessageReporting *smr, xData_rootElement *parentRoot, int n) |
static int | xData_elementList_defaultSorter (void const *p1, void const *p2) |
static int | xData_elementList_indexSorter (void const *p1, void const *p2) |
static int | xData_smrUserInterfaceInitialize (xData_document *doc) |
static int | xData_smrUserInterfaceFree (xData_document *doc) |
static int | xData_smrUserInterface (void *userData, char **smr) |
static char const * | xData_shortStringForMessage (size_t size, char *Out, char const *In) |
xData_document * | xData_parseReadFile (statusMessageReporting *smr, const char *fileName, xData_xDataTypeOk func, void *userData) |
xData_document * | xData_parseString (statusMessageReporting *smr, const char *str, xData_xDataTypeOk func, void *userData) |
xData_document * | xData_parseMalloc (statusMessageReporting *smr, xData_xDataTypeOk func, void *userData) |
int | xData_parseInitialize (statusMessageReporting *smr, xData_document *doc, xData_xDataTypeOk func, void *userData) |
int | xData_parseEndOfXML (statusMessageReporting *smr, xData_document *doc) |
void * | xData_parseFree (statusMessageReporting *smr, xData_document *doc) |
int | xData_parse (xData_document *doc, const char *s) |
int | xData_parseIsError (xData_document *doc) |
xData_element * | xData_getDocumentsElement (xData_document *doc) |
xData_element * | xData_getFirstElement (xData_element *element) |
xData_element * | xData_getNextElement (xData_element *element) |
enum xData_itemMode | xData_getFirstItem (xData_element *element, xData_item *item) |
enum xData_itemMode | xData_getNextItem (xData_item *item) |
char * | xData_getAttributesValue (xData_attributionList *attributes, const char *name) |
const char * | xData_getAttributesValueInElement (xData_element *element, const char *name) |
int | xData_initializeAttributionList (statusMessageReporting *, xData_attributionList *attributes) |
int | xData_copyAttributionList (statusMessageReporting *smr, xData_attributionList *dest, xData_attributionList *src) |
int | xData_attributeListLength (xData_attributionList *attributes) |
xData_attribute * | xData_attributeByIndex (xData_attributionList *attributes, int index) |
int | xData_releaseAttributionList (statusMessageReporting *smr, xData_attributionList *attributes) |
xData_element * | xData_getElements_xDataElement (statusMessageReporting *smr, xData_element *element) |
int | xData_getCommonData (statusMessageReporting *smr, xData_element *element, xData_Int *index, xData_Int *start, xData_Int *end, xData_Int *length) |
int | xData_xDataTypeConvertAttributes (statusMessageReporting *smr, xData_element *element) |
xData_Int | xData_convertAttributeTo_xData_Int (statusMessageReporting *smr, xData_element *element, const char *name, xData_Int *n) |
int | xData_convertAttributeToDouble (statusMessageReporting *smr, xData_element *element, const char *name, double *d) |
int | xData_numberOfElementsByTagName (statusMessageReporting *, xData_element *element, const char *tagName) |
xData_elementList * | xData_getElementsByTagName (statusMessageReporting *smr, xData_element *element, const char *tagName) |
xData_elementList * | xData_getElementsByTagNameAndSort (statusMessageReporting *smr, xData_element *element, const char *tagName, const char *sortAttributeName, xData_sortElementFunc sortFunction) |
xData_element * | xData_getOneElementByTagName (statusMessageReporting *smr, xData_element *element, char *name, int required) |
void | xData_freeElementList (statusMessageReporting *smr, xData_elementList *list) |
int | xData_is_xDataType (statusMessageReporting *smr, xDataType *xDT, char const *const type, int setMsg) |
char const * | xData_getFileName (xData_document *doc) |
int | xData_setFileName (statusMessageReporting *smr, xData_document *doc, char const *fileName) |
xData_document * | xData_getElementsDocument (xData_element *element) |
void * | xData_get_smrUserInterfaceFromDocument (xData_document *doc) |
void * | xData_get_smrUserInterfaceFromElement (xData_element *element) |
int | xData_stringTo_xData_Int (statusMessageReporting *smr, void *smrUserInterface, char const *c, xData_Int *value, char const *endings, char **e) |
int | xData_stringTo_double (statusMessageReporting *smr, void *smrUserInterface, char const *c, double *value, char const *endings, char **e) |
int | xData_addToAccessed (statusMessageReporting *, xData_element *element, int increment) |
int | xData_getAccessed (statusMessageReporting *, xData_element *element) |
int xData_addToAccessed | ( | statusMessageReporting * | , |
xData_element * | element, | ||
int | increment | ||
) |
Definition at line 1078 of file xData.cc.
Referenced by _tpia_product_getDepositionEnergy(), _tpia_product_getProductOutgoingData(), _tpia_target_heated_getEnergyGridAndAllocateTotalCrossSections(), tpia_angularEnergy_getFromElement(), tpia_channel_getFromElement(), tpia_Legendre_getFromElement(), tpia_misc_get2d_xShared_yHistogram_data(), tpia_misc_get2dx_y_data(), tpia_misc_get2dxindex_y_data(), tpia_misc_getEqualProbableBin(), tpia_misc_getEqualProbableBins(), tpia_multiplicity_getFromElement(), tpia_product_getFromElement(), and tpia_target_heated_read().
xData_attribute* xData_attributeByIndex | ( | xData_attributionList * | attributes, |
int | index | ||
) |
int xData_attributeListLength | ( | xData_attributionList * | attributes | ) |
xData_Int xData_convertAttributeTo_xData_Int | ( | statusMessageReporting * | smr, |
xData_element * | element, | ||
const char * | name, | ||
xData_Int * | n | ||
) |
Definition at line 710 of file xData.cc.
References smr_setMessageError(), xData_get_smrUserInterfaceFromElement(), and xData_getAttributesValueInElement().
Referenced by _tpia_Legendre_getOrder(), tpia_angularEnergy_getFromElement(), tpia_channel_getFromElement(), tpia_misc_getEqualProbableBin(), tpia_misc_getEqualProbableBins(), tpia_target_heated_read(), and xData_xDataTypeConvertAttributes().
int xData_convertAttributeToDouble | ( | statusMessageReporting * | smr, |
xData_element * | element, | ||
const char * | name, | ||
double * | d | ||
) |
Definition at line 730 of file xData.cc.
References smr_setMessageError(), xData_get_smrUserInterfaceFromElement(), and xData_getAttributesValueInElement().
Referenced by tpia_angularEnergy_getFromElement(), tpia_misc_getEqualProbableBins(), and tpia_target_read().
int xData_copyAttributionList | ( | statusMessageReporting * | smr, |
xData_attributionList * | dest, | ||
xData_attributionList * | src | ||
) |
Definition at line 564 of file xData.cc.
References s.
Referenced by tpia_channel_getFromElement(), tpia_product_getFromElement(), tpia_target_heated_read(), and tpia_target_read().
|
static |
Definition at line 880 of file xData.cc.
Referenced by xData_getElementsByTagNameAndSort().
|
static |
Definition at line 891 of file xData.cc.
Referenced by xData_getElementsByTagNameAndSort().
void xData_freeElementList | ( | statusMessageReporting * | smr, |
xData_elementList * | list | ||
) |
Definition at line 832 of file xData.cc.
References xData_free().
Referenced by tpia_angularEnergy_getFromElement(), tpia_Legendre_getFromElement(), tpia_misc_getEqualProbableBins(), tpia_product_getDecayChannelFromElement(), and xData_getOneElementByTagName().
void* xData_get_smrUserInterfaceFromDocument | ( | xData_document * | doc | ) |
Definition at line 944 of file xData.cc.
Referenced by xData_get_smrUserInterfaceFromElement(), and xData_parseEndOfXML().
void* xData_get_smrUserInterfaceFromElement | ( | xData_element * | element | ) |
Definition at line 952 of file xData.cc.
References xData_get_smrUserInterfaceFromDocument(), and xData_getElementsDocument().
Referenced by getRowStartEndAtIndex(), toData(), xData_1d_x_copyData(), xData_convertAttributeTo_xData_Int(), xData_convertAttributeToDouble(), xData_getCommonData(), xData_getOneElementByTagName(), xData_is_xDataType(), xData_parseAddElementToRoot(), xData_parseEndElement(), and xData_xDataTypeConvertAttributes().
int xData_getAccessed | ( | statusMessageReporting * | , |
xData_element * | element | ||
) |
Definition at line 1087 of file xData.cc.
Referenced by _tpia_target_heated_checkElememtsForAccess2().
char* xData_getAttributesValue | ( | xData_attributionList * | attributes, |
const char * | name | ||
) |
Definition at line 530 of file xData.cc.
Referenced by toData(), tpia_misc_pointerToAttributeIfAllOk(), tpia_multiplicity_getTimeScaleFromElement(), tpia_target_getAttributesValue(), tpia_target_heated_read(), and xData_getAttributesValueInElement().
const char* xData_getAttributesValueInElement | ( | xData_element * | element, |
const char * | name | ||
) |
Definition at line 546 of file xData.cc.
References xData_getAttributesValue().
Referenced by tpia_frame_setFromElement(), tpia_map_readFile(), tpia_target_read(), xData_convertAttributeTo_xData_Int(), xData_convertAttributeToDouble(), xData_getElementsByTagNameAndSort(), and xData_parseEndElement().
int xData_getCommonData | ( | statusMessageReporting * | smr, |
xData_element * | element, | ||
xData_Int * | index, | ||
xData_Int * | start, | ||
xData_Int * | end, | ||
xData_Int * | length | ||
) |
Definition at line 652 of file xData.cc.
References smr_setMessageError(), and xData_get_smrUserInterfaceFromElement().
Referenced by _tpia_target_heated_getEnergyGridAndAllocateTotalCrossSections().
xData_element* xData_getDocumentsElement | ( | xData_document * | doc | ) |
Definition at line 476 of file xData.cc.
Referenced by _tpia_target_heated_checkElememtsForAccess(), tpia_map_readFile(), tpia_target_heated_read(), and tpia_target_read().
xData_element* xData_getElements_xDataElement | ( | statusMessageReporting * | smr, |
xData_element * | element | ||
) |
Definition at line 622 of file xData.cc.
References xData_getOneElementByTagName().
Referenced by _tpia_target_heated_getEnergyGridAndAllocateTotalCrossSections(), and tpia_misc_getEqualProbableBins().
xData_elementList* xData_getElementsByTagName | ( | statusMessageReporting * | smr, |
xData_element * | element, | ||
const char * | tagName | ||
) |
Definition at line 761 of file xData.cc.
References n, xData_getFirstElement(), xData_getNextElement(), and xData_numberOfElementsByTagName().
Referenced by tpia_product_getDecayChannelFromElement(), xData_getElementsByTagNameAndSort(), and xData_getOneElementByTagName().
xData_elementList* xData_getElementsByTagNameAndSort | ( | statusMessageReporting * | smr, |
xData_element * | element, | ||
const char * | tagName, | ||
const char * | sortAttributeName, | ||
xData_sortElementFunc | sortFunction | ||
) |
Definition at line 788 of file xData.cc.
References n, xData_elementList_defaultSorter(), xData_elementList_indexSorter(), xData_getAttributesValueInElement(), and xData_getElementsByTagName().
Referenced by tpia_angularEnergy_getFromElement(), tpia_Legendre_getFromElement(), and tpia_misc_getEqualProbableBins().
xData_document* xData_getElementsDocument | ( | xData_element * | element | ) |
Definition at line 934 of file xData.cc.
Referenced by xData_get_smrUserInterfaceFromElement().
xData_element* xData_getFirstElement | ( | xData_element * | element | ) |
Definition at line 477 of file xData.cc.
Referenced by _tpia_product_getDepositionEnergy(), _tpia_product_getProductOutgoingData(), _tpia_target_heated_checkElememtsForAccess2(), tpia_map_readFile(), tpia_multiplicity_getFromElement(), tpia_target_heated_read(), tpia_target_read(), xData_getElementsByTagName(), xData_getFirstItem(), and xData_numberOfElementsByTagName().
enum xData_itemMode xData_getFirstItem | ( | xData_element * | element, |
xData_item * | item | ||
) |
Definition at line 482 of file xData.cc.
References xData_getFirstElement().
xData_element* xData_getNextElement | ( | xData_element * | element | ) |
Definition at line 478 of file xData.cc.
Referenced by _tpia_product_getDepositionEnergy(), _tpia_product_getProductOutgoingData(), _tpia_target_heated_checkElememtsForAccess2(), tpia_map_readFile(), tpia_multiplicity_getFromElement(), tpia_target_heated_read(), tpia_target_read(), xData_getElementsByTagName(), and xData_numberOfElementsByTagName().
xData_element* xData_getOneElementByTagName | ( | statusMessageReporting * | smr, |
xData_element * | element, | ||
char * | name, | ||
int | required | ||
) |
Definition at line 810 of file xData.cc.
References smr_setMessageError(), xData_freeElementList(), xData_get_smrUserInterfaceFromElement(), and xData_getElementsByTagName().
Referenced by _tpia_target_heated_getEnergyGridAndAllocateTotalCrossSections(), tpia_angularEnergy_getFromElement(), tpia_channel_getFromElement(), tpia_misc_get2d_xShared_yHistogram_data(), tpia_misc_get2dx_y_data(), tpia_misc_get2dxindex_y_data(), tpia_misc_getEqualProbableBin(), tpia_target_heated_read(), and xData_getElements_xDataElement().
|
static |
Definition at line 839 of file xData.cc.
References name, s, and xData_getTraceback2().
Referenced by xData_parseAddElementToRoot().
|
static |
Definition at line 857 of file xData.cc.
Referenced by xData_getTraceback().
|
static |
Definition at line 630 of file xData.cc.
Referenced by xData_parseAddElementToRoot().
int xData_initializeAttributionList | ( | statusMessageReporting * | , |
xData_attributionList * | attributes | ||
) |
int xData_is_xDataType | ( | statusMessageReporting * | smr, |
xDataType * | xDT, | ||
char const *const | type, | ||
int | setMsg | ||
) |
Definition at line 900 of file xData.cc.
References smr_setMessageError(), and xData_get_smrUserInterfaceFromElement().
Referenced by xData_is_1d_x(), xData_is_2d_xindex_y(), xData_is_2d_xShared_yHistogram(), xData_is_2d_xy(), and xData_is_matrix().
int xData_numberOfElementsByTagName | ( | statusMessageReporting * | , |
xData_element * | element, | ||
const char * | tagName | ||
) |
Definition at line 750 of file xData.cc.
References n, xData_getFirstElement(), and xData_getNextElement().
Referenced by tpia_target_heated_read(), and xData_getElementsByTagName().
int xData_parse | ( | xData_document * | doc, |
const char * | s | ||
) |
Definition at line 251 of file xData.cc.
References XML_Parse().
Referenced by xData_parseReadFile(), and xData_parseString().
|
static |
Definition at line 366 of file xData.cc.
References a, n, smr_setMessageError(), xData_free(), xData_get_smrUserInterfaceFromElement(), xData_getTraceback(), xData_init_xDataTypeNone(), xData_parseGetCurrentPosition(), xData_parseInitializeRootElement(), and xData_parseInitializeText().
Referenced by xData_parseStartElement().
|
static |
Definition at line 307 of file xData.cc.
References smr_isOk().
Referenced by xData_parseInitialize().
|
static |
Definition at line 270 of file xData.cc.
References smr_isOk(), smr_setMessageError(), xData_get_smrUserInterfaceFromElement(), xData_getAttributesValueInElement(), xData_init_1d_x(), xData_init_2d_xindex_y(), xData_init_2d_xShared_yHistogram(), xData_init_2d_xy(), and xData_init_matrix().
Referenced by xData_parseInitialize().
int xData_parseEndOfXML | ( | statusMessageReporting * | smr, |
xData_document * | doc | ||
) |
Definition at line 187 of file xData.cc.
References smr_isOk(), smr_setMessageError(), xData_get_smrUserInterfaceFromDocument(), XML_ErrorString(), XML_GetCurrentColumnNumber(), XML_GetCurrentLineNumber(), XML_GetErrorCode(), XML_Parse(), and XML_ParserFree().
Referenced by xData_parseFree(), xData_parseReadFile(), and xData_parseString().
void* xData_parseFree | ( | statusMessageReporting * | smr, |
xData_document * | doc | ||
) |
Definition at line 208 of file xData.cc.
References xData_free(), xData_parseEndOfXML(), xData_parseFreeElement(), and xData_smrUserInterfaceFree().
Referenced by _tpia_target_heated_releaseAndReturnOne(), tpia_map_readFile(), tpia_target_heated_read(), tpia_target_read(), xData_parseMalloc(), xData_parseReadFile(), and xData_parseString().
|
static |
Definition at line 222 of file xData.cc.
References xData_free(), and xData_parseFreeElementItems().
Referenced by xData_parseFree(), and xData_parseFreeElementItems().
|
static |
Definition at line 237 of file xData.cc.
References xData_free(), and xData_parseFreeElement().
Referenced by xData_parseFreeElement().
|
static |
Definition at line 460 of file xData.cc.
References XML_GetCurrentColumnNumber(), and XML_GetCurrentLineNumber().
Referenced by xData_parseAddElementToRoot(), and xData_parseInitializeText().
int xData_parseInitialize | ( | statusMessageReporting * | smr, |
xData_document * | doc, | ||
xData_xDataTypeOk | func, | ||
void * | userData | ||
) |
Definition at line 157 of file xData.cc.
References smr_isOk(), smr_setMessageError(), userData, xData_parseCharacterData(), xData_parseEndElement(), xData_parseInitializeRootElement(), xData_parseStartElement(), xData_smrUserInterfaceInitialize(), XML_ParserCreate(), XML_SetCharacterDataHandler(), XML_SetElementHandler(), and XML_SetUserData().
Referenced by xData_parseMalloc().
|
static |
Definition at line 340 of file xData.cc.
Referenced by xData_parseAddElementToRoot(), and xData_parseInitialize().
|
static |
Definition at line 355 of file xData.cc.
References xData_parseGetCurrentPosition().
Referenced by xData_parseAddElementToRoot().
xData_document* xData_parseMalloc | ( | statusMessageReporting * | smr, |
xData_xDataTypeOk | func, | ||
void * | userData | ||
) |
Definition at line 141 of file xData.cc.
References xData_parseFree(), and xData_parseInitialize().
Referenced by xData_parseReadFile(), and xData_parseString().
xData_document* xData_parseReadFile | ( | statusMessageReporting * | smr, |
const char * | fileName, | ||
xData_xDataTypeOk | func, | ||
void * | userData | ||
) |
Definition at line 84 of file xData.cc.
References buffer, n, s, smr_isOk(), smr_setMessageError(), xData_parse(), xData_parseEndOfXML(), xData_parseFree(), xData_parseMalloc(), and xData_setFileName().
Referenced by tpia_map_readFile(), tpia_target_heated_read(), and tpia_target_read().
|
static |
Definition at line 260 of file xData.cc.
References smr_isOk(), and xData_parseAddElementToRoot().
Referenced by xData_parseInitialize().
xData_document* xData_parseString | ( | statusMessageReporting * | smr, |
const char * | str, | ||
xData_xDataTypeOk | func, | ||
void * | userData | ||
) |
Definition at line 123 of file xData.cc.
References smr_isOk(), xData_parse(), xData_parseEndOfXML(), xData_parseFree(), and xData_parseMalloc().
int xData_releaseAttributionList | ( | statusMessageReporting * | smr, |
xData_attributionList * | attributes | ||
) |
Definition at line 611 of file xData.cc.
References xData_free().
Referenced by tpia_channel_release(), tpia_product_release(), tpia_target_heated_release(), and tpia_target_release().
int xData_setFileName | ( | statusMessageReporting * | smr, |
xData_document * | doc, | ||
char const * | fileName | ||
) |
Definition at line 921 of file xData.cc.
References xData_free().
Referenced by xData_parseReadFile().
|
static |
Definition at line 1094 of file xData.cc.
Referenced by xData_stringTo_double(), and xData_stringTo_xData_Int().
|
static |
Definition at line 977 of file xData.cc.
References malloc().
Referenced by xData_smrUserInterfaceInitialize().
|
static |
Definition at line 968 of file xData.cc.
Referenced by xData_parseFree().
|
static |
Definition at line 959 of file xData.cc.
References xData_smrUserInterface().
Referenced by xData_parseInitialize().
int xData_stringTo_double | ( | statusMessageReporting * | smr, |
void * | smrUserInterface, | ||
char const * | c, | ||
double * | value, | ||
char const * | endings, | ||
char ** | e | ||
) |
Definition at line 1044 of file xData.cc.
References n, s, smr_setMessageError(), and xData_shortStringForMessage().
Referenced by toData().
int xData_stringTo_xData_Int | ( | statusMessageReporting * | smr, |
void * | smrUserInterface, | ||
char const * | c, | ||
xData_Int * | value, | ||
char const * | endings, | ||
char ** | e | ||
) |
Definition at line 1010 of file xData.cc.
References n, s, smr_setMessageError(), and xData_shortStringForMessage().
Referenced by toData().
int xData_xDataTypeConvertAttributes | ( | statusMessageReporting * | smr, |
xData_element * | element | ||
) |
Definition at line 668 of file xData.cc.
References smr_setMessageError(), xData_convertAttributeTo_xData_Int(), and xData_get_smrUserInterfaceFromElement().
Referenced by xData_init_1d_x(), xData_init_2d_xindex_y(), xData_init_2d_xShared_yHistogram(), xData_init_2d_xy(), and xData_init_matrix().