CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

edm::LogDebug_ Class Reference

#include <MessageLogger.h>

List of all members.

Public Member Functions

 LogDebug_ (std::string const &id, std::string const &file, int line)
 LogDebug_ ()
LogDebug_operator<< (std::ostream &(*f)(std::ostream &))
template<class T >
LogDebug_operator<< (T const &t)
LogDebug_operator<< (std::ios_base &(*f)(std::ios_base &))
 ~LogDebug_ ()

Private Member Functions

std::string stripLeadingDirectoryTree (const std::string &file) const

Private Attributes

std::auto_ptr< MessageSenderap
bool debugEnabled

Detailed Description

Definition at line 369 of file MessageLogger.h.


Constructor & Destructor Documentation

edm::LogDebug_::LogDebug_ ( std::string const &  id,
std::string const &  file,
int  line 
) [explicit]

Definition at line 114 of file MessageLogger.cc.

References stripLeadingDirectoryTree().

  : ap( new MessageSender(ELsuccess,id) )
  , debugEnabled(!MessageDrop::debugAlwaysSuppressed)           //9/23/10 mf
{ *this
        << " "
        << stripLeadingDirectoryTree(file)
        << ":" << line << "\n"; }
edm::LogDebug_::LogDebug_ ( ) [inline, explicit]

Definition at line 373 of file MessageLogger.h.

: ap(), debugEnabled(false) {}          // Change log 8 
edm::LogDebug_::~LogDebug_ ( )

Definition at line 55 of file MessageLogger.cc.

{}

Member Function Documentation

template<class T >
LogDebug_& edm::LogDebug_::operator<< ( T const &  t) [inline]

Definition at line 378 of file MessageLogger.h.

References ap, debugEnabled, edm::errors::LogicError, matplotRender::t, and edm::Exception::throwThis().

    { if (!debugEnabled) return *this;                          // Change log 8
      if (ap.get()) (*ap) << t; 
      else Exception::throwThis
       (edm::errors::LogicError,"operator << to stale copied LogDebug_ object"); 
      return *this; }
LogDebug_& edm::LogDebug_::operator<< ( std::ostream &(*)(std::ostream &)  f) [inline]

Definition at line 385 of file MessageLogger.h.

References ap, debugEnabled, f, edm::errors::LogicError, and edm::Exception::throwThis().

    { if (!debugEnabled) return *this;                          // Change log 8
      if (ap.get()) (*ap) << f; 
      else Exception::throwThis
       (edm::errors::LogicError,"operator << to stale copied LogDebug_ object"); 
      return *this; }
LogDebug_& edm::LogDebug_::operator<< ( std::ios_base &(*)(std::ios_base &)  f) [inline]

Definition at line 392 of file MessageLogger.h.

References ap, debugEnabled, f, edm::errors::LogicError, and edm::Exception::throwThis().

    { if (!debugEnabled) return *this;                          // Change log 8
      if (ap.get()) (*ap) << f; 
      else Exception::throwThis
       (edm::errors::LogicError,"operator << to stale copied LogDebug_ object"); 
      return *this; }
std::string edm::LogDebug_::stripLeadingDirectoryTree ( const std::string &  file) const [private]

Definition at line 123 of file MessageLogger.cc.

References dbtoweb::file.

Referenced by LogDebug_().

                                                                    {
  std::string::size_type lastSlash = file.find_last_of('/');
  if (lastSlash == std::string::npos) return file;
  if (lastSlash == file.size()-1)     return file;
  return file.substr(lastSlash+1, file.size()-lastSlash-1);
}

Member Data Documentation

std::auto_ptr<MessageSender> edm::LogDebug_::ap [private]

Definition at line 401 of file MessageLogger.h.

Referenced by operator<<().

Definition at line 402 of file MessageLogger.h.

Referenced by operator<<().