Geant4  10.01.p01
tpia_target.cc
Go to the documentation of this file.
1 /*
2 # <<BEGIN-copyright>>
3 # Copyright (c) 2010, Lawrence Livermore National Security, LLC.
4 # Produced at the Lawrence Livermore National Laboratory
5 # Written by Bret R. Beck, beck6@llnl.gov.
6 # CODE-461393
7 # All rights reserved.
8 #
9 # This file is part of GIDI. For details, see nuclear.llnl.gov.
10 # Please also read the "Additional BSD Notice" at nuclear.llnl.gov.
11 #
12 # Redistribution and use in source and binary forms, with or without modification,
13 # are permitted provided that the following conditions are met:
14 #
15 # 1) Redistributions of source code must retain the above copyright notice,
16 # this list of conditions and the disclaimer below.
17 # 2) Redistributions in binary form must reproduce the above copyright notice,
18 # this list of conditions and the disclaimer (as noted below) in the
19 # documentation and/or other materials provided with the distribution.
20 # 3) Neither the name of the LLNS/LLNL nor the names of its contributors may be
21 # used to endorse or promote products derived from this software without
22 # specific prior written permission.
23 #
24 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
25 # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
26 # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
27 # SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, LLC, THE U.S. DEPARTMENT OF ENERGY OR
28 # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29 # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
31 # AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
33 # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 # <<END-copyright>>
35 */
36 #include <string.h>
37 #include <tpia_target.h>
38 #include <tpia_misc.h>
39 
40 #if defined __cplusplus
41 namespace GIDI {
42 using namespace GIDI;
43 #endif
44 
45 static int _tpia_target_releaseAndReturnOne( statusMessageReporting *smr, tpia_target *target );
46 /*
47 ************************************************************
48 */
49 tpia_target *tpia_target_create( statusMessageReporting *smr ) {
50 
51  tpia_target *target;
52 
53  //if( ( target = xData_malloc2( smr, sizeof( tpia_target ), 0, "target" ) ) == NULL ) return( NULL );
54  if( ( target = (tpia_target*) xData_malloc2( smr, sizeof( tpia_target ), 0, "target" ) ) == NULL ) return( NULL );
55  if( tpia_target_initialize( smr, target ) ) target = tpia_target_free( smr, target );
56  return( target );
57 }
58 /*
59 ************************************************************
60 */
61 int tpia_target_initialize( statusMessageReporting *smr, tpia_target *target ) {
62 
63  memset( target, 0, sizeof( tpia_target ) );
64  tpia_samplingMethods_initialize( smr, &(target->samplingMethods) );
65  return( 0 );
66 }
67 /*
68 ************************************************************
69 */
70 tpia_target *tpia_target_createRead( statusMessageReporting *smr, const char *fileName ) {
71 
72  tpia_target *target;
73 
74  if( ( target = tpia_target_create( smr ) ) == NULL ) return( NULL );
75  //if( tpia_target_read( smr, target, fileName ) != 0 ) target = xData_free( smr, target );
76  if( tpia_target_read( smr, target, fileName ) != 0 ) target = (tpia_target*) xData_free( smr, target );
77  return( target );
78 }
79 /*
80 ************************************************************
81 */
82 int tpia_target_readFromMap( statusMessageReporting *smr, tpia_target *target, tpia_map *map, const char *evaluation, const char *projectileName,
83  const char *targetName ) {
84 
85  char *targetPath;
86 
87  if( ( targetPath = tpia_map_findTarget( smr, map, evaluation, projectileName, targetName ) ) == NULL ) return( 1 );
88  return( tpia_target_read( smr, target, targetPath ) );
89 }
90 /*
91 ************************************************************
92 */
93 tpia_target *tpia_target_createReadFromMap( statusMessageReporting *smr, tpia_map *map, const char *evaluation, const char *projectileName,
94  const char *targetName ) {
95 
96  char *targetPath;
97  tpia_target *target;
98 
99  targetPath = tpia_map_findTarget( smr, map, evaluation, projectileName, targetName );
100  if( targetPath == NULL ) return( NULL );
101  target = tpia_target_createRead( smr, targetPath );
102  xData_free( smr, targetPath );
103  return( target );
104 }
105 /*
106 ************************************************************
107 */
108 tpia_target *tpia_target_free( statusMessageReporting *smr, tpia_target *target ) {
109 
110  tpia_target_release( smr, target );
111  xData_free( smr, target );
112  return( NULL );
113 }
114 /*
115 ************************************************************
116 */
117 int tpia_target_release( statusMessageReporting *smr, tpia_target *target ) {
118 
119  int i;
120 
121  //target->path = xData_free( smr, target->path );
122  target->path = (char*) xData_free( smr, target->path );
123  //target->absPath = xData_free( smr, target->absPath );
124  target->absPath = (char*) xData_free( smr, target->absPath );
125  xData_releaseAttributionList( smr, &(target->attributes) );
126  for( i = 0; i < target->nHeatedTargets; i++ ) {
127  //target->heatedTargets[i].path = xData_free( smr, target->heatedTargets[i].path );
128  target->heatedTargets[i].path = (char*) xData_free( smr, target->heatedTargets[i].path );
129  //target->heatedTargets[i].contents = xData_free( smr, target->heatedTargets[i].contents );
130  target->heatedTargets[i].contents = (char*) xData_free( smr, target->heatedTargets[i].contents );
131  if( target->heatedTargets[i].heatedTarget != NULL ) tpia_target_heated_free( smr, target->heatedTargets[i].heatedTarget );
132  }
133  //target->heatedTargets = xData_free( smr, target->heatedTargets );
134  target->heatedTargets = (tpia_target_heated_info*) xData_free( smr, target->heatedTargets );
135  //target->readHeatedTargets = xData_free( smr, target->readHeatedTargets );
136  target->readHeatedTargets = (tpia_target_heated_info**) xData_free( smr, target->readHeatedTargets );
137  tpia_target_initialize( smr, target );
138  return( 0 );
139 }
140 /*
141 ************************************************************
142 */
143 int tpia_target_read( statusMessageReporting *smr, tpia_target *target, const char *fileName ) {
144 /*
145 * If a target has already been read into this target, user must have called tpia_target_release before calling this routine.
146 * Otherwise, there will be memory leaks.
147 */
148  xData_document *doc;
149  xData_element *element, *child;
150  int i, iHeated, nHeated = 0, status = 1;
151  double temperature;
152  //fix for gcc4.6 warings 110602
153  //char *pReturnValue, *name;
154  char *name;
155  char const *contents;
156 
157  tpia_target_initialize( smr, target );
158  if( ( target->path = xDataMisc_allocateCopyString2( smr, fileName, "path" ) ) == NULL ) return( status );
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 ) );
161  element = xData_getDocumentsElement( doc );
162  if( strcmp( element->name, "xTarget" ) != 0 ) {
163  tpia_misc_setMessageError_Element( smr, NULL, element, __FILE__, __LINE__, 1, "input file's top element must be xTarget and not %s", element->name ); }
164  else {
165  //pReturnValue = ( xData_copyAttributionList( smr, &(target->attributes), &(element->attributes) ) ) ? NULL : target->path;
166  //fix for gcc4.6 warings 110602
167  xData_copyAttributionList( smr, &(target->attributes),&(element->attributes) );
168  name = tpia_misc_pointerToAttributeIfAllOk2( smr, element, 1, &(target->attributes), "projectile" );
169  if( smr_isOk( smr ) ) target->projectileID = tpia_particle_getInternalID( smr, name );
170  if( smr_isOk( smr ) && ( name = tpia_misc_pointerToAttributeIfAllOk2( smr, element, 1, &(target->attributes), "target" ) ) != NULL ) {
171  if( smr_isOk( smr ) && ( target->targetID = tpia_particle_getInternalID( smr, name ) ) != NULL ) {
172  status = 0;
173  for( nHeated = 0, child = xData_getFirstElement( element ); child != NULL; nHeated++, child = xData_getNextElement( child ) ) {
174  if( strcmp( child->name, "target" ) != 0 ) {
175  tpia_misc_setMessageError_Element( smr, NULL, element, __FILE__, __LINE__, 1, "element can only have target sub-elements%s",
176  element->name );
177  status = 1;
178  break;
179  }
180  }
181  if( status == 0 ) {
182  //if( ( target->heatedTargets = xData_malloc2( smr, nHeated * sizeof( tpia_target_heated_info ), 1, "heatedTargets" ) ) == NULL ) {
183  if( ( target->heatedTargets = (tpia_target_heated_info*) xData_malloc2( smr, nHeated * sizeof( tpia_target_heated_info ), 1, "heatedTargets" ) ) == NULL ) {
184  status = 1; }
185  else {
186  //if( ( target->readHeatedTargets = xData_malloc2( smr, nHeated * sizeof( tpia_target_heated_info * ), 1, "heatedTargets" ) ) == NULL )
187  if( ( target->readHeatedTargets = (tpia_target_heated_info**) xData_malloc2( smr, nHeated * sizeof( tpia_target_heated_info * ), 1, "heatedTargets" ) ) == NULL )
188  status = 1;
189  }
190  for( nHeated = 0, child = xData_getFirstElement( element ); ( status == 0 ) && ( child != NULL );
191  nHeated++, child = xData_getNextElement( child ) ) {
192  if( ( i = xData_convertAttributeToDouble( smr, child, "temperature", &temperature ) ) != 0 ) {
193  if( i > 0 ) smr_setMessageError( smr, NULL, __FILE__, __LINE__, 1, "target does not have a temperature attribute" );
194  status = 1;
195  break;
196  }
197  for( iHeated = 0; iHeated < nHeated; iHeated++ ) if( target->heatedTargets[iHeated].temperature > temperature ) break;
198  if( iHeated < nHeated ) for( i = nHeated; i >= iHeated; i-- ) target->heatedTargets[i+1] = target->heatedTargets[i];
199  target->heatedTargets[iHeated].temperature = temperature;
200  target->heatedTargets[iHeated].path = NULL;
201  target->heatedTargets[iHeated].contents = NULL;
202  target->heatedTargets[iHeated].heatedTarget = NULL;
203  if( ( contents = xData_getAttributesValueInElement( child, "contents" ) ) != NULL ) {
204  if( ( target->heatedTargets[iHeated].contents = xDataMisc_allocateCopyString2( smr, contents, "contents" ) ) == NULL ) {
205  status = 1;
206  break;
207  }
208  }
209  if( ( contents = xData_getAttributesValueInElement( child, "file" ) ) == NULL ) {
210  status = 1;
211  break;
212  }
213  //if((target->heatedTargets[iHeated].path = xData_malloc2(smr, strlen( target->absPath ) + strlen( contents ) + 2, 0, "path")) == NULL) {
214  if((target->heatedTargets[iHeated].path = (char*) xData_malloc2(smr, strlen( target->absPath ) + strlen( contents ) + 2, 0, "path")) == NULL) {
215  status = 1;
216  break;
217  }
218  strcpy( target->heatedTargets[iHeated].path, target->absPath );
219  *strrchr( target->heatedTargets[iHeated].path, '/' ) = 0;
220  strcat( target->heatedTargets[iHeated].path, "/" );
221  strcat( target->heatedTargets[iHeated].path, contents );
222  target->nHeatedTargets++;
223  }
224  }
225  }
226  }
227  }
228  xData_parseFree( smr, doc );
229  if( status == 0 ) {
230  for( i = 0; i < nHeated; i++ ) target->heatedTargets[i].ordinal = i;
231  for( i = 0; i < nHeated; i++ ) if( target->heatedTargets[i].contents == NULL ) break;
232  if( i == nHeated ) i = 0; /* All heated targets are crossSection only. */
233  if( tpia_target_readHeatedTarget( smr, target, i, 0 ) == 0 ) {
234  target->baseHeatedTarget = target->heatedTargets[i].heatedTarget; }
235  else {
236  tpia_target_release( NULL, target );
237  status = 1;
238  } }
239  else {
240  tpia_target_release( smr, target );
241  }
242  return( status );
243 }
244 /*
245 ************************************************************
246 */
247 //char *tpia_target_getAttributesValue( statusMessageReporting *smr, tpia_target *target, char const *name ) {
248 char *tpia_target_getAttributesValue( statusMessageReporting *, tpia_target *target, char const *name ) {
249 
250  return( xData_getAttributesValue( &(target->attributes), name ) );
251 }
252 /*
253 ************************************************************
254 */
255 //int tpia_target_getTemperatures( statusMessageReporting *smr, tpia_target *target, double *temperatures ) {
256 int tpia_target_getTemperatures( statusMessageReporting *, tpia_target *target, double *temperatures ) {
257 
258  int i;
259 
260  if( temperatures != NULL ) for( i = 0; i < target->nHeatedTargets; i++ ) temperatures[i] = target->heatedTargets[i].temperature;
261  return( target->nHeatedTargets );
262 }
263 /*
264 ************************************************************
265 */
266 int tpia_target_readHeatedTarget( statusMessageReporting *smr, tpia_target *target, int index, int checkElememtsForAccess ) {
267 
268  int i;
269 
270  if( ( index < 0 ) || ( index >= target->nHeatedTargets ) ) {
271  smr_setMessageError( smr, NULL, __FILE__, __LINE__, 1, "temperature index = %d out of range (0 <= index < %d", index, target->nHeatedTargets );
272  return( -1 );
273  }
274  if( target->heatedTargets[index].heatedTarget != NULL ) return( 1 );
275  target->heatedTargets[index].heatedTarget = tpia_target_heated_createRead( smr, target->heatedTargets[index].path, checkElememtsForAccess );
276  if( target->heatedTargets[index].heatedTarget != NULL ) {
277  target->heatedTargets[index].heatedTarget->ordinal = target->heatedTargets[index].ordinal;
278  for( i = target->nReadHeatedTargets; i > 0; i-- ) {
279  if( target->readHeatedTargets[i-1]->temperature < target->heatedTargets[index].temperature ) break;
280  target->readHeatedTargets[i] = target->readHeatedTargets[i-1];
281  }
282  target->readHeatedTargets[i] = &(target->heatedTargets[i]);
283  target->nReadHeatedTargets++;
284  }
285  return( ( target->heatedTargets[index].heatedTarget == NULL ? -1 : 0 ) );
286 }
287 /*
288 ************************************************************
289 */
290 tpia_target_heated *tpia_target_getHeatedTargetAtIndex_ReadIfNeeded( statusMessageReporting *smr, tpia_target *target, int index ) {
291 
292  if( ( index < 0 ) || ( index >= target->nHeatedTargets ) ) {
293  smr_setMessageError( smr, NULL, __FILE__, __LINE__, 1, "temperature index = %d out of range (0 <= index < %d", index, target->nHeatedTargets );
294  return( NULL );
295  }
296  if( target->heatedTargets[index].heatedTarget == NULL ) tpia_target_readHeatedTarget( smr, target, index, 0 );
297  return( target->heatedTargets[index].heatedTarget );
298 }
299 /*
300 ************************************************************
301 */
302 tpia_target_heated *tpia_target_getHeatedTargetAtTIndex( statusMessageReporting *smr, tpia_target *target, int index ) {
303 
304  if( ( index < 0 ) || ( index >= target->nHeatedTargets ) ) {
305  smr_setMessageError( smr, NULL, __FILE__, __LINE__, 1, "temperature index = %d out of range (0 <= index < %d", index, target->nHeatedTargets );
306  return( NULL );
307  }
308  if( target->heatedTargets[index].heatedTarget == NULL ) {
309  smr_setMessageError( smr, NULL, __FILE__, __LINE__, 1, "temperature index = %d not read in", index );
310  return( NULL );
311  }
312  return( target->heatedTargets[index].heatedTarget );
313 }
314 /*
315 ************************************************************
316 */
317 int tpia_target_numberOfChannels( statusMessageReporting *smr, tpia_target *target ) {
318 
319  return( tpia_target_heated_numberOfChannels( smr, target->baseHeatedTarget ) );
320 }
321 /*
322 ************************************************************
323 */
324 int tpia_target_numberOfProductionChannels( statusMessageReporting *smr, tpia_target *target ) {
325 
326  return( tpia_target_heated_numberOfProductionChannels( smr, target->baseHeatedTarget ) );
327 }
328 /*
329 ************************************************************
330 */
331 xData_Int tpia_target_getEnergyGridAtTIndex( statusMessageReporting *smr, tpia_target *target, int index, double **energyGrid ) {
332 
333  tpia_target_heated *heated = tpia_target_getHeatedTargetAtTIndex( smr, target, index );
334 
335  if( !smr_isOk( smr ) ) return( -1 );
336  return( tpia_target_heated_getEnergyGrid( smr, heated, energyGrid ) );
337 }
338 /*
339 ************************************************************
340 */
341 tpia_1dData *tpia_target_getTotalCrossSectionAtTIndex( statusMessageReporting *smr, tpia_target *target, int index, int crossSectionType ) {
342 
343  tpia_target_heated *heated = tpia_target_getHeatedTargetAtTIndex( smr, target, index );
344 
345  if( !smr_isOk( smr ) ) return( NULL );
346  if( crossSectionType == tpia_crossSectionType_grouped ) {
347  return( &(heated->totalCrossSectionGrouped) ); }
348  else if( crossSectionType == tpia_crossSectionType_pointwise ) {
349  return( &(heated->totalCrossSectionPointwise) );
350  }
351  smr_setMessageError( smr, NULL, __FILE__, __LINE__, 1, "Invalue crossSectionType = %d", crossSectionType );
352  return( NULL );
353 }
354 /*
355 ************************************************************
356 */
357 double tpia_target_getTotalCrossSectionAtTAndE( statusMessageReporting *smr, tpia_target *target, double T, xData_Int iEg, double e_in,
358  int crossSectionType ) {
359 
360  int i;
361  double xsec = 0., xsec1, xsec2;
362 
363  for( i = 0; i < target->nReadHeatedTargets; i++ ) if( target->readHeatedTargets[i]->temperature > T ) break;
364  if( i == 0 ) {
365  xsec = tpia_target_heated_getTotalCrossSectionAtE( smr, target->readHeatedTargets[0]->heatedTarget, iEg, e_in, crossSectionType ); }
366  else if( i == target->nReadHeatedTargets ) {
367  xsec = tpia_target_heated_getTotalCrossSectionAtE( smr, target->readHeatedTargets[i-1]->heatedTarget, iEg, e_in, crossSectionType ); }
368  else {
369  xsec1 = tpia_target_heated_getTotalCrossSectionAtE( smr, target->readHeatedTargets[i-1]->heatedTarget, iEg, e_in, crossSectionType );
370  xsec2 = tpia_target_heated_getTotalCrossSectionAtE( smr, target->readHeatedTargets[i ]->heatedTarget, iEg, e_in, crossSectionType );
371  xsec = ( ( target->readHeatedTargets[i]->temperature - T ) * xsec1 + ( T - target->readHeatedTargets[i-1]->temperature ) * xsec2 ) /
372  ( target->readHeatedTargets[i]->temperature - target->readHeatedTargets[i-1]->temperature );
373  }
374 
375  return( xsec );
376 }
377 /*
378 ************************************************************
379 */
380 double tpia_target_getIndexChannelCrossSectionAtE( statusMessageReporting *smr, tpia_target *target, int index, double T, xData_Int iEg, double e_in,
381  int crossSectionType ) {
382 
383  int i;
384  double xsec = 0., xsec1, xsec2;
385 
386  for( i = 0; i < target->nReadHeatedTargets; i++ ) if( target->readHeatedTargets[i]->temperature > T ) break;
387  if( i == 0 ) {
388  xsec = tpia_target_heated_getIndexChannelCrossSectionAtE( smr, target->readHeatedTargets[0]->heatedTarget, index, iEg, e_in, crossSectionType ); }
389  else if( i == target->nReadHeatedTargets ) {
390  xsec = tpia_target_heated_getIndexChannelCrossSectionAtE( smr, target->readHeatedTargets[i-1]->heatedTarget, index, iEg, e_in, crossSectionType ); }
391  else {
392  xsec1 = tpia_target_heated_getIndexChannelCrossSectionAtE(smr, target->readHeatedTargets[i-1]->heatedTarget, index, iEg, e_in, crossSectionType);
393  xsec2 = tpia_target_heated_getIndexChannelCrossSectionAtE(smr, target->readHeatedTargets[i ]->heatedTarget, index, iEg, e_in, crossSectionType);
394  xsec = ( ( target->readHeatedTargets[i]->temperature - T ) * xsec1 + ( T - target->readHeatedTargets[i-1]->temperature ) * xsec2 ) /
395  ( target->readHeatedTargets[i]->temperature - target->readHeatedTargets[i-1]->temperature );
396  }
397 
398  return( xsec );
399 }
400 /*
401 ************************************************************
402 */
403 //int tpia_target_sampleIndexChannelProductsAtE( statusMessageReporting *smr, tpia_target *target, int index, double T,
404 int tpia_target_sampleIndexChannelProductsAtE( statusMessageReporting *smr, tpia_target *target, int index, double ,
405  tpia_decaySamplingInfo *decaySamplingInfo, int nProductData, tpia_productOutgoingData *productData ) {
406 
407  return( tpia_target_heated_sampleIndexChannelProductsAtE( smr, target->baseHeatedTarget, index, decaySamplingInfo,
408  nProductData, productData ) );
409 }
410 /*
411 ************************************************************
412 */
413 static int _tpia_target_releaseAndReturnOne( statusMessageReporting *smr, tpia_target *target ) {
414 
415  tpia_target_release( smr, target );
416  return( 1 );
417 }
418 
419 #if defined __cplusplus
420 }
421 #endif
int tpia_target_heated_numberOfChannels(statusMessageReporting *, tpia_target_heated *target)
double tpia_target_getIndexChannelCrossSectionAtE(statusMessageReporting *smr, tpia_target *target, int index, double T, xData_Int iEg, double e_in, int crossSectionType)
Definition: tpia_target.cc:380
int tpia_target_read(statusMessageReporting *smr, tpia_target *target, const char *fileName)
Definition: tpia_target.cc:143
double tpia_target_getTotalCrossSectionAtTAndE(statusMessageReporting *smr, tpia_target *target, double T, xData_Int iEg, double e_in, int crossSectionType)
Definition: tpia_target.cc:357
char * tpia_map_findTarget(statusMessageReporting *smr, tpia_map *map, const char *evaluation, const char *projectile, const char *targetName)
Definition: tpia_map.cc:327
xData_Int tpia_target_heated_getEnergyGrid(statusMessageReporting *, tpia_target_heated *target, double **energyGrid)
xData_element * xData_getNextElement(xData_element *element)
Definition: xData.cc:478
G4String name
Definition: TRTMaterials.hh:40
xData_document * xData_parseReadFile(statusMessageReporting *smr, const char *fileName, xData_xDataTypeOk func, void *userData)
Definition: xData.cc:84
int tpia_target_initialize(statusMessageReporting *smr, tpia_target *target)
Definition: tpia_target.cc:61
int tpia_misc_setMessageError_Element(statusMessageReporting *smr, void *userInterface, xData_element *element, const char *file, int line, int code, const char *fmt,...)
Definition: tpia_misc.cc:185
int smr_setMessageError(statusMessageReporting *smr, void *userInterface, const char *file, int line, int code, const char *fmt,...)
int tpia_target_release(statusMessageReporting *smr, tpia_target *target)
Definition: tpia_target.cc:117
tpia_target * tpia_target_createRead(statusMessageReporting *smr, const char *fileName)
Definition: tpia_target.cc:70
const char * xData_getAttributesValueInElement(xData_element *element, const char *name)
Definition: xData.cc:546
char * xData_getAttributesValue(xData_attributionList *attributes, const char *name)
Definition: xData.cc:530
tpia_target_heated * tpia_target_getHeatedTargetAtIndex_ReadIfNeeded(statusMessageReporting *smr, tpia_target *target, int index)
Definition: tpia_target.cc:290
int tpia_target_heated_numberOfProductionChannels(statusMessageReporting *, tpia_target_heated *target)
char * xDataMisc_getAbsPath(statusMessageReporting *smr, const char *fileName)
Definition: xDataMisc.cc:112
tpia_target_heated * tpia_target_getHeatedTargetAtTIndex(statusMessageReporting *smr, tpia_target *target, int index)
Definition: tpia_target.cc:302
xData_element * xData_getFirstElement(xData_element *element)
Definition: xData.cc:477
int tpia_target_readHeatedTarget(statusMessageReporting *smr, tpia_target *target, int index, int checkElememtsForAccess)
Definition: tpia_target.cc:266
xData_element * xData_getDocumentsElement(xData_document *doc)
Definition: xData.cc:476
void * xData_parseFree(statusMessageReporting *smr, xData_document *doc)
Definition: xData.cc:208
int smr_isOk(statusMessageReporting *smr)
tpia_1dData * tpia_target_getTotalCrossSectionAtTIndex(statusMessageReporting *smr, tpia_target *target, int index, int crossSectionType)
Definition: tpia_target.cc:341
double tpia_target_heated_getIndexChannelCrossSectionAtE(statusMessageReporting *smr, tpia_target_heated *target, int index, xData_Int iEg, double e_in, int crossSectionType)
xData_Int tpia_target_getEnergyGridAtTIndex(statusMessageReporting *smr, tpia_target *target, int index, double **energyGrid)
Definition: tpia_target.cc:331
tpia_target * tpia_target_free(statusMessageReporting *smr, tpia_target *target)
Definition: tpia_target.cc:108
int xData_releaseAttributionList(statusMessageReporting *smr, xData_attributionList *attributes)
Definition: xData.cc:611
double tpia_target_heated_getTotalCrossSectionAtE(statusMessageReporting *smr, tpia_target_heated *target, xData_Int, double e_in, int crossSectionType)
void * xData_free(statusMessageReporting *, void *p)
Definition: xDataMisc.cc:89
int tpia_target_getTemperatures(statusMessageReporting *, tpia_target *target, double *temperatures)
Definition: tpia_target.cc:256
int tpia_samplingMethods_initialize(statusMessageReporting *, tpia_samplingMethods *samplingMethods)
static int _tpia_target_releaseAndReturnOne(statusMessageReporting *smr, tpia_target *target)
Definition: tpia_target.cc:413
int tpia_target_heated_sampleIndexChannelProductsAtE(statusMessageReporting *smr, tpia_target_heated *target, int index, tpia_decaySamplingInfo *decaySamplingInfo, int nProductData, tpia_productOutgoingData *productDatas)
int xData_copyAttributionList(statusMessageReporting *smr, xData_attributionList *dest, xData_attributionList *src)
Definition: xData.cc:564
int xData_convertAttributeToDouble(statusMessageReporting *smr, xData_element *element, const char *name, double *d)
Definition: xData.cc:730
char * tpia_target_getAttributesValue(statusMessageReporting *, tpia_target *target, char const *name)
Definition: tpia_target.cc:248
int tpia_target_numberOfProductionChannels(statusMessageReporting *smr, tpia_target *target)
Definition: tpia_target.cc:324
int tpia_target_numberOfChannels(statusMessageReporting *smr, tpia_target *target)
Definition: tpia_target.cc:317
int tpia_target_readFromMap(statusMessageReporting *smr, tpia_target *target, tpia_map *map, const char *evaluation, const char *projectileName, const char *targetName)
Definition: tpia_target.cc:82
int tpia_target_sampleIndexChannelProductsAtE(statusMessageReporting *smr, tpia_target *target, int index, double, tpia_decaySamplingInfo *decaySamplingInfo, int nProductData, tpia_productOutgoingData *productData)
Definition: tpia_target.cc:404
tpia_target_heated * tpia_target_heated_createRead(statusMessageReporting *smr, const char *fileName, int checkElememtsForAccess)
tpia_target_heated * tpia_target_heated_free(statusMessageReporting *smr, tpia_target_heated *target)
tpia_target * tpia_target_create(statusMessageReporting *smr)
Definition: tpia_target.cc:49
tpia_particle * tpia_particle_getInternalID(statusMessageReporting *smr, const char *const name)
tpia_target * tpia_target_createReadFromMap(statusMessageReporting *smr, tpia_map *map, const char *evaluation, const char *projectileName, const char *targetName)
Definition: tpia_target.cc:93