EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
egutils.cpp File Reference
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "egutils.h"
+ Include dependency graph for egutils.cpp:

Go to the source code of this file.

Macros

#define FREE_ARG   char*
 
#define SHOWMEM   0
 
#define SWAPI(a, b)   itemp=(a);(a)=(b);(b)=itemp;
 
#define M   7
 
#define NSTACK   50
 

Functions

void nrerror (const char error_text[])
 
float * vector (int nl, int nh)
 
int * ivector (int nl, int nh)
 
unsigned char * cvector (int nl, int nh)
 
unsigned long * lvector (int nl, int nh)
 
double * dvector (int nl, int nh)
 
float ** matrix (int nrl, int nrh, int ncl, int nch)
 
double ** dmatrix (int nrl, int nrh, int ncl, int nch)
 
int ** imatrix (int nrl, int nrh, int ncl, int nch)
 
void free_vector (float *v, int nl, int nh)
 
void free_ivector (int *v, int nl, int nh)
 
void free_cvector (unsigned char *v, int nl, int nh)
 
void free_lvector (unsigned long *v, int nl, int nh)
 
void free_dvector (double *v, int nl, int nh)
 
void free_matrix (float **m, int nrl, int nrh, int ncl, int nch)
 
void free_dmatrix (double **m, int nrl, int nrh, int ncl, int nch)
 
void free_imatrix (int **m, int nrl, int nrh, int ncl, int nch)
 
void bigerror (const char error_text[])
 
void smallerror (const char error_text[])
 
int FileExists (char *filename)
 
Real Minimum (Real *vector, int first, int last)
 
int Minimi (Real *vector, int first, int last)
 
Real Maximum (Real *vector, int first, int last)
 
int Maximi (Real *vector, int first, int last)
 
void AddExtension (const char *fname1, char *fname2, const char *newext)
 
int StringToStrings (const char *buf, char args[10][10], int maxcnt, char separator)
 
int StringToReal (const char *buf, Real *dest, int maxcnt, char separator)
 
int StringToInteger (const char *buf, int *dest, int maxcnt, char separator)
 
int next_int (char **start)
 
Real next_real (char **start)
 
void SortIndex (int n, double *arr, int *indx)
 

Macro Definition Documentation

#define FREE_ARG   char*

Definition at line 39 of file egutils.cpp.

View newest version in sPHENIX GitHub at line 39 of file egutils.cpp

Referenced by free_cvector(), free_dmatrix(), free_dvector(), free_imatrix(), free_ivector(), free_lvector(), free_matrix(), and free_vector().

#define NSTACK   50

Definition at line 523 of file egutils.cpp.

View newest version in sPHENIX GitHub at line 523 of file egutils.cpp

Referenced by SortIndex().

#define SHOWMEM   0

Definition at line 40 of file egutils.cpp.

View newest version in sPHENIX GitHub at line 40 of file egutils.cpp

#define SWAPI (   a,
 
)    itemp=(a);(a)=(b);(b)=itemp;

Definition at line 521 of file egutils.cpp.

View newest version in sPHENIX GitHub at line 521 of file egutils.cpp

Referenced by SortIndex().

Function Documentation

void AddExtension ( const char *  fname1,
char *  fname2,
const char *  newext 
)

Definition at line 388 of file egutils.cpp.

View newest version in sPHENIX GitHub at line 388 of file egutils.cpp

Referenced by LoadAbaqusInput(), LoadCGsimMesh(), LoadCommands(), LoadComsolMesh(), LoadElmergrid(), LoadFidapInput(), LoadFieldviewInput(), LoadGidInput(), LoadNastranInput(), LoadUniversalMesh(), and SaveElmergrid().

+ Here is the caller graph for this function:

void bigerror ( const char  error_text[])

Definition at line 298 of file egutils.cpp.

View newest version in sPHENIX GitHub at line 298 of file egutils.cpp

References exit().

Referenced by IncreaseElementOrder(), and LoadUniversalMesh().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

unsigned char* cvector ( int  nl,
int  nh 
)

Definition at line 97 of file egutils.cpp.

View newest version in sPHENIX GitHub at line 97 of file egutils.cpp

References nrerror(), and v.

+ Here is the call graph for this function:

double** dmatrix ( int  nrl,
int  nrh,
int  ncl,
int  nch 
)

Definition at line 166 of file egutils.cpp.

View newest version in sPHENIX GitHub at line 166 of file egutils.cpp

References Acts::UnitConstants::m, MemoryUsage(), and nrerror().

+ Here is the call graph for this function:

double* dvector ( int  nl,
int  nh 
)

Definition at line 120 of file egutils.cpp.

View newest version in sPHENIX GitHub at line 120 of file egutils.cpp

References MemoryUsage(), nrerror(), and v.

+ Here is the call graph for this function:

int FileExists ( char *  filename)

Definition at line 317 of file egutils.cpp.

View newest version in sPHENIX GitHub at line 317 of file egutils.cpp

References FALSE, in, and TRUE.

void free_cvector ( unsigned char *  v,
int  nl,
int  nh 
)

Definition at line 247 of file egutils.cpp.

View newest version in sPHENIX GitHub at line 247 of file egutils.cpp

References FREE_ARG.

void free_dmatrix ( double **  m,
int  nrl,
int  nrh,
int  ncl,
int  nch 
)

Definition at line 273 of file egutils.cpp.

View newest version in sPHENIX GitHub at line 273 of file egutils.cpp

References FREE_ARG.

void free_dvector ( double *  v,
int  nl,
int  nh 
)

Definition at line 258 of file egutils.cpp.

View newest version in sPHENIX GitHub at line 258 of file egutils.cpp

References FREE_ARG.

void free_imatrix ( int **  m,
int  nrl,
int  nrh,
int  ncl,
int  nch 
)

Definition at line 285 of file egutils.cpp.

View newest version in sPHENIX GitHub at line 285 of file egutils.cpp

References FREE_ARG.

void free_ivector ( int *  v,
int  nl,
int  nh 
)

Definition at line 238 of file egutils.cpp.

View newest version in sPHENIX GitHub at line 238 of file egutils.cpp

References FREE_ARG.

Referenced by LoadAbaqusInput(), and SortIndex().

+ Here is the caller graph for this function:

void free_lvector ( unsigned long *  v,
int  nl,
int  nh 
)

Definition at line 252 of file egutils.cpp.

View newest version in sPHENIX GitHub at line 252 of file egutils.cpp

References FREE_ARG.

void free_matrix ( float **  m,
int  nrl,
int  nrh,
int  ncl,
int  nch 
)

Definition at line 267 of file egutils.cpp.

View newest version in sPHENIX GitHub at line 267 of file egutils.cpp

References FREE_ARG.

void free_vector ( float *  v,
int  nl,
int  nh 
)

Definition at line 233 of file egutils.cpp.

View newest version in sPHENIX GitHub at line 233 of file egutils.cpp

References FREE_ARG.

int** imatrix ( int  nrl,
int  nrh,
int  ncl,
int  nch 
)

Definition at line 199 of file egutils.cpp.

View newest version in sPHENIX GitHub at line 199 of file egutils.cpp

References Acts::UnitConstants::m, MemoryUsage(), and nrerror().

+ Here is the call graph for this function:

int* ivector ( int  nl,
int  nh 
)

Definition at line 78 of file egutils.cpp.

View newest version in sPHENIX GitHub at line 78 of file egutils.cpp

References MemoryUsage(), nrerror(), and v.

Referenced by LoadAbaqusInput(), LoadFidapInput(), and SortIndex().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

unsigned long* lvector ( int  nl,
int  nh 
)

Definition at line 108 of file egutils.cpp.

View newest version in sPHENIX GitHub at line 108 of file egutils.cpp

References nrerror(), and v.

+ Here is the call graph for this function:

float** matrix ( int  nrl,
int  nrh,
int  ncl,
int  nch 
)

Definition at line 141 of file egutils.cpp.

View newest version in sPHENIX GitHub at line 141 of file egutils.cpp

References Acts::UnitConstants::m, and nrerror().

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), FairGeaneUtil::FromMARSToSDCoord(), FairGeaneUtil::FromSDToMARSCoord(), Acts::CylinderSurface::normal(), ActsTransformations::printMatrix(), Acts::ConeSurface::rotSymmetryAxis(), genfit::TMatrixDSymToCovariance3D(), Acts::Surface::toStream(), Acts::toString(), and CylinderGeomMicromegas::transformation_matrix().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int Maximi ( Real vector,
int  first,
int  last 
)

Definition at line 373 of file egutils.cpp.

View newest version in sPHENIX GitHub at line 373 of file egutils.cpp

References max.

Real Maximum ( Real vector,
int  first,
int  last 
)

Definition at line 359 of file egutils.cpp.

View newest version in sPHENIX GitHub at line 359 of file egutils.cpp

References max.

int Minimi ( Real vector,
int  first,
int  last 
)

Definition at line 344 of file egutils.cpp.

View newest version in sPHENIX GitHub at line 344 of file egutils.cpp

References min.

Real Minimum ( Real vector,
int  first,
int  last 
)

Definition at line 330 of file egutils.cpp.

View newest version in sPHENIX GitHub at line 330 of file egutils.cpp

References min.

int next_int ( char **  start)

Definition at line 496 of file egutils.cpp.

View newest version in sPHENIX GitHub at line 496 of file egutils.cpp

Referenced by LoadAnsysInput(), LoadCGsimMesh(), LoadCommands(), LoadComsolMesh(), LoadElmergrid(), LoadFidapInput(), LoadFieldviewInput(), LoadGidInput(), LoadGmshInput1(), LoadGmshInput2(), LoadMeditInput(), LoadNastranInput(), LoadTriangleInput(), and LoadUniversalMesh().

+ Here is the caller graph for this function:

Real next_real ( char **  start)

Definition at line 507 of file egutils.cpp.

View newest version in sPHENIX GitHub at line 507 of file egutils.cpp

Referenced by LoadAnsysInput(), LoadCGsimMesh(), LoadCommands(), LoadComsolMesh(), LoadElmergrid(), LoadGidInput(), LoadGmshInput1(), LoadGmshInput2(), LoadMeditInput(), LoadNastranInput(), LoadTriangleInput(), and LoadUniversalMesh().

+ Here is the caller graph for this function:

void nrerror ( const char  error_text[])

Definition at line 55 of file egutils.cpp.

View newest version in sPHENIX GitHub at line 55 of file egutils.cpp

References exit().

Referenced by cvector(), dmatrix(), dvector(), imatrix(), ivector(), lvector(), matrix(), and vector().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void smallerror ( const char  error_text[])

Definition at line 307 of file egutils.cpp.

View newest version in sPHENIX GitHub at line 307 of file egutils.cpp

References exit().

Referenced by CreateInverseTopology().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void SortIndex ( int  n,
double *  arr,
int *  indx 
)

Definition at line 525 of file egutils.cpp.

View newest version in sPHENIX GitHub at line 525 of file egutils.cpp

References free_ivector(), ir(), ivector(), k, M, n, NSTACK, printf(), and SWAPI.

Referenced by FindEdges(), ReorderAutomatic(), and ReorderElements().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int StringToInteger ( const char *  buf,
int *  dest,
int  maxcnt,
char  separator 
)

Definition at line 479 of file egutils.cpp.

View newest version in sPHENIX GitHub at line 479 of file egutils.cpp

Referenced by LoadAbaqusInput().

+ Here is the caller graph for this function:

int StringToReal ( const char *  buf,
Real dest,
int  maxcnt,
char  separator 
)

Definition at line 455 of file egutils.cpp.

View newest version in sPHENIX GitHub at line 455 of file egutils.cpp

Referenced by LoadAbaqusInput().

+ Here is the caller graph for this function:

int StringToStrings ( const char *  buf,
char  args[10][10],
int  maxcnt,
char  separator 
)

Definition at line 410 of file egutils.cpp.

View newest version in sPHENIX GitHub at line 410 of file egutils.cpp

Referenced by eg_transfermesh().

+ Here is the caller graph for this function:

float* vector ( int  nl,
int  nh 
)

Definition at line 66 of file egutils.cpp.

View newest version in sPHENIX GitHub at line 66 of file egutils.cpp

References nrerror(), and v.

Referenced by Acts::BinnedSPGroup< external_spacepoint_t >::BinnedSPGroup(), Acts::Test::BOOST_AUTO_TEST_CASE(), Acts::Test::BOOST_DATA_TEST_CASE(), KFParticle_eventReconstruction::buildChain(), AnyVector::create(), Acts::Cuda::SeedFinder< external_spacepoint_t >::createSeedsForGroup(), Acts::Sycl::Seedfinder< external_spacepoint_t >::createSeedsForGroup(), Acts::Seedfinder< external_spacepoint_t, Acts::Cuda >::createSeedsForGroup(), Acts::Seedfinder< external_spacepoint_t, platform_t >::createSeedsForGroup(), TestHostCuts::cutPerMiddleSP(), readLuminosity::e_read(), Acts::SeedFilter< external_spacepoint_t >::filterSeeds_2SpFixed(), HelixHough::HelixHough(), HelixHough::initHelixHough(), eASTMagneticFieldMap::Load(), Acts::Test::benchmark_tools_internal::microBenchmarkImpl(), Acts::Legacy::AtlasSeedfinder< SpacePoint >::newOneSeedWithCurvaturesComparison(), Smear::FormulaString::Parse(), PHField3DCylindrical::PHField3DCylindrical(), PHG4InttSubsystem::PHG4InttSubsystem(), RawClusterBuilderTopo::process_event(), ParticleFlowReco::process_event(), Fun4AllServer::process_event(), sPHENIXSeedFinder::sPHENIXSeedFinder(), sPHENIXTracker::sPHENIXTracker(), and sPHENIXTrackerTpc::sPHENIXTrackerTpc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: