CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
edm::LogDebug_ Class Reference

#include <MessageLogger.h>

Public Member Functions

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

Private Member Functions

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

Private Attributes

MessageSender ap
 

Detailed Description

Definition at line 510 of file MessageLogger.h.

Constructor & Destructor Documentation

◆ LogDebug_() [1/2]

edm::LogDebug_::LogDebug_ ( )
inline

Definition at line 512 of file MessageLogger.h.

512 : ap() {}

◆ LogDebug_() [2/2]

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

Definition at line 117 of file MessageLogger.cc.

117  : ap(ELdebug, id) {
118  *this << " " << stripLeadingDirectoryTree(file) << ":" << line << "\n";
119  }

References FrontierConditions_GlobalTag_cff::file, mps_splice::line, and stripLeadingDirectoryTree().

◆ ~LogDebug_()

edm::LogDebug_::~LogDebug_ ( )

Definition at line 58 of file MessageLogger.cc.

58 {}

Member Function Documentation

◆ log()

template<typename F >
LogDebug_& edm::LogDebug_::log ( F &&  iF)
inline

Definition at line 535 of file MessageLogger.h.

535  {
536  if (ap.valid()) {
537  iF(ap);
538  }
539  return *this;
540  }

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

◆ operator<<() [1/3]

LogDebug_& edm::LogDebug_::operator<< ( std::ios_base &(*)(std::ios_base &)  f)
inline

Definition at line 527 of file MessageLogger.h.

527  {
528  if (ap.valid())
529  ap << f;
530  return *this;
531  }

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

◆ operator<<() [2/3]

LogDebug_& edm::LogDebug_::operator<< ( std::ostream &(*)(std::ostream &)  f)
inline

Definition at line 522 of file MessageLogger.h.

522  {
523  if (ap.valid())
524  ap << f;
525  return *this;
526  }

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

◆ operator<<() [3/3]

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

Definition at line 517 of file MessageLogger.h.

517  {
518  if (ap.valid())
519  ap << t;
520  return *this;
521  }

References ap, OrderedSet::t, and edm::MessageSender::valid().

◆ stripLeadingDirectoryTree()

std::string edm::LogDebug_::stripLeadingDirectoryTree ( const std::string &  file) const
private

Definition at line 121 of file MessageLogger.cc.

121  {
122  std::string::size_type lastSlash = file.find_last_of('/');
123  if (lastSlash == std::string::npos)
124  return file;
125  if (lastSlash == file.size() - 1)
126  return file;
127  return file.substr(lastSlash + 1, file.size() - lastSlash - 1);
128  }

References FrontierConditions_GlobalTag_cff::file.

Referenced by LogDebug_().

Member Data Documentation

◆ ap

MessageSender edm::LogDebug_::ap
private

Definition at line 543 of file MessageLogger.h.

Referenced by log(), and operator<<().

f
double f[11][100]
Definition: MuScleFitUtils.cc:78
edm::LogDebug_::ap
MessageSender ap
Definition: MessageLogger.h:543
edm::MessageSender::valid
bool valid()
Definition: MessageSender.h:45
trigger::size_type
uint16_t size_type
Definition: TriggerTypeDefs.h:18
OrderedSet.t
t
Definition: OrderedSet.py:90
edm::LogDebug_::stripLeadingDirectoryTree
std::string stripLeadingDirectoryTree(const std::string &file) const
Definition: MessageLogger.cc:121
edm::ELdebug
const ELslProxy< ELdebugGen > ELdebug
Definition: ELseverityLevel.cc:290
FrontierConditions_GlobalTag_cff.file
file
Definition: FrontierConditions_GlobalTag_cff.py:13
mps_splice.line
line
Definition: mps_splice.py:76