CMS 3D CMS Logo

PixelModuleName.h
Go to the documentation of this file.
1 #ifndef SiPixelDetId_PixelModuleName_H
2 #define SiPixelDetId_PixelModuleName_H
3 
4 #include <string>
5 #include <iostream>
6 #include <cstdint>
7 
13 public:
15 
16  PixelModuleName(bool isBarrel) : barrel(isBarrel) {}
17  virtual ~PixelModuleName() {}
18 
20  virtual bool isBarrel() const { return barrel; }
21 
22  static bool isBarrel(uint32_t rawDetId) { return (1 == ((rawDetId >> 25) & 0x7)); }
23 
25  virtual std::string name() const = 0;
26 
28  virtual ModuleType moduleType() const = 0;
29 
31  virtual bool operator==(const PixelModuleName&) const = 0;
32 
33 private:
34  bool barrel;
35 };
36 
37 std::ostream& operator<<(std::ostream& out, const PixelModuleName::ModuleType& t);
38 #endif
virtual std::string name() const =0
associated name
static bool isBarrel(uint32_t rawDetId)
std::ostream & operator<<(std::ostream &out, const PixelModuleName::ModuleType &t)
PixelModuleName(bool isBarrel)
virtual bool operator==(const PixelModuleName &) const =0
check equality of modules
virtual ~PixelModuleName()
virtual bool isBarrel() const
true for barrel modules
virtual ModuleType moduleType() const =0
module type