/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
CondFormats/PCLConfig/interface/AlignPCLThresholdsHG.h
55 строк
2 KB
Danilo Meuser
Use typedef map in new Threshold object
20 июн 2022, 16:30
20 июн 2022, 16:30
830554d
Код
Авторство
О чём код?
#ifndef CondFormats_PCLConfig_AlignPCLThresholdsHG_h #define CondFormats_PCLConfig_AlignPCLThresholdsHG_h #include "CondFormats/PCLConfig/interface/AlignPCLThresholds.h" #include "CondFormats/Serialization/interface/Serializable.h" #include <map> #include <string> #include <vector> class AlignPCLThresholdsHG : public AlignPCLThresholds { public: typedef std::unordered_map<std::string, std::vector<float>> param_map; AlignPCLThresholdsHG() {} enum FloatParamIndex { FRACTION_CUT_X = 0, FRACTION_CUT_Y = 1, FRACTION_CUT_Z = 2, FRACTION_CUT_TX = 3, FRACTION_CUT_TY = 4, FRACTION_CUT_TZ = 5, FSIZE = 6 }; enum IntParamIndex { ISIZE = 0 }; enum StringParamIndex { SSIZE = 0 }; void setFloatMap(const param_map &floatMap); void setFractionCut(const std::string &AlignableId, const coordType &type, const float &cut); const param_map &getFloatMap() const { return floatMap_; } const std::vector<float> &getFloatVec(const std::string &AlignableId) const; float getFractionCut(const std::string &AlignableId, const coordType &type) const; std::array<float, 6> getFractionCut(const std::string &AlignableId) const; const bool hasFloatMap(const std::string &AlignableId) const; const int payloadVersion() const; void printAll() const; ~AlignPCLThresholdsHG() override = default; private: param_map floatMap_; // yet unused, but kept for possible extensions std::unordered_map<std::string, std::vector<int>> intMap_; std::unordered_map<std::string, std::vector<std::string>> stringMap_; COND_SERIALIZABLE; }; #endif