/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
CondFormats/EcalObjects/interface/EcalWeight.h
40 строк
1 KB
Cms Build
Clang-Format
22 май 2019, 04:56
22 май 2019, 04:56
28f175a
Код
Авторство
О чём код?
#ifndef CondFormats_EcalObjects_EcalWeight_H #define CondFormats_EcalObjects_EcalWeight_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<EcalWeight> * **/ #include <iostream> class EcalWeight { public: EcalWeight(); EcalWeight(const double& awgt); EcalWeight(const EcalWeight& awgt); EcalWeight& operator=(const EcalWeight& rhs); double value() const { return wgt_; } double operator()() const { return wgt_; } void setValue(const double& awgt) { wgt_ = awgt; } bool operator==(const EcalWeight& rhs) const { return (wgt_ == rhs.wgt_); } bool operator!=(const EcalWeight& rhs) const { return (wgt_ != rhs.wgt_); } bool operator<(const EcalWeight& rhs) const { return (wgt_ < rhs.wgt_); } bool operator>(const EcalWeight& rhs) const { return (wgt_ > rhs.wgt_); } bool operator<=(const EcalWeight& rhs) const { return (wgt_ <= rhs.wgt_); } bool operator>=(const EcalWeight& rhs) const { return (wgt_ >= rhs.wgt_); } private: double wgt_; }; //std::ostream& operator<<(std::ostream& os, const EcalWeight& wg) { // return os << wg.value(); //} #endif