/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
DataFormats/Common/interface/TriggerResults.h
90 строк
3 KB
Ivan Razumov
Fix Wdeprecated-copy warnings in DataFormats/Common (2nd attempt)
31 окт 2023, 11:44
31 окт 2023, 11:44
4a674dc
Код
Авторство
О чём код?
#ifndef DataFormats_Common_TriggerResults_h #define DataFormats_Common_TriggerResults_h /** \class edm::TriggerResults * * Original Authors: Jim Kowalkowski 13-01-06 * Martin Grunewald * * The trigger path results are maintained here as a sequence of * entries, one per trigger path. They are assigned in the order * they appeared in the process-level pset. (They are actually * stored in the base class HLTGlobalStatus) * * The ParameterSetID can be used to get a ParameterSet from * the registry of parameter sets. This ParameterSet contains * a vector<string> named "trigger_paths" that contains the * trigger path names in the same order as the trigger path * results stored here. * * The vector<string> contained in this class is empty and * no longer used. It is kept for backward compatibility reasons. * In early versions of the code, the trigger results paths names * were stored there. * */ #include "DataFormats/Common/interface/HLTGlobalStatus.h" #include "DataFormats/Common/interface/traits.h" #include "DataFormats/Provenance/interface/ParameterSetID.h" #include <string> #include <vector> namespace edm { class TriggerResults : public HLTGlobalStatus, public DoNotRecordParents { typedef std::vector<std::string> Strings; private: /// Parameter set id edm::ParameterSetID psetid_; /// Not used anymore Strings names_; public: /// Trivial contructor TriggerResults() : HLTGlobalStatus(), psetid_(), names_() {} /// Standard contructor TriggerResults(const HLTGlobalStatus& hlt, const edm::ParameterSetID& psetid) : HLTGlobalStatus(hlt), psetid_(psetid), names_() {} /// Not used anymore TriggerResults(const HLTGlobalStatus& hlt, const Strings& names) : HLTGlobalStatus(hlt), psetid_(), names_(names) {} /// Get stored parameter set id const ParameterSetID& parameterSetID() const { return psetid_; } /// swap function void swap(TriggerResults& other) { this->HLTGlobalStatus::swap(other); psetid_.swap(other.psetid_); // next line not used any more names_.swap(other.names_); } // The next three functions are OBSOLETE and should only be used for backward // compatibility to older data. The names_ vector is always empty in new data. /// Obsolete const std::vector<std::string>& getTriggerNames() const { return names_; } /// Obsolete const std::string& name(unsigned int i) const { return names_.at(i); } /// Obsolete unsigned int find(const std::string& name) const { const unsigned int n(size()); for (unsigned int i = 0; i != n; ++i) if (names_[i] == name) return i; return n; } }; // Free swap function inline void swap(TriggerResults& lhs, TriggerResults& rhs) { lhs.swap(rhs); } } // namespace edm #endif