ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nf_utilities.cc File Reference
#include <stdio.h>
#include <stdlib.h>
#include <cmath>
#include "nf_utilities.h"
+ Include dependency graph for nf_utilities.cc:

Go to the source code of this file.

Macros

#define is_nan(a)   std::isnan(a)
 

Functions

double nfu_getNAN (void)
 
int nfu_isNAN (double d)
 
double nfu_getInfinity (double sign)
 
const char * nfu_statusMessage (nfu_status status)
 
void nfu_setMemoryDebugMode (int mode)
 
voidnfu_malloc (size_t size)
 
voidnfu_calloc (size_t size, size_t n)
 
voidnfu_realloc (size_t size, void *old)
 
voidnfu_free (void *p)
 
void nfu_printMsg (char *fmt,...)
 
void nfu_printErrorMsg (char *fmt,...)
 

Variables

static const char Okay_message [] = "all is okay"
 
static const char mallocError_message [] = "could not allocate memory"
 
static const char insufficientMemory_message [] = "user's memory is too small to hanlde data"
 
static const char badIndex_message [] = "bad index"
 
static const char XNotAscending_message [] = "x values are not ascending"
 
static const char badIndexForX_message [] = "index not correct for x value"
 
static const char XOutsideDomain_message [] = "x value not in domain"
 
static const char invalidInterpolation_message [] = "bad x,y values for interpolation"
 
static const char badSelf_message [] = "source object has bad status value"
 
static const char divByZero_message [] = "division by zero"
 
static const char unsupportedInterpolation_message [] = "unsupported interpolation"
 
static const char unsupportedInterpolationConversion_message [] = "unsupported interpolation conversion"
 
static const char empty_message [] = "empty instance"
 
static const char tooFewPoints_message [] = "too few points in instance"
 
static const char notMutualDomian_message [] = "domains are not mutual"
 
static const char unknownStatus_message [] = "unknown (i.e., invalid) status value"
 
static const char badInput_message [] = "bad input to function"
 
static const char badNorm_message [] = "bad norm"
 
static const char badIntegrationInput_message [] = "bad integration input"
 
static const char otherInterpolation_message [] = "other integration not supported"
 
static const char failedToConverge_message [] = "failed to converge"
 
static const char oddNumberOfValues_message [] = "odd number of inputted values"
 
static int nfu_debugging = 0
 

Macro Definition Documentation

#define is_nan (   a)    std::isnan(a)

Definition at line 18 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 18 of file nf_utilities.cc

Referenced by nfu_isNAN().

Function Documentation

void* nfu_calloc ( size_t  size,
size_t  n 
)

Definition at line 123 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 123 of file nf_utilities.cc

References nfu_debugging, and printf().

Referenced by ptwX_new(), ptwXY_new(), and ptwXY_thin().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void* nfu_free ( void p)

Definition at line 143 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 143 of file nf_utilities.cc

References nfu_debugging, and printf().

Referenced by nf_Legendre_free(), nf_Legendre_new(), nf_Legendre_release(), ptwX_free(), ptwX_fromString(), ptwX_new(), ptwX_release(), ptwXY_cloneToInterpolation(), ptwXY_copy(), ptwXY_free(), ptwXY_fromString(), ptwXY_mergeFrom(), ptwXY_mergeFromXYs(), ptwXY_new(), ptwXY_release(), and ptwXY_thin().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double nfu_getInfinity ( double  sign)

Definition at line 68 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 68 of file nf_utilities.cc

double nfu_getNAN ( void  )

Definition at line 54 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 54 of file nf_utilities.cc

Referenced by ptwXY_div_ptwXY(), ptwXY_getXMaxAndFrom(), and ptwXY_getXMinAndFrom().

+ Here is the caller graph for this function:

int nfu_isNAN ( double  d)

Definition at line 61 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 61 of file nf_utilities.cc

References is_nan.

Referenced by ptwXY_div_ptwXY().

+ Here is the caller graph for this function:

void* nfu_malloc ( size_t  size)

Definition at line 113 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 113 of file nf_utilities.cc

References nfu_debugging, and printf().

Referenced by nf_Legendre_new(), nfu_stringToListOfDoubles2(), ptwXY_mergeFrom(), and ptwXY_mergeFromXYs().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void nfu_printErrorMsg ( char *  fmt,
  ... 
)

Definition at line 166 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 166 of file nf_utilities.cc

References g4zmq::exit().

+ Here is the call graph for this function:

void nfu_printMsg ( char *  fmt,
  ... 
)

Definition at line 154 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 154 of file nf_utilities.cc

void* nfu_realloc ( size_t  size,
void old 
)

Definition at line 133 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 133 of file nf_utilities.cc

References nfu_debugging, and printf().

Referenced by nf_Legendre_reallocateCls(), ptwX_reallocatePoints(), ptwXY_reallocateOverflowPoints(), and ptwXY_reallocatePoints().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void nfu_setMemoryDebugMode ( int  mode)

Definition at line 106 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 106 of file nf_utilities.cc

References nfu_debugging.

const char* nfu_statusMessage ( nfu_status  status)

Definition at line 76 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 76 of file nf_utilities.cc

References badIndex_message, badIndexForX_message, badInput_message, badIntegrationInput_message, badNorm_message, badSelf_message, divByZero_message, empty_message, failedToConverge_message, insufficientMemory_message, invalidInterpolation_message, mallocError_message, nfu_badIndex, nfu_badIndexForX, nfu_badInput, nfu_badIntegrationInput, nfu_badNorm, nfu_badSelf, nfu_divByZero, nfu_domainsNotMutual, nfu_empty, nfu_failedToConverge, nfu_insufficientMemory, nfu_invalidInterpolation, nfu_mallocError, nfu_oddNumberOfValues, nfu_Okay, nfu_otherInterpolation, nfu_tooFewPoints, nfu_unsupportedInterpolation, nfu_unsupportedInterpolationConversion, nfu_XNotAscending, nfu_XOutsideDomain, notMutualDomian_message, oddNumberOfValues_message, Okay_message, otherInterpolation_message, tooFewPoints_message, unknownStatus_message, unsupportedInterpolation_message, unsupportedInterpolationConversion_message, XNotAscending_message, and XOutsideDomain_message.

Referenced by MCGIDI_angular_parseFromTOM(), MCGIDI_angularEnergy_parsePointwiseFromTOM(), MCGIDI_energy_parseMadlandNixFromTOM(), MCGIDI_energy_parseNBodyPhaseSpaceFromTOM(), MCGIDI_energyAngular_linear_parseFromTOM(), MCGIDI_fromTOM_pdfOfX(), MCGIDI_KalbachMann_parseFromTOM2(), MCGIDI_LLNL_angularEnergy_parsePointwiseFromTOM(), MCGIDI_misc_Data2ptwXYPointsInUnitsOf(), MCGIDI_product_parseFromTOM(), MCGIDI_product_parsePolynomialMultiplicity(), MCGIDI_target_heated_read(), and MCGIDI_target_heated_recast().

+ Here is the caller graph for this function:

Variable Documentation

const char badIndex_message[] = "bad index"
static

Definition at line 29 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 29 of file nf_utilities.cc

Referenced by nfu_statusMessage().

const char badIndexForX_message[] = "index not correct for x value"
static

Definition at line 31 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 31 of file nf_utilities.cc

Referenced by nfu_statusMessage().

const char badInput_message[] = "bad input to function"
static

Definition at line 42 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 42 of file nf_utilities.cc

Referenced by nfu_statusMessage().

const char badIntegrationInput_message[] = "bad integration input"
static

Definition at line 44 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 44 of file nf_utilities.cc

Referenced by nfu_statusMessage().

const char badNorm_message[] = "bad norm"
static

Definition at line 43 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 43 of file nf_utilities.cc

Referenced by nfu_statusMessage().

const char badSelf_message[] = "source object has bad status value"
static

Definition at line 34 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 34 of file nf_utilities.cc

Referenced by nfu_statusMessage().

const char divByZero_message[] = "division by zero"
static

Definition at line 35 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 35 of file nf_utilities.cc

Referenced by nfu_statusMessage().

const char empty_message[] = "empty instance"
static

Definition at line 38 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 38 of file nf_utilities.cc

Referenced by nfu_statusMessage().

const char failedToConverge_message[] = "failed to converge"
static

Definition at line 46 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 46 of file nf_utilities.cc

Referenced by nfu_statusMessage().

const char insufficientMemory_message[] = "user's memory is too small to hanlde data"
static

Definition at line 28 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 28 of file nf_utilities.cc

Referenced by nfu_statusMessage().

const char invalidInterpolation_message[] = "bad x,y values for interpolation"
static

Definition at line 33 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 33 of file nf_utilities.cc

Referenced by nfu_statusMessage().

const char mallocError_message[] = "could not allocate memory"
static

Definition at line 27 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 27 of file nf_utilities.cc

Referenced by nfu_statusMessage().

int nfu_debugging = 0
static

Definition at line 49 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 49 of file nf_utilities.cc

Referenced by nfu_calloc(), nfu_free(), nfu_malloc(), nfu_realloc(), and nfu_setMemoryDebugMode().

const char notMutualDomian_message[] = "domains are not mutual"
static

Definition at line 40 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 40 of file nf_utilities.cc

Referenced by nfu_statusMessage().

const char oddNumberOfValues_message[] = "odd number of inputted values"
static

Definition at line 47 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 47 of file nf_utilities.cc

Referenced by nfu_statusMessage().

const char Okay_message[] = "all is okay"
static

Definition at line 26 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 26 of file nf_utilities.cc

Referenced by nfu_statusMessage().

const char otherInterpolation_message[] = "other integration not supported"
static

Definition at line 45 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 45 of file nf_utilities.cc

Referenced by nfu_statusMessage().

const char tooFewPoints_message[] = "too few points in instance"
static

Definition at line 39 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 39 of file nf_utilities.cc

Referenced by nfu_statusMessage().

const char unknownStatus_message[] = "unknown (i.e., invalid) status value"
static

Definition at line 41 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 41 of file nf_utilities.cc

Referenced by nfu_statusMessage().

const char unsupportedInterpolation_message[] = "unsupported interpolation"
static

Definition at line 36 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 36 of file nf_utilities.cc

Referenced by nfu_statusMessage().

const char unsupportedInterpolationConversion_message[] = "unsupported interpolation conversion"
static

Definition at line 37 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 37 of file nf_utilities.cc

Referenced by nfu_statusMessage().

const char XNotAscending_message[] = "x values are not ascending"
static

Definition at line 30 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 30 of file nf_utilities.cc

Referenced by nfu_statusMessage().

const char XOutsideDomain_message[] = "x value not in domain"
static

Definition at line 32 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 32 of file nf_utilities.cc

Referenced by nfu_statusMessage().