CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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{
22  {
23  public:
24 
28  PixelChannel(std::string name); // takes a name of the form produced by channelname()
29 
30  const PixelModuleName& module() const { return module_; }
31  std::string modulename() const { return module_.modulename(); }
32  const PixelTBMChannel& TBMChannel() const { return TBMChannel_; }
33  std::string TBMChannelString() const { return TBMChannel_.string(); }
34 
35  std::string channelname() const;
36 
37  friend std::ostream& operator<<(std::ostream& s, const PixelChannel& channel);
38 
39  // allows for use of find() function in a map of PixelChannels
40  const bool operator<(const PixelChannel& aChannel) const{
41  return (module_<aChannel.module_ || (module_==aChannel.module_ && TBMChannel_ < aChannel.TBMChannel_) );
42  }
43 
44  const bool operator==(const PixelChannel& aChannel) const{
45  return (module_==aChannel.module_ && TBMChannel_==aChannel.TBMChannel_);
46  }
47 
48  private:
51  };
52 }
53 
54 #endif
PixelModuleName module_
Definition: PixelChannel.h:49
std::string modulename() const
Definition: PixelChannel.h:31
Simple class to hold either &quot;A&quot; or &quot;B&quot; for the TBM channel.
const PixelModuleName & module() const
Definition: PixelChannel.h:30
std::string TBMChannelString() const
Definition: PixelChannel.h:33
This class implements..
std::string channelname() const
Definition: PixelChannel.cc:27
std::string string() const
const PixelTBMChannel & TBMChannel() const
Definition: PixelChannel.h:32
const bool operator==(const PixelChannel &aChannel) const
Definition: PixelChannel.h:44
std::string modulename() const
PixelTBMChannel TBMChannel_
Definition: PixelChannel.h:50
This class implements..
const bool operator<(const PixelChannel &aChannel) const
Definition: PixelChannel.h:40
Simple class to hold either &quot;A&quot; or &quot;B&quot; for the TBM channel.
friend std::ostream & operator<<(std::ostream &s, const PixelChannel &channel)
string s
Definition: asciidump.py:422
Definition: vlib.h:209