4 using std::stringstream;
33 if(code>=
dRangeS && code<=
dRangeE )
return *
out<<
"DEBUG("<<code<<
") from PHOTOS:"<<endl;
41 if(
iAction)
return *
out<<
"INFO from PHOTOS:"<<endl;
53 *
out<<
"WARNING from PHOTOS:"<<endl<<
"Limit reached ("<<
warnLimit<<
"). Warnings suppressed."<<endl;
58 if(
wAction && count)
return *
out<<
"WARNING from PHOTOS:"<<endl;
67 if(
eAction)
return *
out<<
"ERROR from PHOTOS:"<<endl;
77 if(text==NULL) *
out<<
"ASSERT from PHOTOS:"<<endl<<
"Assertion failed. "<<endl;
78 else *
out<<
"ASSERT from PHOTOS:"<<endl<<
"Assertion failed: "<<text<<endl;
82 void Log::Fatal(
string text,
unsigned short code)
85 if(text.size()==0) *
out<<
"FATAL ERROR from PHOTOS:"<<endl<<
"Terminated by a call to Log::Exit();"<<endl;
86 else *
out<<
"FATAL ERROR from PHOTOS: "<<endl<<text<<endl;
94 cout.rdbuf(where.rdbuf());
95 cerr.rdbuf(where.rdbuf());
105 cout.rdbuf(where.rdbuf());
106 cerr.rdbuf(where.rdbuf());
112 *
out<<
"---------------------------- Photos Log Summary ------------------------------"<<endl;
121 *
out<<
" Warnings:\t";
131 cout<<
"-----------------------------------"<<endl;
132 if(
decays[3]) cout<<
" Normal decays: "<<
decays[3]<<endl;
133 if(
decays[2]) cout<<
" Decays without mother: "<<
decays[2]<<endl;
134 if(
decays[1]) cout<<
" Decays without mother & grandmothers: "<<
decays[1]<<endl;
135 if(
decays[0]) cout<<
" Decayed using Tauola gun: "<<
decays[0]<<endl;
136 *
out<<
"------------------------------------------------------------------------------"<<endl;
static void Assert(bool check, char *text=NULL)
static list< Pointer * > * PointerList
static void AddDecay(int type)
static ostream & Info(bool count=true)
static ostream & Debug(unsigned short int code=0, bool count=true)
basic_ostream< char, char_traits< char > > ostream
static ostream & Warning(bool count=true)
static void Fatal(string text, unsigned short int code=0)
static void RedirectOutput(void(*func)(), ostream &where=*out)
static ostream & Error(bool count=true)