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
double tpia_target_getTotalCrossSectionAtTAndE(statusMessageReporting *smr, tpia_target *target, double T, xData_Int iEg, double e_in, int crossSectionType)
tpia_target_heated_info ** readHeatedTargets
void * xData_parseFree(statusMessageReporting *smr, xData_document *xData_doc)
xData_element * xData_getFirstElement(xData_element *element)
tpia_target * tpia_target_free(statusMessageReporting *smr, tpia_target *target)
tpia_target_heated * tpia_target_getHeatedTargetAtIndex_ReadIfNeeded(statusMessageReporting *smr, tpia_target *target, int index)
int tpia_target_release(statusMessageReporting *smr, tpia_target *target)
tpia_target_heated_info * heatedTargets
xData_attributionList attributes
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)
int tpia_target_numberOfProductionChannels(statusMessageReporting *smr, tpia_target *target)
#define xData_malloc2(smr, size, zero, forItem)
xData_Int tpia_target_getEnergyGridAtTIndex(statusMessageReporting *smr, tpia_target *target, int index, double **energyGrid)
xData_document * xData_parseReadFile(statusMessageReporting *smr, const char *fileName, xData_xDataTypeOk func, void *userData)
tpia_target * tpia_target_createRead(statusMessageReporting *smr, const char *fileName)
char * tpia_target_getAttributesValue(statusMessageReporting *smr, tpia_target *target, char const *name)
tpia_target_heated * heatedTarget
void * xData_free(statusMessageReporting *smr, void *p)
#define xDataMisc_allocateCopyString2(smr, s, forItem)
const char * xData_getAttributesValueInElement(xData_element *element, const char *name)
tpia_1dData totalCrossSectionPointwise
int tpia_target_read(statusMessageReporting *smr, tpia_target *target, const char *fileName)
tpia_particle * projectileID
xData_Int tpia_target_heated_getEnergyGrid(statusMessageReporting *smr, tpia_target_heated *target, double **energyGrid)
tpia_target_heated * tpia_target_getHeatedTargetAtTIndex(statusMessageReporting *smr, tpia_target *target, int index)
tpia_target_heated * tpia_target_heated_free(statusMessageReporting *smr, tpia_target_heated *target)
int tpia_target_readFromMap(statusMessageReporting *smr, tpia_target *target, tpia_map *map, const char *evaluation, const char *projectileName, const char *targetName)
#define tpia_misc_pointerToAttributeIfAllOk2(smr, element, required, attributes, name)
int xData_releaseAttributionList(statusMessageReporting *smr, xData_attributionList *attributes)
int tpia_target_readHeatedTarget(statusMessageReporting *smr, tpia_target *target, int index, int checkElememtsForAccess)
tpia_target_heated * baseHeatedTarget
tpia_1dData totalCrossSectionGrouped
int tpia_misc_setMessageError_Element(statusMessageReporting *smr, void *userInterface, xData_element *element, const char *file, int line, int code, const char *fmt,...)
tpia_target * tpia_target_create(statusMessageReporting *smr)
tpia_particle * tpia_particle_getInternalID(statusMessageReporting *smr, const char *const name)
int tpia_target_heated_numberOfProductionChannels(statusMessageReporting *smr, tpia_target_heated *target)
#define tpia_crossSectionType_pointwise
int smr_isOk(statusMessageReporting *smr)
int tpia_target_numberOfChannels(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)
char * xData_getAttributesValue(xData_attributionList *attributes, const char *name)
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_sampleIndexChannelProductsAtE(statusMessageReporting *smr, tpia_target *target, int index, double T, tpia_decaySamplingInfo *decaySamplingInfo, int nProductData, tpia_productOutgoingData *productData)
int xData_convertAttributeToDouble(statusMessageReporting *smr, xData_element *element, const char *name, double *d)
tpia_1dData * tpia_target_getTotalCrossSectionAtTIndex(statusMessageReporting *smr, tpia_target *target, int index, int crossSectionType)
tpia_samplingMethods samplingMethods
xData_element * xData_getNextElement(xData_element *element)
xData_attributionList attributes
int tpia_target_initialize(statusMessageReporting *smr, tpia_target *target)
int tpia_samplingMethods_initialize(statusMessageReporting *smr, tpia_samplingMethods *samplingMethods)
int tpia_target_heated_numberOfChannels(statusMessageReporting *smr, tpia_target_heated *target)
char * xDataMisc_getAbsPath(statusMessageReporting *smr, const char *fileName)
int tpia_target_getTemperatures(statusMessageReporting *smr, tpia_target *target, double *temperatures)
tpia_target * tpia_target_createReadFromMap(statusMessageReporting *smr, tpia_map *map, const char *evaluation, const char *projectileName, const char *targetName)
char * tpia_map_findTarget(statusMessageReporting *smr, tpia_map *map, const char *evaluation, const char *projectile, const char *targetName)
xData_element * xData_getDocumentsElement(xData_document *xData_doc)