File indexing completed on 2024-04-06 11:58:12
0001 #ifndef PixelChannel_h
0002 #define PixelChannel_h
0003
0004
0005
0006
0007
0008
0009 #include <string>
0010 #include <iostream>
0011 #include "CalibFormats/SiPixelObjects/interface/PixelModuleName.h"
0012 #include "CalibFormats/SiPixelObjects/interface/PixelTBMChannel.h"
0013
0014
0015
0016 namespace pos {
0017
0018
0019
0020
0021 class PixelChannel {
0022 public:
0023 PixelChannel() { ; }
0024 PixelChannel(PixelModuleName module, std::string TBMChannel);
0025 PixelChannel(PixelModuleName module, PixelTBMChannel TBMChannel);
0026 PixelChannel(std::string name);
0027
0028 const PixelModuleName& module() const { return module_; }
0029 std::string modulename() const { return module_.modulename(); }
0030 const PixelTBMChannel& TBMChannel() const { return TBMChannel_; }
0031 std::string TBMChannelString() const { return TBMChannel_.string(); }
0032
0033 std::string channelname() const;
0034
0035
0036 const bool operator<(const PixelChannel& aChannel) const {
0037 return (module_ < aChannel.module_ || (module_ == aChannel.module_ && TBMChannel_ < aChannel.TBMChannel_));
0038 }
0039
0040 const bool operator==(const PixelChannel& aChannel) const {
0041 return (module_ == aChannel.module_ && TBMChannel_ == aChannel.TBMChannel_);
0042 }
0043
0044 private:
0045 PixelModuleName module_;
0046 PixelTBMChannel TBMChannel_;
0047 };
0048
0049 std::ostream& operator<<(std::ostream& s, const PixelChannel& channel);
0050 }
0051
0052 #endif