2 // Original: AliHLTLog.cxx,v 1.1 2004/05/14 09:37:22 loizides
4 // lagacy logging methods for HLT TPC code
6 // refer to README to build package //
8 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt //
10 #include "AliHLTTPCLog.h"
12 AliHLTTPCLog::TLogLevel AliHLTTPCLog::fgLevel=AliHLTTPCLog::kNone;
14 const char* AliHLTTPCLog::kEnd = "";
15 const char* AliHLTTPCLog::kPrec = "";
16 const char* AliHLTTPCLog::kHex = "";
17 const char* AliHLTTPCLog::kDec = "";
19 const char* AliHLTTPCLog::fgKeyOrigin ="__origin";
20 const char* AliHLTTPCLog::fgKeyKeyword="__key";
21 const char* AliHLTTPCLog::fgKeyMessage="__message";
23 stringstream AliHLTTPCLog::fgStream;
25 AliHLTLogging AliHLTTPCLog::fgHLTLogging;
27 const char* AliHLTTPCLog::Flush()
29 // see header file for class documentation
37 while (!fgStream.eof()) {
39 if (scanStatus==0 && iter.compare(fgKeyOrigin)==0) {
40 // idicate scan of origin message
43 } else if (scanStatus==1 && iter.compare(fgKeyKeyword)==0) {
44 // idicate scan of keyword message
47 } else if (scanStatus==2 && iter.compare(fgKeyMessage)==0) {
53 if (!origin.empty()) origin+=" ";
57 if (!keyword.empty()) keyword+=" ";
61 // if we have come here already for the first word, we don't
62 // expect origin and keyword any more
64 if (!message.empty()) message+=" ";
69 // flush the string stream and send out through the logging system
72 fgHLTLogging.Logging(kHLTLogDebug, origin.c_str(), keyword.c_str(), message.c_str());
75 fgHLTLogging.Logging(kHLTLogInfo, origin.c_str(), keyword.c_str(), message.c_str());
78 fgHLTLogging.Logging(kHLTLogWarning, origin.c_str(), keyword.c_str(), message.c_str());
81 fgHLTLogging.Logging(kHLTLogError, origin.c_str(), keyword.c_str(), message.c_str());
85 fgHLTLogging.Logging(kHLTLogFatal, origin.c_str(), keyword.c_str(), message.c_str());