40 #if defined __cplusplus
140 if( ( target->
absPath =
xDataMisc_getAbsPath( smr, fileName ) ) == NULL )
return( _tpia_target_heated_releaseAndReturnOne( smr, doc, target ) );
141 if( ( doc =
xData_parseReadFile( smr, fileName, NULL, NULL ) ) == NULL )
return( _tpia_target_heated_releaseAndReturnOne( smr, doc, target ) );
146 if( strcmp( element->
name,
"xTargetHeated" ) != 0 ) {
156 if(
smr_isOk( smr ) ) _tpia_target_heated_getEnergyGridAndAllocateTotalCrossSections( smr, target, element );
160 return( _tpia_target_heated_releaseAndReturnOne( smr, doc, target ) );
165 return( _tpia_target_heated_releaseAndReturnOne( smr, doc, target ) );
167 if( !strcmp( channelElement->
name,
"channel" ) ) {
182 if( !
smr_isOk( smr ) )
return( _tpia_target_heated_releaseAndReturnOne( smr, doc, target ) ); }
189 if( !strcmp( channelElement->
name,
"channel" ) ) {
191 if( channel == NULL )
break;
201 if(
smr_isOk( smr ) && checkElememtsForAccess ) _tpia_target_heated_checkElememtsForAccess( smr, doc );
211 xData_Int i, energyGridIndex, energyGridStart, energyGridEnd, energyGridLength;
220 xData_getCommonData( smr, energyGrid, &energyGridIndex, &energyGridStart, &energyGridEnd, &energyGridLength );
267 if( ( index >= 0 ) && ( index < target->nChannels ) ) channel = target->
channels[
index];
277 if( channel == NULL ) {
278 smr_setMessageError( smr, NULL, __FILE__, __LINE__, 1,
"bad channel index = %d for %s + %s", index,
299 if( energyGrid != NULL ) *energyGrid = target->
energyGrid;
314 int crossSectionType ) {
330 int crossSectionType ) {
346 if( channel == NULL )
return( -1 );
365 _tpia_target_heated_checkElememtsForAccess2( smr, element );
377 _tpia_target_heated_checkElememtsForAccess2( smr, child );
381 #if defined __cplusplus
tpia_channel * tpia_target_heated_getChannelAtIndex_smr(statusMessageReporting *smr, tpia_target_heated *target, int index)
tpia_particle * projectileID
void * xData_parseFree(statusMessageReporting *smr, xData_document *xData_doc)
xData_element * xData_getFirstElement(xData_element *element)
#define tpia_misc_pointerToAttributeIfAllOk3(smr, path, required, attributes, name)
tpia_decayChannel decayChannel
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
xData_Int tpia_misc_binarySearch(xData_Int n, double *ds, double d)
xData_element * xData_getOneElementByTagName(statusMessageReporting *smr, xData_element *element, char *name, int required)
int xData_copyAttributionList(statusMessageReporting *smr, xData_attributionList *dest, xData_attributionList *src)
int smr_setMessageError(statusMessageReporting *smr, void *userInterface, const char *file, int line, int code, const char *fmt,...)
int tpia_target_heated_sampleIndexChannelProductsAtE(statusMessageReporting *smr, tpia_target_heated *target, int index, tpia_decaySamplingInfo *decaySamplingInfo, int nProductData, tpia_productOutgoingData *productData)
xData_Int tpia_target_heated_getEIndex(tpia_target_heated *target, double e_in)
xData_Int energyGridLength
#define xData_malloc2(smr, size, zero, forItem)
tpia_channel ** productionChannels
xData_document * xData_parseReadFile(statusMessageReporting *smr, const char *fileName, xData_xDataTypeOk func, void *userData)
int xData_numberOfElementsByTagName(statusMessageReporting *smr, xData_element *element, const char *tagName)
double tpia_channel_getCrossSectionAtE(statusMessageReporting *smr, tpia_channel *channel, xData_Int iEg, double e_in, int crossSectionType)
void * xData_free(statusMessageReporting *smr, void *p)
#define xDataMisc_allocateCopyString2(smr, s, forItem)
tpia_1dData totalCrossSectionPointwise
tpia_channel * tpia_target_heated_getChannelAtIndex(tpia_target_heated *target, int index)
xData_Int tpia_target_heated_getEnergyGrid(statusMessageReporting *smr, tpia_target_heated *target, double **energyGrid)
tpia_target_heated * tpia_target_heated_free(statusMessageReporting *smr, tpia_target_heated *target)
tpia_1dData crossSectionGrouped
int xData_releaseAttributionList(statusMessageReporting *smr, xData_attributionList *attributes)
tpia_1dData totalCrossSectionGrouped
int tpia_decayChannel_sampleProductsAtE(statusMessageReporting *smr, tpia_decayChannel *decayChannel, tpia_decaySamplingInfo *decaySamplingInfo, int nProductData, tpia_productOutgoingData *productData)
int tpia_misc_setMessageError_Element(statusMessageReporting *smr, void *userInterface, xData_element *element, const char *file, int line, int code, const char *fmt,...)
tpia_channel * tpia_channel_free(statusMessageReporting *smr, tpia_channel *channel)
double tpia_misc_getPointwiseCrossSectionAtE(statusMessageReporting *smr, tpia_1dData *crossSection, double *energyGrid, xData_Int index, double e_in)
tpia_particle * tpia_particle_getInternalID(statusMessageReporting *smr, const char *const name)
int tpia_target_heated_numberOfProductionChannels(statusMessageReporting *smr, tpia_target_heated *target)
int tpia_target_heated_release(statusMessageReporting *smr, tpia_target_heated *target)
#define tpia_crossSectionType_pointwise
tpia_channel * tpia_channel_createGetFromElement(statusMessageReporting *smr, tpia_target_heated *target, xData_element *channelElement, int pointwiseRequired)
int smr_isOk(statusMessageReporting *smr)
xData_attributionList attributes
tpia_1dData crossSectionPointwise
char * xData_getAttributesValue(xData_attributionList *attributes, const char *name)
tpia_target_heated * tpia_target_heated_create(statusMessageReporting *smr)
double tpia_target_heated_getTotalCrossSectionAtE(statusMessageReporting *smr, tpia_target_heated *target, xData_Int gE, double e_in, int crossSectionType)
tpia_target_heated * tpia_target_heated_createRead(statusMessageReporting *smr, const char *fileName, int checkElememtsForAccess)
#define tpia_crossSectionType_grouped
double tpia_target_heated_getIndexChannelCrossSectionAtE(statusMessageReporting *smr, tpia_target_heated *target, int index, xData_Int iEg, double e_in, int crossSectionType)
int tpia_target_heated_initialize(statusMessageReporting *smr, tpia_target_heated *target)
int xData_getCommonData(statusMessageReporting *smr, xData_element *element, xData_Int *index, xData_Int *start, xData_Int *end, xData_Int *length)
int xData_addToAccessed(statusMessageReporting *smr, xData_element *element, int increment)
xData_element * xData_getNextElement(xData_element *element)
xData_attributionList attributes
tpia_channel * tpia_target_heated_getProductionChannelAtIndex(tpia_target_heated *target, int index)
int tpia_target_heated_numberOfChannels(statusMessageReporting *smr, tpia_target_heated *target)
xData_element * xData_getElements_xDataElement(statusMessageReporting *smr, xData_element *element)
printf("%d Experimental points found\n", nlines)
char * xDataMisc_getAbsPath(statusMessageReporting *smr, const char *fileName)
xData_Int xData_convertAttributeTo_xData_Int(statusMessageReporting *smr, xData_element *element, const char *name, xData_Int *n)
double * xData_1d_x_allocateCopyData(statusMessageReporting *smr, xData_element *element)
int tpia_target_heated_read(statusMessageReporting *smr, tpia_target_heated *target, const char *fileName, int checkElememtsForAccess)
int xData_getAccessed(statusMessageReporting *smr, xData_element *element)
xData_element * xData_getDocumentsElement(xData_document *xData_doc)