CMS 3D CMS Logo

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 
00011 class SiStripDigi {
00012 
00013  public:
00014 
00015   SiStripDigi( const uint16_t& strip, 
00016              const uint16_t& adc ) : 
00017     strip_(strip), 
00018     adc_(adc) {;}
00019   
00020   SiStripDigi() : strip_(0), adc_(0) {;}
00021   ~SiStripDigi() {;}
00022   
00023   inline const uint16_t& strip() const;
00024   inline const uint16_t& adc() const;
00025   inline const uint16_t& channel() const;
00026 
00027   inline bool operator< ( const SiStripDigi& other ) const;
00028   
00029  private:
00030   
00031   uint16_t strip_;
00032   uint16_t adc_;
00033   
00034 };
00035 
00036 #include<iostream>
00037 inline std::ostream & operator<<(std::ostream & o, const SiStripDigi& digi) {
00038   return o << " " << digi.strip()
00039            << " " << digi.adc();
00040 }
00041 
00042 // inline methods
00043 const uint16_t& SiStripDigi::strip() const { return strip_; }
00044 const uint16_t& SiStripDigi::adc() const { return adc_; }
00045 const uint16_t& SiStripDigi::channel() const { return strip(); }
00046 bool SiStripDigi::operator< ( const SiStripDigi& other ) const { return strip() < other.strip(); }
00047 
00048 #endif // DataFormats_SiStripDigi_SiStripDigi_H
00049 
00050 
00051 

Generated on Tue Jun 9 17:31:46 2009 for CMSSW by  doxygen 1.5.4