CMS 3D CMS Logo

Classes | Typedefs | Functions

edm::detail Namespace Reference

Classes

class  CachedProducts
class  CPCSentry
struct  empty
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  ThreadSafeIndexedRegistry
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 >
no_tag has_isProductEqual_helper (...)
template<typename T >
yes_tag has_isProductEqual_helper (isProductEqual_function< T,&T::isProductEqual > *dummy)
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 >
no_tag has_postinsert_helper (...)
template<typename T >
yes_tag has_postinsert_helper (postinsert_function< T,&T::post_insert > *p)
template<typename T >
no_tag has_swap_helper (...)
template<typename T >
yes_tag has_swap_helper (swap_function< T,&T::swap > *dummy)
std::string const & InvalidHash ()
bool isnan (long double x)
bool isnan (float x)
bool isnan (double x)
template<typename T , typename E >
std::ostream & operator<< (std::ostream &os, ThreadSafeIndexedRegistry< T, E > const &reg)
template<typename KEY , typename T , typename E >
std::ostream & operator<< (std::ostream &os, ThreadSafeRegistry< KEY, T, E > const &reg)
template<typename COLLECTION >
void reallyfillPtrVector (COLLECTION const &coll, std::type_info const &iToType, std::vector< unsigned long > const &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<typename COLLECTION >
void reallySetPtr (COLLECTION const &coll, std::type_info const &iToType, unsigned long iIndex, void const *&oPtr)

Typedef Documentation

Definition at line 24 of file CachedProducts.h.

Definition at line 12 of file CachedProducts.cc.

typedef char(& edm::detail::no_tag

Definition at line 249 of file Wrapper.h.

typedef char(& edm::detail::yes_tag

Definition at line 250 of file Wrapper.h.


Function Documentation

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

Definition at line 71 of file DetSetVector.h.

References edm::errors::InvalidReference, and edm::Exception::throwThis().

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

                                     {
      Exception::throwThis(errors::InvalidReference,
        "DetSetVector::operator[] called with index not in collection;\nindex value: ", i);
    }
template<typename T >
no_tag edm::detail::has_isProductEqual_helper (   ...)
template<typename T >
yes_tag edm::detail::has_isProductEqual_helper ( isProductEqual_function< T,&T::isProductEqual > *  dummy)
template<typename T >
yes_tag edm::detail::has_mergeProduct_helper ( mergeProduct_function< T,&T::mergeProduct > *  dummy)
template<typename T >
no_tag edm::detail::has_mergeProduct_helper (   ...)
template<typename T >
no_tag edm::detail::has_postinsert_helper (   ...)
template<typename T >
yes_tag edm::detail::has_postinsert_helper ( postinsert_function< T,&T::post_insert > *  p)
template<typename T >
no_tag edm::detail::has_swap_helper (   ...)
template<typename T >
yes_tag edm::detail::has_swap_helper ( swap_function< T,&T::swap > *  dummy)
std::string const & edm::detail::InvalidHash ( )

Definition at line 9 of file Hash.cc.

References cms::MD5Result::compactForm(), and align::invalid.

Referenced by edm::hash_detail::isValid_(), and edm::Hash< I >::reset().

                                   {
      static std::string const invalid = cms::MD5Result().compactForm();
      return invalid;
    }
bool edm::detail::isnan ( long double  x) [inline]

Definition at line 33 of file math.h.

References GET_LDOUBLE_WORDS.

    {
      u_int32_t ex, hx, lx;
      
      GET_LDOUBLE_WORDS (ex, hx, lx, x);
      ex &= 0x7fff;
      return (bool)((ex == 0x7fff) && ((hx & 0x7fffffff) | lx));
    }
  }
bool edm::detail::isnan ( float  x) [inline]

Definition at line 14 of file math.h.

References GET_FLOAT_WORD.

Referenced by CaloHitResponse::add(), ElectronCalibrationUniv::analyze(), Vx3DHLTAnalyzer::analyze(), ElectronCalibration::analyze(), PrimaryVertexAnalyzer4PU::analyzeVertexCollection(), DetIdAssociator::buildMap(), GsfVertexWeightCalculator::calculate(), GsfElectronAlgo::calculateShowerShape(), TwoBodyDecayEstimator::checkValues(), RoadSearchTrackCandidateMakerAlgorithm::createSeedTrajectory(), CaloRecoTauDiscriminationAgainstElectron::discriminate(), SiPixelGainCalibrationAnalysis::doFits(), HLTScalersClient::endLuminosityBlock(), MagGeometry::fieldInTesla(), AlignmentExtendedCorrelationsStore::fillCovariance(), AlignmentExtendedCorrelationsStore::fillCovarianceT(), MatrixFillMap::fillEBMap(), MatrixFillMap::fillEEMap(), ClusterFillMap::fillMap(), reco::tau::RecoTauMVAHelper::fillValues(), DivisiveVertexFinder::findVertexes(), DivisiveVertexFinder::findVertexesAlt(), BSFitter::Fit(), sim::Field::GetFieldValue(), SequentialVertexFitter< 5 >::hasNan(), ConversionFastHelix::helixStateAtVertex(), RoadSearchTrackCandidateMakerAlgorithm::initialTrajectoryFromTriplet(), VirtualJetProducer::inputTowers(), cms::SubEventGenJetProducer::inputTowers(), edm::isnan(), GlobalTrackQualityProducer::kink(), fftjetcms::FFTJetInterface::loadInputCollection(), OptOCOPS::makeMeasurement(), Vx3DHLTAnalyzer::MyFit(), SensitiveDetector::NaNTrap(), TtSemiLRSignalSelObservables::operator()(), TtHadLRSignalSelObservables::operator()(), EcalUncalibRecHitFixedAlphaBetaAlgo< C >::PerformAnalyticFit(), pat::PATElectronProducer::produce(), IMACalibBlock::riempiMtr(), IMACalibBlock::riempiVtr(), EcalHitResponse::run(), EBHitResponse::run(), HcalSiPMHitResponse::run(), CaloHitRespoNew::run(), PVFitter::runFitter(), SimpleCosmicBONSeeder::seeds(), SeedGeneratorForCosmics::seeds(), ConversionFastHelix::straightLineStateAtVertex(), KinematicConstrainedVertexUpdator::update(), PrimaryVertexMonitor::vertexPlots(), VirtualJetProducer::writeJets(), and HcalPedestalMCWidths::~HcalPedestalMCWidths().

    {
      u_int32_t wx;
      
      GET_FLOAT_WORD (wx, x);
      wx &= 0x7fffffff;
      return (bool)(wx > 0x7f800000);
    }
    
bool edm::detail::isnan ( double  x) [inline]

Definition at line 23 of file math.h.

References EXTRACT_WORDS.

    {
      u_int32_t hx, lx;
      
      EXTRACT_WORDS (hx, lx, x);
      lx |= hx & 0xfffff;
      hx &= 0x7ff00000;
      return (bool)(hx == 0x7ff00000) && (lx != 0);
    }
    
template<typename T , typename E >
std::ostream& edm::detail::operator<< ( std::ostream &  os,
ThreadSafeIndexedRegistry< T, E > const &  reg 
) [inline]

Definition at line 95 of file ThreadSafeIndexedRegistry.h.

                                                                            {
      reg.print(os);
      return os;
    }
template<typename KEY , typename T , typename E >
std::ostream& edm::detail::operator<< ( std::ostream &  os,
ThreadSafeRegistry< KEY, T, E > const &  reg 
) [inline]

Definition at line 118 of file ThreadSafeRegistry.h.

                                                                        {
      reg.print(os);
      return os;
    }
template<typename COLLECTION >
void edm::detail::reallyfillPtrVector ( COLLECTION const &  coll,
std::type_info const &  iToType,
std::vector< unsigned long > const &  iIndicies,
std::vector< void const * > &  oPtr 
)

Definition at line 39 of file fillPtrVector.h.

References edm::detail::GetProduct< COLLECTION >::address(), edm::errors::LogicError, mergeVDriftHistosByStation::name, VarParsing::obj, and edm::Exception::throwThis().

Referenced by edm::SortedCollection< T, SORT >::fillPtrVector(), edm::fillPtrVector(), edm::OwnArray< T, MAX_SIZE, P >::fillPtrVector(), and edm::OwnVector< T, P >::fillPtrVector().

    {
      typedef COLLECTION                            product_type;
      typedef typename GetProduct<product_type>::element_type     element_type;
      typedef typename product_type::const_iterator iter;
      typedef typename product_type::size_type      size_type;

      oPtr.reserve(iIndicies.size());
      if(iToType == typeid(element_type)) {
        for(std::vector<unsigned long>::const_iterator itIndex = iIndicies.begin(),
            itEnd = iIndicies.end();
            itIndex != itEnd;
            ++itIndex) {
          iter it = coll.begin();
          std::advance(it, *itIndex);
          element_type const* address = GetProduct<product_type>::address(it);
          oPtr.push_back(address);
        }
      } else {
        using Reflex::Type;
        using Reflex::Object;
        static Type const s_type(Type::ByTypeInfo(typeid(element_type)));
        Type toType = Type::ByTypeInfo(iToType);

        for(std::vector<unsigned long>::const_iterator itIndex = iIndicies.begin(),
            itEnd = iIndicies.end();
            itIndex != itEnd;
            ++itIndex) {
          iter it = coll.begin();
          std::advance(it, *itIndex);
          element_type const* address = GetProduct<product_type>::address(it);
          // The const_cast below is needed because
          // Object's constructor requires a pointer to
          // non-const void, although the implementation does not, of
          // course, modify the object to which the pointer points.
          Object obj(s_type, const_cast<void*>(static_cast<void const*>(address)));
          Object cast = obj.CastObject(toType);
          if(0 != cast.Address()) {
            oPtr.push_back(cast.Address());// returns void*, after pointer adjustment
          } else {
            Exception::throwThis(errors::LogicError,
            "TypeConversionError "
            "edm::PtrVector<> : unable to convert type ",
            typeid(element_type).name(),
            " to ",
            iToType.name(),
            "\n");
          }
        }
      }
    }
template<class COLLECTION >
void edm::detail::reallyFillView ( COLLECTION const &  coll,
ProductID const &  id,
std::vector< void const * > &  ptrs,
helper_vector &  helpers 
)

Definition at line 49 of file FillView.h.

References edm::detail::GetProduct< COLLECTION >::address(), alignCSCRings::e, h, i, combine::key, edm::reftobase::RefVectorHolderBase::push_back(), edm::reftobase::RefVectorHolderBase::reserve(), edm::reftobase::RefVectorHolderBase::size(), and relativeConstraints::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().

    {
      typedef COLLECTION                            product_type;
      typedef typename GetProduct<product_type>::element_type     element_type;
      typedef typename product_type::const_iterator iter;
      typedef typename product_type::size_type      size_type;
      typedef typename FillViewRefTypeTrait<product_type, 
        typename refhelper::ValueTrait<product_type>::value, 
        typename refhelper::FindTrait<product_type, 
        typename refhelper::ValueTrait<product_type>::value>::value>::type ref_type;
      typedef reftobase::RefHolder<ref_type>        holder_type;
      
      ptrs.reserve(ptrs.size() + coll.size());
      helpers.reserve(helpers.size() + coll.size());
      size_type key = 0;
      for (iter i = coll.begin(), e = coll.end(); i!=e; ++i, ++key) {
        element_type const* address = GetProduct<product_type>::address(i);
        ptrs.push_back(address);
        ref_type ref(id, address, key, GetProduct<product_type>::product(coll) );
        holder_type h(ref);
        helpers.push_back(&h);
      }
    }
template<typename COLLECTION >
void edm::detail::reallySetPtr ( COLLECTION const &  coll,
std::type_info const &  iToType,
unsigned long  iIndex,
void const *&  oPtr 
)

Definition at line 38 of file setPtr.h.

References edm::detail::GetProduct< COLLECTION >::address(), edm::errors::LogicError, mergeVDriftHistosByStation::name, VarParsing::obj, and edm::Exception::throwThis().

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

                                    {
      typedef COLLECTION                            product_type;
      typedef typename GetProduct<product_type>::element_type     element_type;
      typedef typename product_type::const_iterator iter;
      typedef typename product_type::size_type      size_type;

      if(iToType == typeid(element_type)) {
        iter it = coll.begin();
        std::advance(it,iIndex);
        element_type const* address = GetProduct<product_type>::address( it );
        oPtr = address;
      } else {
        using Reflex::Type;
        using Reflex::Object;
        static Type const s_type(Type::ByTypeInfo(typeid(element_type)));

        iter it = coll.begin();
        std::advance(it,iIndex);
        element_type const* address = GetProduct<product_type>::address( it );

        // The const_cast below is needed because
        // Object's constructor requires a pointer to
        // non-const void, although the implementation does not, of
        // course, modify the object to which the pointer points.
        Object obj(s_type, const_cast<void*>(static_cast<void const*>(address)));
        Object cast = obj.CastObject(Type::ByTypeInfo(iToType));
        if(0 != cast.Address()) {
          oPtr = cast.Address(); // returns void*, after pointer adjustment
        } else {
          Exception::throwThis(errors::LogicError,
            "TypeConversionError"
             "edm::Ptr<> : unable to convert type ",
             typeid(element_type).name(),
             " to ",
             iToType.name(),
             "\n");
        }
      }
    }