/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
CommonTools/CandUtils/interface/CandMapTrait.h
50 строк
1 KB
Cms Build
Clang-Format
03 июн 2019, 06:44
03 июн 2019, 06:44
6a63925
Код
Авторство
О чём код?
#ifndef CommonTools_CandUtils_CandMapTrait_h #define CommonTools_CandUtils_CandMapTrait_h #include "DataFormats/Common/interface/AssociationMap.h" #include "DataFormats/Candidate/interface/CandidateFwd.h" /* \class reco::helper::CandMapTrait<T> * * \author Luca Lista, INFN * * \version $Id: CandMapTrait.h,v 1.2 2007/10/20 16:00:52 llista Exp $ * */ namespace reco { namespace helper { template <typename C1, typename C2 = C1> struct CandMapTrait { typedef edm::AssociationMap<edm::OneToOne<C1, C2> > type; }; template <typename C1> struct CandMapTrait<C1, CandidateView> { typedef edm::AssociationMap<edm::OneToOneGeneric<C1, CandidateView> > type; }; template <typename C2> struct CandMapTrait<CandidateView, C2> { typedef edm::AssociationMap<edm::OneToOneGeneric<CandidateView, C2> > type; }; template <> struct CandMapTrait<CandidateView, CandidateView> { typedef edm::AssociationMap<edm::OneToOneGeneric<CandidateView, CandidateView> > type; }; template <typename C> struct CandRefTrait { typedef edm::Ref<C> ref_type; typedef edm::RefProd<C> refProd_type; }; template <typename T> struct CandRefTrait<edm::View<T> > { typedef edm::RefToBase<T> ref_type; typedef edm::RefToBaseProd<T> refProd_type; }; } // namespace helper } // namespace reco #endif