Geant4  10.02.p03
G4tgrEvaluator Class Reference

#include <G4tgrEvaluator.hh>

Inheritance diagram for G4tgrEvaluator:
Collaboration diagram for G4tgrEvaluator:

Public Member Functions

 G4tgrEvaluator ()
 
 ~G4tgrEvaluator ()
 
void print_error (G4int status) const
 
- Public Member Functions inherited from HepTool::Evaluator
 Evaluator ()
 
 ~Evaluator ()
 
double evaluate (const char *expression)
 
int status () const
 
int error_position () const
 
void print_error () const
 
std::string error_name () const
 
void setVariable (const char *name, double value)
 
void setVariable (const char *name, const char *expression)
 
void setFunction (const char *name, double(*fun)())
 
void setFunction (const char *name, double(*fun)(double))
 
void setFunction (const char *name, double(*fun)(double, double))
 
void setFunction (const char *name, double(*fun)(double, double, double))
 
void setFunction (const char *name, double(*fun)(double, double, double, double))
 
void setFunction (const char *name, double(*fun)(double, double, double, double, double))
 
bool findVariable (const char *name) const
 
bool findFunction (const char *name, int npar) const
 
void removeVariable (const char *name)
 
void removeFunction (const char *name, int npar)
 
void clear ()
 
void setStdMath ()
 
void setSystemOfUnits (double meter=1.0, double kilogram=1.0, double second=1.0, double ampere=1.0, double kelvin=1.0, double mole=1.0, double candela=1.0)
 

Private Member Functions

void AddCommonFunctions ()
 

Additional Inherited Members

- Public Types inherited from HepTool::Evaluator
enum  {
  OK, WARNING_EXISTING_VARIABLE, WARNING_EXISTING_FUNCTION, WARNING_BLANK_STRING,
  ERROR_NOT_A_NAME, ERROR_SYNTAX_ERROR, ERROR_UNPAIRED_PARENTHESIS, ERROR_UNEXPECTED_SYMBOL,
  ERROR_UNKNOWN_VARIABLE, ERROR_UNKNOWN_FUNCTION, ERROR_EMPTY_PARAMETER, ERROR_CALCULATION_ERROR
}
 

Detailed Description

Definition at line 46 of file G4tgrEvaluator.hh.

Constructor & Destructor Documentation

◆ G4tgrEvaluator()

G4tgrEvaluator::G4tgrEvaluator ( )

Definition at line 41 of file G4tgrEvaluator.cc.

42 {
44 }
void AddCommonFunctions()
Here is the call graph for this function:

◆ ~G4tgrEvaluator()

G4tgrEvaluator::~G4tgrEvaluator ( )

Definition at line 48 of file G4tgrEvaluator.cc.

49 {
50 }

Member Function Documentation

◆ AddCommonFunctions()

void G4tgrEvaluator::AddCommonFunctions ( )
private

Definition at line 88 of file G4tgrEvaluator.cc.

89 {
90  setFunction("sin", (*fsin));
91  setFunction("cos", (*fcos));
92  setFunction("tan", (*ftan));
93  setFunction("asin", (*fasin));
94  setFunction("acos", (*facos));
95  setFunction("atan", (*fatan));
96  setFunction("atan2", (*fatan2));
97  setFunction("sinh", (*fsinh));
98  setFunction("cosh", (*fcosh));
99  setFunction("tanh", (*ftanh));
100 // setFunction("asinh", (*fasinh));
101 // setFunction("acosh", (*facosh));
102 // setFunction("atanh", (*fatanh));
103  setFunction("sqrt", (*fsqrt));
104  setFunction("exp", (*fexp));
105  setFunction("log", (*flog));
106  setFunction("log10", (*flog10));
107  setFunction("pow", (*fpow));
108 }
G4double fsqrt(G4double arg)
G4double ftan(G4double arg)
G4double fexp(G4double arg)
G4double fcosh(G4double arg)
G4double fcos(G4double arg)
G4double fsin(G4double arg)
void setFunction(const char *name, double(*fun)())
Definition: Evaluator.cc:696
G4double ftanh(G4double arg)
G4double facos(G4double arg)
G4double fpow(G4double arg1, G4double arg2)
G4double fasin(G4double arg)
G4double fatan2(G4double arg1, G4double arg2)
G4double flog(G4double arg)
G4double fsinh(G4double arg)
G4double fatan(G4double arg)
G4double flog10(G4double arg)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ print_error()

void G4tgrEvaluator::print_error ( G4int  status) const

Definition at line 54 of file G4tgrEvaluator.cc.

55 {
56  switch (estatus)
57  {
58  case ERROR_SYNTAX_ERROR:
59  G4cerr << "G4tgrEvaluator: syntax error!" << G4endl;
60  return;
61  default:
63  return;
64  }
65 }
void print_error() const
Definition: Evaluator.cc:641
#define G4endl
Definition: G4ios.hh:61
G4GLOB_DLL std::ostream G4cerr
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: