CMS 3D CMS Logo

Namespaces | Classes | Functions
PFTrackAlgoTools::cms Namespace Reference

Namespaces

 detail
 

Classes

class  Exception
 

Functions

std::ostream & operator<< (std::ostream &ost, Exception const &e)
 
template<typename E , typename T >
detail::Desired< E, detail::is_derived_or_same< Exception, E >::value >::typeoperator<< (E &e, T const &stuff)
 
template<typename E , typename T >
detail::Desired< E, detail::is_derived_or_same< Exception, E >::value >::type const & operator<< (E const &e, T const &stuff)
 
template<typename E >
detail::Desired< E, detail::is_derived_or_same< Exception, E >::value >::typeoperator<< (E &e, std::ostream &(*f)(std::ostream &))
 
template<typename E >
detail::Desired< E, detail::is_derived_or_same< Exception, E >::value >::type const & operator<< (E const &e, std::ostream &(*f)(std::ostream &))
 
template<typename E >
detail::Desired< E, detail::is_derived_or_same< Exception, E >::value >::typeoperator<< (E &e, std::ios_base &(*f)(std::ios_base &))
 
template<typename E >
detail::Desired< E, detail::is_derived_or_same< Exception, E >::value >::type const & operator<< (E const &e, std::ios_base &(*f)(std::ios_base &))
 

Detailed Description

This a basic exception type expected to be thrown by developer-written code. We recommend that you use it directly. It can also be used as a base class if needed.

Each Exception is identified by a category string. This category is a short word or phrase (no spaces) that described the problem that was encountered.

Information can be added to the Exception using the stream insertion operator (as one uses cout). We recommend using it in the following manner:

Example: if ((rc=func()) < 0) { throw cms::Exception("DataCorrupt") << "I died with rc = " << rc << std::endl; }

Derived types are expected to fix the category, either by 1) passing a string literal to the base class constructor, or 2) ensuring the developer gives a category name.

Example: class InfiniteLoop : public Exception { InfiniteLoop(const std::string& msg) : Exception("InfiniteLoop",msg) { } };

Function Documentation

std::ostream& PFTrackAlgoTools::cms::operator<< ( std::ostream &  ost,
Exception const &  e 
)
inline
template<typename E , typename T >
detail::Desired<E, detail::is_derived_or_same<Exception,E>::value>::type& PFTrackAlgoTools::cms::operator<< ( E &  e,
T const &  stuff 
)
inline

Definition at line 229 of file PFTrackAlgoTools.cc.

template<typename E , typename T >
detail::Desired<E, detail::is_derived_or_same<Exception,E>::value>::type const& PFTrackAlgoTools::cms::operator<< ( E const &  e,
T const &  stuff 
)
inline

Definition at line 238 of file PFTrackAlgoTools.cc.

238  :
239  return true;
240  default:
241  return false;
242  }
243 
template<typename E >
detail::Desired<E, detail::is_derived_or_same<Exception,E>::value>::type& PFTrackAlgoTools::cms::operator<< ( E &  e,
std::ostream &(*)(std::ostream &)  f 
)
inline

Definition at line 248 of file PFTrackAlgoTools.cc.

template<typename E >
detail::Desired<E, detail::is_derived_or_same<Exception,E>::value>::type const& PFTrackAlgoTools::cms::operator<< ( E const &  e,
std::ostream &(*)(std::ostream &)  f 
)
inline

Definition at line 257 of file PFTrackAlgoTools.cc.

template<typename E >
detail::Desired<E, detail::is_derived_or_same<Exception,E>::value>::type& PFTrackAlgoTools::cms::operator<< ( E &  e,
std::ios_base &(*)(std::ios_base &)  f 
)
inline

Definition at line 267 of file PFTrackAlgoTools.cc.

274  : PFrecTrack->Track Pt= "
template<typename E >
detail::Desired<E, detail::is_derived_or_same<Exception,E>::value>::type const& PFTrackAlgoTools::cms::operator<< ( E const &  e,
std::ios_base &(*)(std::ios_base &)  f 
)
inline

Definition at line 277 of file PFTrackAlgoTools.cc.

283  {