/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
CondFormats/HcalObjects/src/HcalLinearCompositionFunctor.cc
17 строк
737 B
David
move away from boost shared_ptrs
23 авг 2019, 16:53
23 авг 2019, 16:53
12ff73e
Код
Авторство
О чём код?
#include "FWCore/Utilities/interface/Exception.h" #include "CondFormats/HcalObjects/interface/HcalLinearCompositionFunctor.h" HcalLinearCompositionFunctor::HcalLinearCompositionFunctor(std::shared_ptr<AbsHcalFunctor> p, const double ia, const double ib) : other_(p), a_(ia), b_(ib) { if (!other_.get()) throw cms::Exception( "In HcalLinearCompositionFunctor constructor: " "can not use a null pointer to another functor"); } double HcalLinearCompositionFunctor::operator()(const double x) const { return a_ * (*other_)(x) + b_; } BOOST_CLASS_EXPORT_IMPLEMENT(HcalLinearCompositionFunctor)