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,
290 if( ( index >= 0 ) && ( index < target->nProductionChannels ) ) channel = target->
productionChannels[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
int smr_setMessageError(statusMessageReporting *smr, void *userInterface, const char *file, int line, int code, const char *fmt,...)
int smr_isOk(statusMessageReporting *smr)
tpia_decayChannel decayChannel
tpia_1dData crossSectionPointwise
tpia_1dData crossSectionGrouped
xData_attributionList attributes
tpia_1dData totalCrossSectionPointwise
tpia_particle * projectileID
tpia_1dData totalCrossSectionGrouped
tpia_channel ** productionChannels
xData_Int energyGridLength
xData_attributionList attributes
int tpia_misc_setMessageError_Element(statusMessageReporting *smr, void *userInterface, xData_element *element, const char *file, int line, int code, const char *fmt,...)
#define tpia_misc_pointerToAttributeIfAllOk3(smr, path, required, attributes, name)
xData_Int tpia_misc_binarySearch(xData_Int n, double *ds, double d)
int tpia_target_heated_numberOfChannels(statusMessageReporting *smr, tpia_target_heated *target)
int tpia_target_heated_read(statusMessageReporting *smr, tpia_target_heated *target, const char *fileName, int checkElememtsForAccess)
int tpia_target_heated_numberOfProductionChannels(statusMessageReporting *smr, tpia_target_heated *target)
tpia_particle * tpia_particle_getInternalID(statusMessageReporting *smr, const char *const name)
double tpia_target_heated_getTotalCrossSectionAtE(statusMessageReporting *smr, tpia_target_heated *target, xData_Int gE, double e_in, int crossSectionType)
double tpia_misc_getPointwiseCrossSectionAtE(statusMessageReporting *smr, tpia_1dData *crossSection, double *energyGrid, xData_Int index, double e_in)
tpia_channel * tpia_channel_free(statusMessageReporting *smr, tpia_channel *channel)
#define tpia_crossSectionType_grouped
int tpia_target_heated_release(statusMessageReporting *smr, tpia_target_heated *target)
tpia_channel * tpia_target_heated_getChannelAtIndex_smr(statusMessageReporting *smr, tpia_target_heated *target, int index)
tpia_channel * tpia_channel_createGetFromElement(statusMessageReporting *smr, tpia_target_heated *target, xData_element *channelElement, int pointwiseRequired)
tpia_target_heated * tpia_target_heated_createRead(statusMessageReporting *smr, const char *fileName, int checkElememtsForAccess)
double tpia_channel_getCrossSectionAtE(statusMessageReporting *smr, tpia_channel *channel, xData_Int iEg, double e_in, int crossSectionType)
xData_Int tpia_target_heated_getEIndex(tpia_target_heated *target, double e_in)
double tpia_target_heated_getIndexChannelCrossSectionAtE(statusMessageReporting *smr, tpia_target_heated *target, int index, xData_Int iEg, double e_in, int crossSectionType)
int tpia_decayChannel_sampleProductsAtE(statusMessageReporting *smr, tpia_decayChannel *decayChannel, tpia_decaySamplingInfo *decaySamplingInfo, int nProductData, tpia_productOutgoingData *productData)
tpia_channel * tpia_target_heated_getChannelAtIndex(tpia_target_heated *target, int index)
tpia_target_heated * tpia_target_heated_free(statusMessageReporting *smr, tpia_target_heated *target)
tpia_channel * tpia_target_heated_getProductionChannelAtIndex(tpia_target_heated *target, int index)
tpia_target_heated * tpia_target_heated_create(statusMessageReporting *smr)
#define tpia_crossSectionType_pointwise
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_getEnergyGrid(statusMessageReporting *smr, tpia_target_heated *target, double **energyGrid)
int tpia_target_heated_initialize(statusMessageReporting *smr, tpia_target_heated *target)
void * xData_free(statusMessageReporting *smr, void *p)
int xData_getAccessed(statusMessageReporting *smr, xData_element *element)
char * xDataMisc_getAbsPath(statusMessageReporting *smr, const char *fileName)
int xData_numberOfElementsByTagName(statusMessageReporting *smr, xData_element *element, const char *tagName)
#define xDataMisc_allocateCopyString2(smr, s, forItem)
int xData_copyAttributionList(statusMessageReporting *smr, xData_attributionList *dest, xData_attributionList *src)
int xData_releaseAttributionList(statusMessageReporting *smr, xData_attributionList *attributes)
xData_element * xData_getOneElementByTagName(statusMessageReporting *smr, xData_element *element, char *name, int required)
int xData_addToAccessed(statusMessageReporting *smr, xData_element *element, int increment)
void * xData_parseFree(statusMessageReporting *smr, xData_document *xData_doc)
xData_Int xData_convertAttributeTo_xData_Int(statusMessageReporting *smr, xData_element *element, const char *name, xData_Int *n)
xData_element * xData_getNextElement(xData_element *element)
xData_element * xData_getDocumentsElement(xData_document *xData_doc)
xData_element * xData_getFirstElement(xData_element *element)
xData_document * xData_parseReadFile(statusMessageReporting *smr, const char *fileName, xData_xDataTypeOk func, void *userData)
int xData_getCommonData(statusMessageReporting *smr, xData_element *element, xData_Int *index, xData_Int *start, xData_Int *end, xData_Int *length)
char * xData_getAttributesValue(xData_attributionList *attributes, const char *name)
#define xData_malloc2(smr, size, zero, forItem)
xData_element * xData_getElements_xDataElement(statusMessageReporting *smr, xData_element *element)
double * xData_1d_x_allocateCopyData(statusMessageReporting *smr, xData_element *element)