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_ ()
 LogDebug_ (std::string const &id, std::string const &file, int line)
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

MessageSender ap

Detailed Description

Definition at line 369 of file MessageLogger.h.


Constructor & Destructor Documentation

edm::LogDebug_::LogDebug_ ( ) [inline]

Definition at line 372 of file MessageLogger.h.

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

Definition at line 121 of file MessageLogger.cc.

References stripLeadingDirectoryTree().

  : ap( ELsuccess,id)
{
   *this
        << " "
        << stripLeadingDirectoryTree(file)
        << ":" << line << "\n";
}
edm::LogDebug_::~LogDebug_ ( )

Definition at line 58 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, and edm::MessageSender::valid().

    {
      if (ap.valid()) ap << t; 
      return *this; }
LogDebug_& edm::LogDebug_::operator<< ( std::ostream &(*)(std::ostream &)  f) [inline]

Definition at line 383 of file MessageLogger.h.

References ap, f, and edm::MessageSender::valid().

    {
      if (ap.valid()) ap << f; 
      return *this; }
LogDebug_& edm::LogDebug_::operator<< ( std::ios_base &(*)(std::ios_base &)  f) [inline]

Definition at line 388 of file MessageLogger.h.

References ap, f, and edm::MessageSender::valid().

    {
      if (ap.valid()) ap << f; 
      return *this; }
std::string edm::LogDebug_::stripLeadingDirectoryTree ( const std::string &  file) const [private]

Definition at line 131 of file MessageLogger.cc.

References mergeVDriftHistosByStation::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

Definition at line 395 of file MessageLogger.h.

Referenced by operator<<().