]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/TPCLib/AliHLTTPCLog.h
Remove initialization of the tracklet pointer to get rid of compiler warning
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCLog.h
index 3ae208e2c4cf92d5cb5ce2e8545b806edbf29e2a..28146e2ccea707e2da50cc8373959c96b442429b 100644 (file)
@@ -4,12 +4,25 @@
 #ifndef ALIHLTTPCLOG_H
 #define ALIHLTTPCLOG_H
 
+// see below for class documentation
+// or
+// refer to README to build package
+// or
+// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+
 #include <sstream>
 #include <iostream>
 #include "AliHLTLogging.h"
 
 using namespace std;
 
+/** key to indicate the origin part */
+#define AliHLTTPCLogKeyOrigin  "__origin"
+/** key to indicate the keyword part */
+#define AliHLTTPCLogKeyKeyword "__key" 
+/** key to indicate the message part */
+#define AliHLTTPCLogKeyMessage "__message"
+
 /**
  * @class AliHLTTPCLog
  * This class implements the old HLT TPC logging mechanism.
@@ -20,32 +33,19 @@ using namespace std;
  */
 class AliHLTTPCLog  {
   public:
-  enum TLogLevel { kNone = 0, kDebug= 0x01, kInformational = 0x02, kWarning = 0x04, kError = 0x08 , kFatal = 0x10, kPrimary = 0x80, kAll = 0x9F };
+  enum TLogLevel { kNone = 0, kBenchmark=0x01,kDebug= 0x02, kInformational = 0x04, kWarning = 0x08, kError = 0x10 , kFatal = 0x20, kPrimary = 0x80, kAll = 0xBF };
 
+ private:
   /** not used */
   static const char* kEnd;                                         //! transient
   /** not used */
   static const char* kPrec;                                        //! transient
+ public:
   /** stream manipulator for hex output, but empty in the implementation */
   static const char* kHex;                                         //! transient
   /** stream manipulator for decimal output, but empty in the implementation */
   static const char* kDec;                                         //! transient
 
-  /** the logging filter */
-  static TLogLevel fgLevel;                                        // see above
-
-  /** key to indicate the origin part */
-  static const char* fgKeyOrigin;                                  //! transient
-  /** key to indicate the keyword part */
-  static const char* fgKeyKeyword;                                 //! transient
-  /** key to indicate the message part */
-  static const char* fgKeyMessage;                                 //! transient
-
-  /** a stringstream to receive the output */
-  static stringstream fgStream;                                    // see above
-  /** HLT logging instance */
-  static AliHLTLogging fgHLTLogging;                               // see above
-
   /**
    * Flush the stringstream and print output to the HLT logging system.
    * The attributes are set before the message is streamed into the
@@ -56,16 +56,42 @@ class AliHLTTPCLog  {
    * into the stringstream.
    */
   static const char* Flush();
+
+  /**
+   * Get the stream.
+   */
+  static stringstream& GetStream() {return fgStream;}
+
+  /**
+   * Get the logging level.
+   */
+  static TLogLevel GetLevel() {return fgLevel;}
+
+ private:
+  /** a stringstream to receive the output */
+  static stringstream fgStream;                                    // see above
+
+  /** the logging filter */
+  static TLogLevel fgLevel;                                        // see above
+
+  /** HLT logging instance */
+  static AliHLTLogging fgHLTLogging;                               // see above
+
+  /** copy constructor prohibited */
+  AliHLTTPCLog(const AliHLTTPCLog&);
+  /** assignment operator prohibited */
+  AliHLTTPCLog& operator=(const AliHLTTPCLog&);
+
 };
 
 /** LOG macro to be used by the TPC code 
  * \em Note: this macro should be used any longer 
  */
 #define LOG( lvl, origin, keyword ) \
if (lvl>=AliHLTTPCLog::fgLevel) AliHLTTPCLog::fgStream << lvl \
-                           << " " << AliHLTTPCLog::fgKeyOrigin  << " " << origin \
-                           << " " << AliHLTTPCLog::fgKeyKeyword << " " << keyword \
-                          << " " << AliHLTTPCLog::fgKeyMessage << " "
 if (lvl>=AliHLTTPCLog::GetLevel()) AliHLTTPCLog::GetStream() << lvl  \
+                           << " " << AliHLTTPCLogKeyOrigin  << " " << origin \
+                           << " " << AliHLTTPCLogKeyKeyword << " " << keyword \
+                          << " " << AliHLTTPCLogKeyMessage << " "
 
 /** ENDLOG macro calls the Flush method 
  * \em Note: this macro should be used any longer