Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:05:15

0001 #ifndef AnalysisDataFormats_SiStripDigi_SiStripProcessedRawDigi_H
0002 #define AnalysisDataFormats_SiStripDigi_SiStripProcessedRawDigi_H
0003 
0004 #include "DataFormats/Common/interface/traits.h"
0005 
0006 /** 
0007     @brief A signed Digi for the silicon strip detector, containing
0008     only adc information, and suitable for storing processed
0009     (pedestal, cmn subtracted) hit information. NOTA BENE: these digis
0010     use the DetSetVector, but the public inheritence from
0011     edm::DoNotSortUponInsertion ensures that the digis are NOT sorted
0012     by the DetSetVector::post_insert() method. The strip position is
0013     therefore inferred from the position of the digi within its
0014     container (the DetSet private vector).
0015 */
0016 class SiStripProcessedRawDigi : public edm::DoNotSortUponInsertion {
0017 public:
0018   SiStripProcessedRawDigi(const float& adc) : adc_(adc) { ; }
0019 
0020   SiStripProcessedRawDigi() : adc_(0) { ; }
0021   ~SiStripProcessedRawDigi() { ; }
0022 
0023   inline const float& adc() const;
0024 
0025   /** Not used! (even if implementation is required). */
0026   inline bool operator<(const SiStripProcessedRawDigi& other) const;
0027 
0028 private:
0029   float adc_;
0030 };
0031 
0032 #include <iostream>
0033 inline std::ostream& operator<<(std::ostream& o, const SiStripProcessedRawDigi& digi) { return o << " " << digi.adc(); }
0034 
0035 // inline methods
0036 const float& SiStripProcessedRawDigi::adc() const { return adc_; }
0037 bool SiStripProcessedRawDigi::operator<(const SiStripProcessedRawDigi& other) const {
0038   return (this->adc() < other.adc());
0039 }
0040 
0041 #endif  // AnalysisDataFormats_SiStripDigi_SiStripProcessedRawDigi_H