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

Definition at line 217 of file PFTrackAlgoTools.cc.

220  {
221  switch (algo) {
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 228 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 237 of file PFTrackAlgoTools.cc.

237  :
239  return true;
240  default:
241  return false;
242  }
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
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 256 of file PFTrackAlgoTools.cc.

256  {
257  //recheck that the track is high purity!
258  if (!trackref->quality(reco::TrackBase::highPurity))
259  return false;
260 
261  const double p = trackref->p();
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 266 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 276 of file PFTrackAlgoTools.cc.

283  {