SFrame 3.6
core/include/SLogWriter.h
Go to the documentation of this file.
00001 // Dear emacs, this is -*- c++ -*-
00002 // $Id: SLogWriter.h 120 2009-08-27 12:02:57Z krasznaa $
00003 /***************************************************************************
00004  * @Project: SFrame - ROOT-based analysis framework for ATLAS
00005  * @Package: Core
00006  *
00007  * @author Stefan Ask       <Stefan.Ask@cern.ch>           - Manchester
00008  * @author David Berge      <David.Berge@cern.ch>          - CERN
00009  * @author Johannes Haller  <Johannes.Haller@cern.ch>      - Hamburg
00010  * @author A. Krasznahorkay <Attila.Krasznahorkay@cern.ch> - CERN/Debrecen
00011  *
00012  ***************************************************************************/
00013 
00014 #ifndef SFRAME_CORE_SLogWriter_H
00015 #define SFRAME_CORE_SLogWriter_H
00016 
00017 // STL include(s):
00018 #include <string>
00019 #include <map>
00020 
00021 // Local include(s):
00022 #include "SMsgType.h"
00023 
00037 class SLogWriter {
00038 
00039 public:
00041    static SLogWriter* Instance();
00043    ~SLogWriter();
00044 
00046    void Write( SMsgType type, const std::string& line ) const;
00047 
00049    void SetMinType( SMsgType type );
00051    SMsgType GetMinType() const;
00052 
00053 protected:
00055    SLogWriter();
00056 
00057 private:
00058    static SLogWriter* m_instance;
00059 
00060    std::map< SMsgType, std::string > m_typeMap;
00061    std::map< SMsgType, std::string > m_colorMap;
00062    SMsgType                          m_minType;
00063 
00064 }; // class SLogWriter
00065 
00066 #endif // SFRAME_CORE_SLogWriter_H