I am trying to read a GDML file with G4GDMLParser:
...
G4GDMLParser parser;
parser.Read(G4Str_Filename, fValidate);
But it gives an error:
...
G4GDML: Reading materials...
G4GDML: Reading solids...
Evaluator : syntax error
-------- EEEE ------- G4Exception-START -------- EEEE -------
*** G4Exception : InvalidExpression
issued by : G4GDMLEvaluator::Evaluate()
Error in expression: 40.0
*** Fatal Exception *** core dump ***
**** Track information is not available at this moment
**** Step information is not available at this moment
-------- EEEE -------- G4Exception-END --------- EEEE -------
*** G4Exception: Aborting execution ***
Signal: SIGABRT (Aborted)
I tried putting GDML file next to the executable but it didnt help.
I found it problem is My locale TR uses ", "not ". " for floats just set your locale somewhere in your code;
std::setlocale(LC_ALL, "en_US.UTF-8");
std::setlocale(LC_NUMERIC, "en_US.UTF-8");
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.