| 5 |
|
#include <cmath> |
| 6 |
|
#include <cstring> |
| 7 |
|
|
| 8 |
+ |
#ifdef PROFILE |
| 9 |
+ |
#include "mdProfile.hpp" |
| 10 |
+ |
#endif //profile |
| 11 |
+ |
|
| 12 |
|
#include "simError.h" |
| 13 |
|
#include "SimSetup.hpp" |
| 14 |
|
#include "SimInfo.hpp" |
| 33 |
|
srand48( 1337 ); // the random number generator. |
| 34 |
|
initSimError(); // the error handler |
| 35 |
|
|
| 36 |
+ |
#ifdef PROFILE |
| 37 |
+ |
initProfile(); |
| 38 |
+ |
#endif //profile |
| 39 |
+ |
|
| 40 |
|
program_name = argv[0]; /*save the program name in case we need it*/ |
| 41 |
|
if( argc < 2 ){ |
| 42 |
|
sprintf( painCave.errMsg, |
| 51 |
|
|
| 52 |
|
startMe = new SimSetup(); |
| 53 |
|
startMe->setSimInfo( entry_plug ); |
| 54 |
+ |
|
| 55 |
+ |
#ifdef PROFILE |
| 56 |
+ |
startProfile( pro1 ); |
| 57 |
+ |
#endif //profile |
| 58 |
+ |
|
| 59 |
|
startMe->parseFile( in_name ); |
| 47 |
– |
startMe->createSim(); |
| 60 |
|
|
| 61 |
+ |
#ifdef PROFILE |
| 62 |
+ |
endProfile( pro1 ); |
| 63 |
+ |
|
| 64 |
+ |
startProfile( pro2 ); |
| 65 |
+ |
#endif //profile |
| 66 |
+ |
|
| 67 |
+ |
startMe->createSim(); |
| 68 |
|
delete startMe; |
| 69 |
|
|
| 70 |
+ |
#ifdef PROFILE |
| 71 |
+ |
endProfile( pro2 ); |
| 72 |
+ |
|
| 73 |
+ |
startProfile( pro3 ); |
| 74 |
+ |
#endif //profile |
| 75 |
+ |
|
| 76 |
|
entry_plug->the_integrator->integrate(); |
| 77 |
|
|
| 78 |
+ |
#ifdef PROFILE |
| 79 |
+ |
endProfile( pro3 ); |
| 80 |
+ |
|
| 81 |
+ |
writeProfiles(); |
| 82 |
+ |
#endif //profile |
| 83 |
+ |
|
| 84 |
|
return 0 ; |
| 85 |
|
} |
| 86 |
|
|