CMS 3D CMS Logo

SiStripDigi.h
Go to the documentation of this file.
1 #ifndef DataFormats_SiStripDigi_SiStripDigi_H
2 #define DataFormats_SiStripDigi_SiStripDigi_H
3 
4 #include "boost/cstdint.hpp"
5 #include <iosfwd>
6 
12 class SiStripDigi {
13 
14  public:
15 
16  SiStripDigi( const uint16_t& strip,
17  const uint16_t& adc ) :
18  strip_(strip),
19  adc_(adc) {;}
20 
21  SiStripDigi() : strip_(0), adc_(0) {;}
23 
24  inline const uint16_t& strip() const;
25  inline const uint16_t& adc() const;
26  inline const uint16_t& channel() const;
27 
28  inline bool operator< ( const SiStripDigi& other ) const;
29 
30  private:
31 
32  uint16_t strip_;
33  uint16_t adc_;
34 
35 };
36 
37 std::ostream & operator<<(std::ostream & o, const SiStripDigi& digi);
38 
39 // inline methods
40 const uint16_t& SiStripDigi::strip() const { return strip_; }
41 const uint16_t& SiStripDigi::adc() const { return adc_; }
42 const uint16_t& SiStripDigi::channel() const { return strip(); }
43 bool SiStripDigi::operator< ( const SiStripDigi& other ) const { return strip() < other.strip(); }
44 
45 #endif // DataFormats_SiStripDigi_SiStripDigi_H
46 
47 
48 
std::ostream & operator<<(std::ostream &o, const SiStripDigi &digi)
Definition: SiStripDigi.cc:3
const uint16_t & strip() const
Definition: SiStripDigi.h:40
bool operator<(const SiStripDigi &other) const
Definition: SiStripDigi.h:43
A Digi for the silicon strip detector, containing both strip and adc information, and suitable for st...
Definition: SiStripDigi.h:12
uint16_t strip_
Definition: SiStripDigi.h:32
uint16_t adc_
Definition: SiStripDigi.h:33
SiStripDigi(const uint16_t &strip, const uint16_t &adc)
Definition: SiStripDigi.h:16
const uint16_t & adc() const
Definition: SiStripDigi.h:41
const uint16_t & channel() const
Definition: SiStripDigi.h:42