| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

MsgStreamMember.h

Go to the documentation of this file.
00001 // This file's extension implies that it's C, but it's really -*- C++ -*-.
00002 /* It was taken from ATLAS CVS by bv@bnl.gov 2008/7/16.  Any bugs,
00003  * blame me, not them! */
00004 #ifndef DYBKERNEL_MSGSTREAMEMBER_H
00005 #define DYBKERNEL_MSGSTREAMEMBER_H 1
00006 
00014 #include <string>
00015 
00016 //strictly speaking this could be in the cxx file, by putting it here we allow
00017 //clients to use MsgStreamMember as a self-contained replacement for MsgStream
00018 #include "GaudiKernel/MsgStream.h"
00019 
00020 #include "DybKernel/getMessageSvc.h" /* IMessageSvcHolder */
00021 class MsgStream;
00022 namespace Dyb {
00023   
00024 
00034   class MsgStreamMember {
00035   public:
00042     MsgStreamMember(IMessageSvc *ims, const std::string& label) :
00043       m_ims(ims), m_label(label), m_stream(0) {}
00044 
00049     MsgStreamMember(const std::string& label) :
00050       m_ims(), m_label(label), m_stream(0) {}
00051 
00056     MsgStreamMember(const Options::CreateOptions o, const std::string& label);
00057 
00058     MsgStreamMember() : m_ims(), m_label(""), m_stream(0) {}
00059     MsgStreamMember(const MsgStreamMember& rhs) :
00060       m_ims(rhs.m_ims), m_label(rhs.m_label), m_stream(0) {}
00061 
00063     ~MsgStreamMember();
00064 
00066     MsgStream& get() const;
00067 
00068   private:
00069     mutable IMessageSvcHolder m_ims; //mutable to have op() const
00071     std::string m_label;
00072     mutable MsgStream* m_stream; //mutable to have op() const
00073   };
00074 }
00075 template <typename T>
00076 MsgStream& operator << (const Dyb::MsgStreamMember& stream, const T& rhs) {
00077   return (stream.get() << rhs);
00078 }
00079 
00080 #endif
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:09:25 2011 for DybKernel by doxygen 1.4.7