CMS 3D CMS Logo

PixelChannel.h
Go to the documentation of this file.
1 #ifndef PixelChannel_h
2 #define PixelChannel_h
3 
9 #include <string>
10 #include <iostream>
13 
14 // class holding module name and TBM channel ("A" or "B") associated with a channel
15 
16 namespace pos {
21  class PixelChannel {
22  public:
23  PixelChannel() { ; }
26  PixelChannel(std::string name); // takes a name of the form produced by channelname()
27 
28  const PixelModuleName& module() const { return module_; }
29  std::string modulename() const { return module_.modulename(); }
30  const PixelTBMChannel& TBMChannel() const { return TBMChannel_; }
32 
33  std::string channelname() const;
34 
35  // allows for use of find() function in a map of PixelChannels
36  const bool operator<(const PixelChannel& aChannel) const {
37  return (module_ < aChannel.module_ || (module_ == aChannel.module_ && TBMChannel_ < aChannel.TBMChannel_));
38  }
39 
40  const bool operator==(const PixelChannel& aChannel) const {
41  return (module_ == aChannel.module_ && TBMChannel_ == aChannel.TBMChannel_);
42  }
43 
44  private:
47  };
48 
49  std::ostream& operator<<(std::ostream& s, const PixelChannel& channel);
50 } // namespace pos
51 
52 #endif
PixelModuleName module_
Definition: PixelChannel.h:45
std::string string() const
Simple class to hold either "A" or "B" for the TBM channel.
const PixelTBMChannel & TBMChannel() const
Definition: PixelChannel.h:30
std::string channelname() const
Definition: PixelChannel.cc:22
std::ostream & operator<<(std::ostream &s, const PixelCalibConfiguration &calib)
const bool operator==(const PixelChannel &aChannel) const
Definition: PixelChannel.h:40
This class implements..
const bool operator<(const PixelChannel &aChannel) const
Definition: PixelChannel.h:36
std::string TBMChannelString() const
Definition: PixelChannel.h:31
std::string modulename() const
std::string modulename() const
Definition: PixelChannel.h:29
const PixelModuleName & module() const
Definition: PixelChannel.h:28
PixelTBMChannel TBMChannel_
Definition: PixelChannel.h:46
This class implements..
Simple class to hold either "A" or "B" for the TBM channel.