Skip to content
Snippets Groups Projects
  1. May 06, 2021
  2. May 04, 2021
  3. May 03, 2021
  4. Apr 30, 2021
  5. Apr 28, 2021
    • Andrea Dell'Acqua's avatar
      Major revision of GeoModel/GeoModelTools/ExpressionEvaluator. · 67ba60b6
      Andrea Dell'Acqua authored
      Main target is to replace the CLHEP Evaluator (totally outdated) with Partow's
      Mathematical Expression Library (http://www.partow.net/programming/exprtk/index.html).
      The move affects AGDD/MuonDD, GeoModelXML and GDMLtoGM at different levels: GeoModelXML
      uses the CLHEP Evaluator directly while AGDD/GDMLtoGM get to the Evaluator by means of
      the utility class ExpressionEvaluator. The original CLHEP Evaluator was left basically
      untouched (hence GeoModelXML is as a matter of principle NOT touched by this move),
      the Evaluator's signature was abstracted into IEvaluator.h and a new evaluator class
      (ExprtkEvaluator, based on Partow's) was developed. The ExpressionEvaluator class was
      totally rewritten to use the new ExprtkEvaluator by keeping the original UI: this means
      that, with little changes, AGDD/MuonDD and GDMLtoGM DO NOW USE the new evaluator.
      
      Tests were run on the AMDC XML files and no difference was observed but there are two
      important caveats to be borne in mind:
      1) the original exponentiation operator ("**" as in FORTRAN) is replaced by the Caret
      symbol ("^") in Partow's. To avoid modifying the AMDC files a hack was introduced, which
      seems to work well but which is hopefully not to stay forever.
      2) array elements, which used to be dereferenced by means of underscores ( array_i_ ) are
      back to to their usual form ( array[i] ) in Partow's. This has no impact on AGDD (the old
      ExpressionEvaluator was already taking care of that) but IT WILL AFFECT the way arrays
      are used in GDMLtoGM and GeoModelXML (if and when it will be moved to the new evaluator).
      
      More developments and a general tidy-up are to be foreseen in future but this is the bulk
      of it, please report any problem/misfunctioning...
      
      <dellacqu@mail.cern.ch>
      
      Changes to be committed:
      deleted:    GeoModelTools/ExpressionEvaluator/ExpressionEvaluator/AGDDTokenizer.h
      modified:   GeoModelTools/ExpressionEvaluator/ExpressionEvaluator/Evaluator.h
      modified:   GeoModelTools/ExpressionEvaluator/ExpressionEvaluator/ExpressionEvaluator.h
      new file:   GeoModelTools/ExpressionEvaluator/ExpressionEvaluator/ExprtkEvaluator.h
      new file:   GeoModelTools/ExpressionEvaluator/ExpressionEvaluator/IEvaluator.h
      new file:   GeoModelTools/ExpressionEvaluator/ExpressionEvaluator/exprtk.hpp
      deleted:    GeoModelTools/ExpressionEvaluator/ExpressionEvaluator/test.hpp
      deleted:    GeoModelTools/ExpressionEvaluator/src/AGDDTokenizer.cxx
      modified:   GeoModelTools/ExpressionEvaluator/src/ExpressionEvaluator.cxx
      new file:   GeoModelTools/ExpressionEvaluator/src/ExprtkEvaluator.cxx
      modified:   GeoModelTools/ExpressionEvaluator/src/setSystemOfUnits.cxx
      modified:   GeoModelTools/GeoModelXMLParser/GeoModelXMLParser/XMLHandler.h
      modified:   GeoModelTools/GeoModelXMLParser/src/XMLHandler.cxx
      67ba60b6
  6. Apr 26, 2021
  7. Apr 18, 2021
  8. Apr 16, 2021
  9. Apr 14, 2021
  10. Apr 13, 2021
  11. Apr 12, 2021
  12. Apr 09, 2021
  13. Apr 08, 2021
Loading