40#if defined __cplusplus
83 const char *targetName ) {
87 if( ( targetPath =
tpia_map_findTarget( smr, map, evaluation, projectileName, targetName ) ) == NULL )
return( 1 );
94 const char *targetName ) {
100 if( targetPath == NULL )
return( NULL );
150 int i, iHeated, nHeated = 0, status = 1;
155 char const *contents;
159 if( ( target->
absPath =
xDataMisc_getAbsPath( smr, fileName ) ) == NULL )
return( _tpia_target_releaseAndReturnOne( smr, target ) );
160 if( ( doc =
xData_parseReadFile( smr, fileName, NULL, NULL ) ) == NULL )
return( _tpia_target_releaseAndReturnOne( smr, target ) );
162 if( strcmp( element->
name,
"xTarget" ) != 0 ) {
174 if( strcmp( child->name,
"target" ) != 0 ) {
193 if( i > 0 )
smr_setMessageError( smr, NULL, __FILE__, __LINE__, 1,
"target does not have a temperature attribute" );
197 for( iHeated = 0; iHeated < nHeated; iHeated++ )
if( target->
heatedTargets[iHeated].
temperature > temperature )
break;
232 if( i == nHeated ) i = 0;
309 smr_setMessageError( smr, NULL, __FILE__, __LINE__, 1,
"temperature index = %d not read in", index );
335 if( !
smr_isOk( smr ) )
return( -1 );
345 if( !
smr_isOk( smr ) )
return( NULL );
351 smr_setMessageError( smr, NULL, __FILE__, __LINE__, 1,
"Invalue crossSectionType = %d", crossSectionType );
358 int crossSectionType ) {
361 double xsec = 0., xsec1, xsec2;
381 int crossSectionType ) {
384 double xsec = 0., xsec1, xsec2;
408 nProductData, productData ) );
419#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_target_heated * heatedTarget
tpia_1dData totalCrossSectionPointwise
tpia_1dData totalCrossSectionGrouped
tpia_particle * projectileID
tpia_samplingMethods samplingMethods
tpia_target_heated_info ** readHeatedTargets
tpia_target_heated * baseHeatedTarget
xData_attributionList attributes
tpia_target_heated_info * heatedTargets
xData_attributionList attributes
char * tpia_map_findTarget(statusMessageReporting *smr, tpia_map *map, const char *evaluation, const char *projectile, const char *targetName)
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_pointerToAttributeIfAllOk2(smr, element, required, attributes, name)
tpia_target_heated * tpia_target_getHeatedTargetAtTIndex(statusMessageReporting *smr, tpia_target *target, int index)
int tpia_target_heated_numberOfChannels(statusMessageReporting *smr, tpia_target_heated *target)
int tpia_target_heated_numberOfProductionChannels(statusMessageReporting *smr, tpia_target_heated *target)
tpia_particle * tpia_particle_getInternalID(statusMessageReporting *smr, const char *const name)
tpia_target_heated * tpia_target_getHeatedTargetAtIndex_ReadIfNeeded(statusMessageReporting *smr, tpia_target *target, int index)
double tpia_target_heated_getTotalCrossSectionAtE(statusMessageReporting *smr, tpia_target_heated *target, xData_Int gE, double e_in, int crossSectionType)
int tpia_target_sampleIndexChannelProductsAtE(statusMessageReporting *smr, tpia_target *target, int index, double T, tpia_decaySamplingInfo *decaySamplingInfo, int nProductData, tpia_productOutgoingData *productData)
int tpia_target_getTemperatures(statusMessageReporting *smr, tpia_target *target, double *temperatures)
tpia_target * tpia_target_createRead(statusMessageReporting *smr, const char *fileName)
#define tpia_crossSectionType_grouped
int tpia_target_read(statusMessageReporting *smr, tpia_target *target, const char *fileName)
int tpia_target_numberOfProductionChannels(statusMessageReporting *smr, tpia_target *target)
double tpia_target_getIndexChannelCrossSectionAtE(statusMessageReporting *smr, tpia_target *target, int index, double T, xData_Int iEg, double e_in, int crossSectionType)
int tpia_target_readFromMap(statusMessageReporting *smr, tpia_target *target, tpia_map *map, const char *evaluation, const char *projectileName, const char *targetName)
int tpia_target_initialize(statusMessageReporting *smr, tpia_target *target)
int tpia_target_numberOfChannels(statusMessageReporting *smr, tpia_target *target)
int tpia_target_release(statusMessageReporting *smr, tpia_target *target)
tpia_target * tpia_target_free(statusMessageReporting *smr, tpia_target *target)
tpia_target_heated * tpia_target_heated_createRead(statusMessageReporting *smr, const char *fileName, int checkElememtsForAccess)
int tpia_samplingMethods_initialize(statusMessageReporting *smr, tpia_samplingMethods *samplingMethods)
int tpia_target_readHeatedTarget(statusMessageReporting *smr, tpia_target *target, int index, int checkElememtsForAccess)
xData_Int tpia_target_getEnergyGridAtTIndex(statusMessageReporting *smr, tpia_target *target, int index, double **energyGrid)
double tpia_target_heated_getIndexChannelCrossSectionAtE(statusMessageReporting *smr, tpia_target_heated *target, int index, xData_Int iEg, double e_in, int crossSectionType)
tpia_target_heated * tpia_target_heated_free(statusMessageReporting *smr, tpia_target_heated *target)
char * tpia_target_getAttributesValue(statusMessageReporting *smr, tpia_target *target, char const *name)
tpia_target * tpia_target_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)
double tpia_target_getTotalCrossSectionAtTAndE(statusMessageReporting *smr, tpia_target *target, double T, xData_Int iEg, double e_in, int crossSectionType)
tpia_1dData * tpia_target_getTotalCrossSectionAtTIndex(statusMessageReporting *smr, tpia_target *target, int index, int crossSectionType)
tpia_target * tpia_target_createReadFromMap(statusMessageReporting *smr, tpia_map *map, const char *evaluation, const char *projectileName, const char *targetName)
int xData_convertAttributeToDouble(statusMessageReporting *smr, xData_element *element, const char *name, double *d)
void * xData_free(statusMessageReporting *smr, void *p)
char * xDataMisc_getAbsPath(statusMessageReporting *smr, const char *fileName)
#define xDataMisc_allocateCopyString2(smr, s, forItem)
int xData_copyAttributionList(statusMessageReporting *smr, xData_attributionList *dest, xData_attributionList *src)
const char * xData_getAttributesValueInElement(xData_element *element, const char *name)
int xData_releaseAttributionList(statusMessageReporting *smr, xData_attributionList *attributes)
void * xData_parseFree(statusMessageReporting *smr, xData_document *xData_doc)
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)
char * xData_getAttributesValue(xData_attributionList *attributes, const char *name)
#define xData_malloc2(smr, size, zero, forItem)