/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Alignment/Geners/interface/ArrayReference.hh
48 строк
2 KB
Giulio Eulisse
Snapshot of CMSSW_6_2_0_pre8.
26 июн 2013, 18:12
26 июн 2013, 18:12
214ab73
Код
Авторство
О чём код?
#ifndef GENERS_ARRAYREFERENCE_HH_ #define GENERS_ARRAYREFERENCE_HH_ #include <cstddef> #include "Alignment/Geners/interface/AbsReference.hh" namespace gs { template <typename T> class ArrayReference : public AbsReference { public: inline ArrayReference(AbsArchive& ar, const unsigned long long itemId) : AbsReference(ar, ClassId::makeId<T>(), "gs::Array", itemId) {} inline ArrayReference(AbsArchive& ar, const char* name, const char* category) : AbsReference(ar, ClassId::makeId<T>(), "gs::Array", name, category) {} inline ArrayReference(AbsArchive& ar, const SearchSpecifier& namePattern, const SearchSpecifier& categoryPattern) : AbsReference(ar, ClassId::makeId<T>(), "gs::Array", namePattern, categoryPattern) {} // There is only one method to retrieve an array void restore(unsigned long idx, T* arr, std::size_t len) const; private: ArrayReference(); }; } #include "Alignment/Geners/interface/GenericIO.hh" namespace gs { template <typename T> inline void ArrayReference<T>::restore(const unsigned long index, T* arr, const std::size_t len) const { const unsigned long long itemId = this->id(index); assert(itemId); read_array(this->positionInputStream(itemId), arr, len); } } #endif // GENERS_ARRAYREFERENCE_HH_