CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 modulename() const
Definition: PixelChannel.h:29
Simple class to hold either &quot;A&quot; or &quot;B&quot; for the TBM channel.
const PixelModuleName & module() const
Definition: PixelChannel.h:28
std::string TBMChannelString() const
Definition: PixelChannel.h:31
std::ostream & operator<<(std::ostream &s, const PixelCalibConfiguration &calib)
This class implements..
std::string channelname() const
Definition: PixelChannel.cc:22
std::string string() const
const PixelTBMChannel & TBMChannel() const
Definition: PixelChannel.h:30
const bool operator==(const PixelChannel &aChannel) const
Definition: PixelChannel.h:40
std::string modulename() const
PixelTBMChannel TBMChannel_
Definition: PixelChannel.h:46
This class implements..
const bool operator<(const PixelChannel &aChannel) const
Definition: PixelChannel.h:36
Simple class to hold either &quot;A&quot; or &quot;B&quot; for the TBM channel.