Legend in the display corrected
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCLog.h
CommitLineData
a6c02c85 1// @(#) $Id$
4aa41877 2// Original: AliHLTLog.h,v 1.2 2004/06/11 16:06:33 loizides Exp $
a6c02c85 3
4#ifndef ALIHLTTPCLOG_H
5#define ALIHLTTPCLOG_H
6
db16520a 7#ifndef __CINT__
6c1a9d9e 8#include <ios>
db16520a 9#endif
10
a6c02c85 11class AliHLTTPCLog {
12 public:
13 enum TLogLevel { kNone = 0, kDebug= 0x01, kInformational = 0x02, kWarning = 0x04, kError = 0x08 , kFatal = 0x10, kPrimary = 0x80, kAll = 0x9F };
db16520a 14 //enum TLogCmd { kEnd, kPrec, kHex=std::ios_base::hex, kDec=std::ios_base::dec };
15 static const char* kEnd;
16 static const char* kPrec;
17 static const char* kHex;
18 static const char* kDec;
19/* static const std::ios_base::fmtflags kHex; */
20/* static const std::ios_base::fmtflags kDec; */
a6c02c85 21 static TLogLevel fgLevel;
22};
23
db16520a 24#if __GNUC__ >= 3
a6c02c85 25#define LOG( lvl, origin, keyword ) \
26 if (lvl>=AliHLTTPCLog::fgLevel) std::cerr<<"["<<origin<<": "<<keyword<<"] "
27#define ENDLOG std::endl
28#else
db16520a 29#error old gcc!
a6c02c85 30#define LOG( lvl, origin, keyword ) \
31 if (lvl>=AliHLTTPCLog::fgLevel) cerr<<"["<<origin<<": "<<keyword<<"] "
32#define ENDLOG endl
33#endif /* __GNUC__ */
34#endif /* ALIHLTTPCLOG_H */