/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
CalibFormats/SiPixelObjects/interface/PixelChannel.h
52 строки
2 KB
Cms Build
Clang-Format
20 май 2019, 13:01
20 май 2019, 13:01
125ebea
Код
Авторство
О чём код?
#ifndef PixelChannel_h #define PixelChannel_h /*! \file CalibFormats/SiPixelObjects/interface/PixelChannel.h * \brief This class implements... * * A longer explanation will be placed here later */ #include <string> #include <iostream> #include "CalibFormats/SiPixelObjects/interface/PixelModuleName.h" #include "CalibFormats/SiPixelObjects/interface/PixelTBMChannel.h" // class holding module name and TBM channel ("A" or "B") associated with a channel namespace pos { /*! \class PixelChannel PixelChannel.h "interface/PixelChannel.h" * * A longer explanation will be placed here later */ class PixelChannel { public: PixelChannel() { ; } PixelChannel(PixelModuleName module, std::string TBMChannel); PixelChannel(PixelModuleName module, PixelTBMChannel TBMChannel); PixelChannel(std::string name); // takes a name of the form produced by channelname() const PixelModuleName& module() const { return module_; } std::string modulename() const { return module_.modulename(); } const PixelTBMChannel& TBMChannel() const { return TBMChannel_; } std::string TBMChannelString() const { return TBMChannel_.string(); } std::string channelname() const; // allows for use of find() function in a map of PixelChannels const bool operator<(const PixelChannel& aChannel) const { return (module_ < aChannel.module_ || (module_ == aChannel.module_ && TBMChannel_ < aChannel.TBMChannel_)); } const bool operator==(const PixelChannel& aChannel) const { return (module_ == aChannel.module_ && TBMChannel_ == aChannel.TBMChannel_); } private: PixelModuleName module_; PixelTBMChannel TBMChannel_; }; std::ostream& operator<<(std::ostream& s, const PixelChannel& channel); } // namespace pos #endif