CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_1/src/DataFormats/SiStripDigi/interface/SiStripDigi.h

Go to the documentation of this file.
00001 #ifndef DataFormats_SiStripDigi_SiStripDigi_H
00002 #define DataFormats_SiStripDigi_SiStripDigi_H
00003 
00004 #include "boost/cstdint.hpp"
00005 #include <iosfwd>
00006 
00012 class SiStripDigi {
00013 
00014  public:
00015 
00016   SiStripDigi( const uint16_t& strip, 
00017              const uint16_t& adc ) : 
00018     strip_(strip), 
00019     adc_(adc) {;}
00020   
00021   SiStripDigi() : strip_(0), adc_(0) {;}
00022   ~SiStripDigi() {;}
00023   
00024   inline const uint16_t& strip() const;
00025   inline const uint16_t& adc() const;
00026   inline const uint16_t& channel() const;
00027 
00028   inline bool operator< ( const SiStripDigi& other ) const;
00029   
00030  private:
00031   
00032   uint16_t strip_;
00033   uint16_t adc_;
00034   
00035 };
00036 
00037 std::ostream & operator<<(std::ostream & o, const SiStripDigi& digi);
00038 
00039 // inline methods
00040 const uint16_t& SiStripDigi::strip() const { return strip_; }
00041 const uint16_t& SiStripDigi::adc() const { return adc_; }
00042 const uint16_t& SiStripDigi::channel() const { return strip(); }
00043 bool SiStripDigi::operator< ( const SiStripDigi& other ) const { return strip() < other.strip(); }
00044 
00045 #endif // DataFormats_SiStripDigi_SiStripDigi_H
00046 
00047 
00048