CMS 3D CMS Logo

edm::detail Namespace Reference


Classes

class  CachedProducts
class  CPCSentry
struct  empty
struct  FillViewRefTypeTrait
struct  FillViewRefTypeTrait< RefVector< C, T, F >, T1, F1 >
struct  GetProduct
struct  GetProduct< RefVector< C, T, F > >
struct  has_donotrecordparents
struct  has_isProductEqual_function
struct  has_mergeProduct_function
struct  has_postinsert
struct  has_swap_function
class  NamedEventSelector
class  ThreadSafeRegistry

Typedefs

typedef edm::Handle
< edm::TriggerResults
handle_t
typedef detail::NamedEventSelector NES
typedef char(& no_tag )[1]
typedef char(& yes_tag )[2]

Functions

void _throw_range (det_id_type i)
template<typename T>
yes_tag has_isProductEqual_helper (isProductEqual_function< T,&T::isProductEqual > *dummy)
template<typename T>
no_tag has_isProductEqual_helper (...)
template<typename T>
yes_tag has_mergeProduct_helper (mergeProduct_function< T,&T::mergeProduct > *dummy)
template<typename T>
no_tag has_mergeProduct_helper (...)
template<typename T>
yes_tag has_postinsert_helper (postinsert_function< T,&T::post_insert > *p)
template<typename T>
no_tag has_postinsert_helper (...)
template<typename T>
yes_tag has_swap_helper (swap_function< T,&T::swap > *dummy)
template<typename T>
no_tag has_swap_helper (...)
std::string const & InvalidHash ()
bool isnan (long double x)
bool isnan (double x)
bool isnan (float x)
template<class KEY, class T, class E>
std::ostream & operator<< (std::ostream &os, ThreadSafeRegistry< KEY, T, E > const &reg)
template<class COLLECTION>
void reallyfillPtrVector (COLLECTION const &coll, const std::type_info &iToType, const std::vector< unsigned long > &iIndicies, std::vector< void const * > &oPtr)
template<class COLLECTION>
void reallyFillView (COLLECTION const &coll, ProductID const &id, std::vector< void const * > &ptrs, helper_vector &helpers)
template<class COLLECTION>
void reallySetPtr (COLLECTION const &coll, const std::type_info &iToType, unsigned long iIndex, void const *&oPtr)


Typedef Documentation

typedef edm::Handle<edm::TriggerResults> edm::detail::handle_t

Definition at line 26 of file CachedProducts.h.

typedef detail::NamedEventSelector edm::detail::NES

Definition at line 12 of file CachedProducts.cc.

typedef char(& edm::detail::no_tag

Definition at line 254 of file Wrapper.h.

typedef char(& edm::detail::yes_tag

Definition at line 255 of file Wrapper.h.


Function Documentation

void edm::detail::_throw_range ( det_id_type  i  )  [inline]

Definition at line 75 of file DetSetVector.h.

References edm::errors::InvalidReference.

Referenced by edm::DetSetVector< T >::operator[]().

00075                                      {
00076       throw edm::Exception(errors::InvalidReference)
00077         << "DetSetVector::operator[] called with index not in collection;\n"
00078         << "index value: " << i;
00079     }

template<typename T>
yes_tag edm::detail::has_isProductEqual_helper ( isProductEqual_function< T,&T::isProductEqual > *  dummy  )  [inline]

template<typename T>
no_tag edm::detail::has_isProductEqual_helper (   ...  )  [inline]

template<typename T>
yes_tag edm::detail::has_mergeProduct_helper ( mergeProduct_function< T,&T::mergeProduct > *  dummy  )  [inline]

template<typename T>
no_tag edm::detail::has_mergeProduct_helper (   ...  )  [inline]

template<typename T>
yes_tag edm::detail::has_postinsert_helper ( postinsert_function< T,&T::post_insert > *  p  )  [inline]

template<typename T>
no_tag edm::detail::has_postinsert_helper (   ...  )  [inline]

template<typename T>
yes_tag edm::detail::has_swap_helper ( swap_function< T,&T::swap > *  dummy  )  [inline]

template<typename T>
no_tag edm::detail::has_swap_helper (   ...  )  [inline]

std::string const & edm::detail::InvalidHash (  ) 

Definition at line 8 of file Hash.cc.

References reco::method::invalid.

Referenced by edm::Hash< I >::fixup(), and edm::Hash< I >::isValid().

00009     {
00010       static const std::string invalid = cms::MD5Result().compactForm();
00011       return invalid;
00012     }

bool edm::detail::isnan ( long double  x  )  [inline]

Definition at line 32 of file math.h.

References GET_LDOUBLE_WORDS.

00033     {
00034       u_int32_t ex, hx, lx;
00035       
00036       GET_LDOUBLE_WORDS (ex, hx, lx, x);
00037       ex &= 0x7fff;
00038       return (bool)((ex == 0x7fff) && ((hx & 0x7fffffff) | lx));
00039     }

bool edm::detail::isnan ( double  x  )  [inline]

Definition at line 22 of file math.h.

References EXTRACT_WORDS.

00023     {
00024       u_int32_t hx, lx;
00025       
00026       EXTRACT_WORDS (hx, lx, x);
00027       lx |= hx & 0xfffff;
00028       hx &= 0x7ff00000;
00029       return (bool)(hx == 0x7ff00000) && (lx != 0);
00030     }

bool edm::detail::isnan ( float  x  )  [inline]

Definition at line 13 of file math.h.

References GET_FLOAT_WORD.

00014     {
00015       u_int32_t wx;
00016       
00017       GET_FLOAT_WORD (wx, x);
00018       wx &= 0x7fffffff;
00019       return (bool)(wx > 0x7f800000);
00020     }

template<class KEY, class T, class E>
std::ostream& edm::detail::operator<< ( std::ostream &  os,
ThreadSafeRegistry< KEY, T, E > const &  reg 
) [inline]

Definition at line 113 of file ThreadSafeRegistry.h.

00114     {
00115       reg.print(os);
00116       return os;
00117     }

template<class COLLECTION>
void edm::detail::reallyfillPtrVector ( COLLECTION const &  coll,
const std::type_info &  iToType,
const std::vector< unsigned long > &  iIndicies,
std::vector< void const * > &  oPtr 
) [inline]

Definition at line 36 of file fillPtrVector.h.

References Exception, it, iter, name, and VarParsing::obj.

Referenced by edm::SortedCollection< T, SORT >::fillPtrVector(), and edm::fillPtrVector().

00040     {
00041       typedef COLLECTION                            product_type;
00042       typedef typename GetProduct<product_type>::element_type     element_type;
00043       typedef typename product_type::const_iterator iter;
00044       typedef typename product_type::size_type      size_type;
00045       
00046       oPtr.reserve(iIndicies.size());
00047       if(iToType == typeid(element_type)) {
00048         for(std::vector<unsigned long>::const_iterator itIndex=iIndicies.begin(),
00049             itEnd = iIndicies.end();
00050             itIndex != itEnd;
00051             ++itIndex) {
00052           iter it = coll.begin();
00053           advance(it,*itIndex);          
00054           element_type const* address = GetProduct<product_type>::address( it );
00055           oPtr.push_back(address);
00056         }
00057       } else {
00058         using ROOT::Reflex::Type;
00059         using ROOT::Reflex::Object;
00060         static const Type s_type(Type::ByTypeInfo(typeid(element_type)));
00061         Type toType=Type::ByTypeInfo(iToType);
00062         
00063         for(std::vector<unsigned long>::const_iterator itIndex=iIndicies.begin(),
00064             itEnd = iIndicies.end();
00065             itIndex != itEnd;
00066             ++itIndex) {
00067           iter it = coll.begin();
00068           advance(it,*itIndex);          
00069           element_type const* address = GetProduct<product_type>::address( it );
00070           // The const_cast below is needed because
00071           // Object's constructor requires a pointer to
00072           // non-const void, although the implementation does not, of
00073           // course, modify the object to which the pointer points.
00074           Object obj(s_type, const_cast<void*>(static_cast<const void*>(address)));
00075           Object cast = obj.CastObject(toType);
00076           if(0 != cast.Address()) {
00077             oPtr.push_back(cast.Address());// returns void*, after pointer adjustment
00078           } else {
00079             throw cms::Exception("TypeConversionError")
00080             << "edm::PtrVector<> : unable to convert type " << typeid(element_type).name()
00081             << " to " << iToType.name() << "\n";
00082           }
00083           
00084         }
00085       }
00086     }

template<class COLLECTION>
void edm::detail::reallyFillView ( COLLECTION const &  coll,
ProductID const &  id,
std::vector< void const * > &  ptrs,
helper_vector &  helpers 
) [inline]

Definition at line 53 of file FillView.h.

References e, h, i, iter, getDQMSummary::key, edm::reftobase::RefVectorHolderBase::push_back(), and value.

Referenced by edm::fillView(), edm::SortedCollection< T, SORT >::fillView(), edm::AssociationVector< KeyRefProd, CVal, KeyRef, SizeType, KeyReferenceHelper >::fillView(), edm::DetSetVector< T >::fillView(), edm::reftobase::RefVectorHolder< REFV >::reallyFillView(), edm::reftobase::RefVectorHolderDoFillView< REFV >::reallyFillView(), and edm::RefToBaseProd< T >::RefToBaseProd().

00057     {
00058       typedef COLLECTION                            product_type;
00059       typedef typename GetProduct<product_type>::element_type     element_type;
00060       typedef typename product_type::const_iterator iter;
00061       typedef typename product_type::size_type      size_type;
00062       typedef typename FillViewRefTypeTrait<product_type, 
00063         typename refhelper::ValueTrait<product_type>::value, 
00064         typename refhelper::FindTrait<product_type, 
00065         typename refhelper::ValueTrait<product_type>::value>::value>::type ref_type;
00066       typedef reftobase::RefHolder<ref_type>        holder_type;
00067       
00068       size_type key = 0;
00069       for (iter i = coll.begin(), e = coll.end(); i!=e; ++i, ++key) {
00070         element_type const* address = GetProduct<product_type>::address(i);
00071         ptrs.push_back(address);
00072         ref_type ref(id, address, key, GetProduct<product_type>::product(coll) );
00073         holder_type h(ref);
00074         helpers.push_back(&h);
00075       }
00076     }

template<class COLLECTION>
void edm::detail::reallySetPtr ( COLLECTION const &  coll,
const std::type_info &  iToType,
unsigned long  iIndex,
void const *&  oPtr 
) [inline]

Definition at line 36 of file setPtr.h.

References Exception, it, iter, name, and VarParsing::obj.

Referenced by edm::setPtr(), and edm::SortedCollection< T, SORT >::setPtr().

00040     {
00041       typedef COLLECTION                            product_type;
00042       typedef typename GetProduct<product_type>::element_type     element_type;
00043       typedef typename product_type::const_iterator iter;
00044       typedef typename product_type::size_type      size_type;
00045       
00046       if(iToType == typeid(element_type)) {
00047         iter it = coll.begin();
00048         advance(it,iIndex);
00049         element_type const* address = GetProduct<product_type>::address( it );
00050         oPtr = address;
00051       } else {
00052         using ROOT::Reflex::Type;
00053         using ROOT::Reflex::Object;
00054         static const Type s_type(Type::ByTypeInfo(typeid(element_type)));
00055 
00056         iter it = coll.begin();
00057         advance(it,iIndex);
00058         element_type const* address = GetProduct<product_type>::address( it );
00059 
00060         // The const_cast below is needed because
00061         // Object's constructor requires a pointer to
00062         // non-const void, although the implementation does not, of
00063         // course, modify the object to which the pointer points.
00064         Object obj(s_type, const_cast<void*>(static_cast<const void*>(address)));
00065         Object cast = obj.CastObject(Type::ByTypeInfo(iToType));
00066         if(0 != cast.Address()) {
00067           oPtr = cast.Address(); // returns void*, after pointer adjustment
00068         } else {
00069           throw cms::Exception("TypeConversionError")
00070           << "edm::Ptr<> : unable to convert type " << typeid(element_type).name()
00071           << " to " << iToType.name() << "\n";
00072         }
00073       }
00074     }


Generated on Tue Jun 9 18:44:50 2009 for CMSSW by  doxygen 1.5.4