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[ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /processes/hadronic/models/lend/src/xDataTOM_interpolation.cc (Version 11.3.0) and /processes/hadronic/models/lend/src/xDataTOM_interpolation.cc (Version 7.1.p1)


  1 /*                                                  1 
  2 # <<BEGIN-copyright>>                             
  3 # <<END-copyright>>                               
  4 */                                                
  5                                                   
  6 #include <string.h>                               
  7 #include "xDataTOM_private.h"                     
  8                                                   
  9 #if defined __cplusplus                           
 10 namespace GIDI {                                  
 11 using namespace GIDI;                             
 12 #endif                                            
 13                                                   
 14 #define dependentAxis 1                           
 15 #define allowByRegion 2                           
 16                                                   
 17 static enum xDataTOM_interpolationFlag xDataTO    
 18     char const *str, int flag );                  
 19 /*                                                
 20 **********************************************    
 21 */                                                
 22 int xDataTOM_interpolation_set( statusMessageR    
 23     enum xDataTOM_interpolationFlag dependent,    
 24                                                   
 25     if( ( independent < xDataTOM_interpolation    
 26         smr_setReportError2( smr, xDataTOM_smr    
 27         return( 1 );                              
 28     }                                             
 29     if( ( dependent < xDataTOM_interpolationFl    
 30         smr_setReportError2( smr, xDataTOM_smr    
 31         return( 1 );                              
 32     }                                             
 33     if( ( qualifier <= xDataTOM_interpolationQ    
 34         smr_setReportError2( smr, xDataTOM_smr    
 35         return( 1 );                              
 36     }                                             
 37                                                   
 38     interpolation->independent = independent;     
 39     interpolation->dependent = dependent;         
 40     interpolation->qualifier = qualifier;         
 41     return( 0 );                                  
 42 }                                                 
 43 /*                                                
 44 **********************************************    
 45 */                                                
 46 int xDataTOM_interpolation_setFromString( stat    
 47                                                   
 48     int flag = 0;                                 
 49     char const *c, *e;                            
 50     enum xDataTOM_interpolationQualifier quali    
 51     enum xDataTOM_interpolationFlag independen    
 52                                                   
 53     if( ( c = strchr( str, ':' ) ) != NULL ) {    
 54         if( strncmp( "unitBase:", str, 9 ) ==     
 55             qualifier = xDataTOM_interpolation    
 56         else if( strncmp( "correspondingPoints    
 57             qualifier = xDataTOM_interpolation    
 58         else {                                    
 59             smr_setReportError2( smr, xDataTOM    
 60             return( 1 );                          
 61         }                                         
 62         c++; }                                    
 63     else {                                        
 64         c = str;                                  
 65     }                                             
 66     if( ( independent = xDataTOM_interpolation    
 67     if( *e != ',' ) {                             
 68         smr_setReportError2( smr, xDataTOM_smr    
 69         return( 1 );                              
 70     }                                             
 71     c = ++e;                                      
 72     flag |= dependentAxis;                        
 73     if( ( dependent   = xDataTOM_interpolation    
 74     xDataTOM_interpolation_set( smr, interpola    
 75     return( 0 );                                  
 76 }                                                 
 77 /*                                                
 78 **********************************************    
 79 */                                                
 80 static enum xDataTOM_interpolationFlag xDataTO    
 81     char const *str, int flag ) {                 
 82                                                   
 83     if( strncmp( "linear", s, 6 ) == 0 ) { *e     
 84     if( strncmp( "log", s, 3 ) == 0 ) { *e = &    
 85     if( flag | allowByRegion ) {                  
 86         if( strncmp( "byRegion", s, 8 ) == 0 )    
 87     }                                             
 88     if( flag | dependentAxis ) {                  
 89         if( strncmp( "flat", s, 4 ) == 0 ) { *    
 90     }                                             
 91     smr_setReportError2( smr, xDataTOM_smrLibr    
 92     return( xDataTOM_interpolationFlag_invalid    
 93                                                   
 94 /*  Currently not supported.                      
 95     otherToken = 'other'                          
 96     chargedParticleToken = 'charged-particle'     
 97 */                                                
 98 }                                                 
 99 /*                                                
100 **********************************************    
101 */                                                
102 int xDataTOM_interpolation_copy( statusMessage    
103                                                   
104     return( xDataTOM_interpolation_set( smr, d    
105 }                                                 
106                                                   
107 #if defined __cplusplus                           
108 }                                                 
109 #endif                                            
110