#include #include "TauolaLog.h" using std::streambuf; using std::stringstream; using std::ostream; using std::cout; using std::cerr; using std::endl; namespace Tauolapp { list *Log::PointerList = NULL; streambuf *Log::bCout=cout.rdbuf(),*Log::bCerr=cerr.rdbuf(); ostream *Log::out=&cout; stringstream Log::buf; int Log::warnLimit=100; int Log::decays[4] = {0}; int Log::dCount =0,Log::dRangeS =65535,Log::dRangeE =65534; int Log::faCount=0,Log::faRangeS=65535,Log::faRangeE=65534; int Log::iCount =0,Log::wCount =0,Log::eCount =0,Log::asCount=0, Log::asFailedCount=0; bool Log::iAction=1,Log::wAction=1,Log::eAction=1,Log::asAction=1,Log::rAction=1; void Log::AddDecay(int type) { decays[type]++; } ostream& Log::Debug(unsigned short int code, bool count) { if(count) ++dCount; if(code>=dRangeS && code<=dRangeE ) return *out<<"DEBUG("<0 && wCount>=warnLimit) { if(wAction) { *out<<"WARNING from TAUOLA:"<faRangeE) exit(-1); } void Log::RedirectOutput(void (*func)(), ostream& where) { if(!rAction) { func(); return; } cout.rdbuf(where.rdbuf()); cerr.rdbuf(where.rdbuf()); where<dRangeE) *out<<"(OFF)"; *out<<"\t\t"<0 && wCount>warnLimit) *out<<"(SUPP.)"; else *out<<"(OFF)"; } *out<<"\t\t"<0) *out<<" Asserts: "<