/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
CondFormats/ESObjects/interface/ESWeight.h
40 строк
1 KB
Cms Build
Clang-Format
20 май 2019, 13:01
20 май 2019, 13:01
a27185a
Код
Авторство
О чём код?
#ifndef CondFormats_ESObjects_ESWeight_H #define CondFormats_ESObjects_ESWeight_H /** * Author: Shahram Rahatlou, University of Rome & INFN * This is workaround in order to be able to use vector<double> * for ECAL weights. because of a conflict I need to define this trivial class * so that I can use POOL to store vector<ESWeight> * **/ #include <iostream> class ESWeight { public: ESWeight(); ESWeight(const double& awgt); ESWeight(const ESWeight& awgt); ESWeight& operator=(const ESWeight& rhs); double value() const { return wgt_; } double operator()() const { return wgt_; } void setValue(const double& awgt) { wgt_ = awgt; } bool operator==(const ESWeight& rhs) const { return (wgt_ == rhs.wgt_); } bool operator!=(const ESWeight& rhs) const { return (wgt_ != rhs.wgt_); } bool operator<(const ESWeight& rhs) const { return (wgt_ < rhs.wgt_); } bool operator>(const ESWeight& rhs) const { return (wgt_ > rhs.wgt_); } bool operator<=(const ESWeight& rhs) const { return (wgt_ <= rhs.wgt_); } bool operator>=(const ESWeight& rhs) const { return (wgt_ >= rhs.wgt_); } private: double wgt_; }; //std::ostream& operator<<(std::ostream& os, const ESWeight& wg) { // return os << wg.value(); //} #endif