/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
DataFormats/Common/interface/getRef.h
33 строки
913 B
W. David Dagenhart
From scram b code-format-all (clang-format)
10 май 2019, 17:51
10 май 2019, 17:51
82e0ab0
Код
Авторство
О чём код?
#ifndef DataFormats_Common_getRef_h #define DataFormats_Common_getRef_h /* \function edm::getRef(...) * * \author Luca Lista, INFN * */ #include "DataFormats/Common/interface/Ref.h" #include "DataFormats/Common/interface/View.h" #include "DataFormats/Common/interface/Handle.h" namespace edm { namespace helper { template <typename C> struct MatcherGetRef { typedef Ref<C> ref_type; static ref_type getRef(const Handle<C>& c, size_t k) { return ref_type(c, k); } }; template <typename T> struct MatcherGetRef<View<T> > { typedef RefToBase<T> ref_type; static ref_type getRef(const Handle<View<T> >& v, size_t k) { return v->refAt(k); } }; } // namespace helper template <typename C> typename helper::MatcherGetRef<C>::ref_type getRef(const Handle<C>& c, size_t k) { return helper::MatcherGetRef<C>::getRef(c, k); } } // namespace edm #endif