00001 #ifndef CondFormats_SiStripObjects_ApvTimingAnalysis_H 00002 #define CondFormats_SiStripObjects_ApvTimingAnalysis_H 00003 00004 #include "CondFormats/SiStripObjects/interface/CommissioningAnalysis.h" 00005 #include "DataFormats/SiStripCommon/interface/SiStripConstants.h" 00006 #include <boost/cstdint.hpp> 00007 #include <sstream> 00008 #include <vector> 00009 00015 class ApvTimingAnalysis : public CommissioningAnalysis { 00016 00017 public: 00018 00019 // ---------- con(de)structors ---------- 00020 00021 ApvTimingAnalysis( const uint32_t& key ); 00022 00023 ApvTimingAnalysis(); 00024 00025 virtual ~ApvTimingAnalysis() {;} 00026 00027 friend class ApvTimingAlgorithm; 00028 00029 // ---------- public interface ---------- 00030 00032 bool isValid() const; 00033 00035 bool foundTickMark() const; 00036 00038 inline const float& time() const; 00039 00041 inline const float& error() const; 00042 00044 inline const float& optimumSamplingPoint() const; 00045 00047 inline const float& refTime() const; 00048 00050 void refTime( const float& time ); 00051 00053 inline const float& delay() const; 00054 00056 inline const float& height() const; 00057 00059 inline const float& base() const; 00060 00062 inline const float& peak() const; 00063 00065 uint16_t frameFindingThreshold() const; 00066 00067 // ---------- misc ---------- 00068 00070 void print( std::stringstream&, uint32_t not_used = 0 ); 00071 00073 inline void addErrorCode( const std::string& error ); 00074 00076 void reset(); 00077 00078 // ---------- public static data ---------- 00079 00081 static const float optimumSamplingPoint_; 00082 00084 static const float tickMarkHeightThreshold_; 00085 00087 static const float frameFindingThreshold_; 00088 00089 // ---------- private member data ---------- 00090 00091 private: 00092 00094 float time_; 00095 00097 float error_; 00098 00100 static float refTime_; 00101 00103 float delay_; 00104 00106 float height_; 00107 00109 float base_; 00110 00112 float peak_; 00113 00115 bool synchronized_; 00116 00117 }; 00118 00119 // ---------- Inline methods ---------- 00120 00121 const float& ApvTimingAnalysis::time() const { return time_; } 00122 const float& ApvTimingAnalysis::error() const { return error_; } 00123 const float& ApvTimingAnalysis::optimumSamplingPoint() const { return optimumSamplingPoint_; } 00124 const float& ApvTimingAnalysis::refTime() const { return refTime_; } 00125 const float& ApvTimingAnalysis::delay() const { return delay_; } 00126 const float& ApvTimingAnalysis::height() const { return height_; } 00127 const float& ApvTimingAnalysis::base() const { return base_; } 00128 const float& ApvTimingAnalysis::peak() const { return peak_; } 00129 void ApvTimingAnalysis::addErrorCode( const std::string& error ) { CommissioningAnalysis::addErrorCode(error) ;} 00130 00131 #endif // CondFormats_SiStripObjects_ApvTimingAnalysis_H 00132 00133 00134