00001 00005 struct dpTracer 00006 00007 { 00008 #ifdef DP_DEBUG 00009 String msg; 00010 dpTracer (const char* message) 00011 { 00012 msg = message; 00013 if (!proc_manager->isParallel()) 00014 cout << "Trace: ---> entering function: " << message << '\n'; 00015 else 00016 cout << "Trace on processor " << proc_manager->getMyId() 00017 << ": ---> entering function: " << message << '\n'; 00018 cout.flush(); 00019 } 00020 #else 00021 dpTracer (const char*) { ; } 00022 #endif 00023 00024 #ifdef DP_DEBUG 00025 ~dpTracer () 00026 { 00027 if (!proc_manager->isParallel()) 00028 cout << "Trace: +++> end of function: " << msg.c_str() << "\n\n"; 00029 else 00030 cout << "Trace on processor " << proc_manager->getMyId() 00031 << ": +++> end of function: " << msg.c_str() << "\n\n"; 00032 cout.flush(); 00033 } 00034 #else 00035 ~dpTracer () { ; } 00036 #endif 00037 }; 00038 00039