1 #ifndef _DEBUG_H_ 2 #define _DEBUG_H_ 3 4 #include <iostream> 5 6 #ifndef RNAF_DEBUGLEVEL 7 #define RNAF_DEBUGLEVEL 5 8 #endif 9 10 #define DBG_OFF 6 11 #define DBG_QWATCH 1 12 13 // program intern debug levels 14 #define DBG_BACKTRACK DBG_OFF 15 #define DBG_GET_PROFILE_STRUCTURE DBG_OFF 16 #define DBG_ALGEBRA DBG_OFF 17 #define DBG_ALIGNMENT DBG_OFF 18 #define DBG_MULTIPLE DBG_OFF 19 20 #ifdef NDEBUG 21 #define TRACE(L,C,M) 22 #define WATCH(L,C,M) 23 #define QWATCH(L,C,M) 24 #else 25 #define TRACE(L,C,M) if(L <= RNAF_DEBUGLEVEL) std::cout << C << " - " << M << std::endl; 26 #define WATCH(L,C,M) if(L <= RNAF_DEBUGLEVEL) std::cout << C << " - " << #M << ": " << M << std::endl; 27 #define QWATCH(M) if(DBG_QWATCH <= RNAF_DEBUGLEVEL) std::cout << #M << ": " << M << std::endl; 28 #endif 29 30 #endif 31