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{
22  {
23  public:
24 
27  PixelChannel(PixelModuleName module, PixelTBMChannel TBMChannel);
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_; }
34 
35  std::string channelname() const;
36 
37  // allows for use of find() function in a map of PixelChannels
38  const bool operator<(const PixelChannel& aChannel) const{
39  return (module_<aChannel.module_ || (module_==aChannel.module_ && TBMChannel_ < aChannel.TBMChannel_) );
40  }
41 
42  const bool operator==(const PixelChannel& aChannel) const{
43  return (module_==aChannel.module_ && TBMChannel_==aChannel.TBMChannel_);
44  }
45 
46  private:
49  };
50 
51  std::ostream& operator<<(std::ostream& s, const PixelChannel& channel);
52 }
53 
54 #endif
PixelModuleName module_
Definition: PixelChannel.h:47
std::string modulename() const
Definition: PixelChannel.h:31
Simple class to hold either "A" or "B" for the TBM channel.
const PixelModuleName & module() const
Definition: PixelChannel.h:30
std::string TBMChannelString() const
Definition: PixelChannel.h:33
std::ostream & operator<<(std::ostream &s, const PixelCalibConfiguration &calib)
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:42
std::string modulename() const
PixelTBMChannel TBMChannel_
Definition: PixelChannel.h:48
This class implements..
const bool operator<(const PixelChannel &aChannel) const
Definition: PixelChannel.h:38
Simple class to hold either "A" or "B" for the TBM channel.
Definition: vlib.h:208