/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
CommonTools/UtilAlgos/interface/StoreContainerTrait.h
39 строк
1 KB
Cms Build
Clang-Format
05 июн 2019, 13:53
05 июн 2019, 13:53
bbbc152
Код
Авторство
О чём код?
#ifndef UtilAlgos_StoreContainerTrait_h #define UtilAlgos_StoreContainerTrait_h /* \class helper::StoreContainerTrait * * \author Luca Lista, INFN */ #include "DataFormats/Common/interface/RefVector.h" #include "DataFormats/Common/interface/RefToBaseVector.h" #include "DataFormats/Common/interface/PtrVector.h" #include "DataFormats/Common/interface/AssociationVector.h" namespace helper { template <typename OutputCollection> struct StoreContainerTrait { typedef std::vector<const typename OutputCollection::value_type *> type; }; template <typename C> struct StoreContainerTrait<edm::RefVector<C> > { typedef edm::RefVector<C> type; }; template <typename T> struct StoreContainerTrait<edm::RefToBaseVector<T> > { typedef edm::RefToBaseVector<T> type; }; template <typename T> struct StoreContainerTrait<edm::PtrVector<T> > { typedef edm::PtrVector<T> type; }; template <typename R, typename C> struct StoreContainerTrait<edm::AssociationVector<R, C> > { typedef typename StoreContainerTrait<typename R::product_type>::type type; }; } // namespace helper #endif