Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:02:39

0001 #ifndef CondFormats_SiStripObjects_VpspScanAnalysis_H
0002 #define CondFormats_SiStripObjects_VpspScanAnalysis_H
0003 
0004 #include "CondFormats/SiStripObjects/interface/CommissioningAnalysis.h"
0005 #include "DataFormats/SiStripCommon/interface/SiStripConstants.h"
0006 #include <sstream>
0007 #include <vector>
0008 #include <cstdint>
0009 
0010 /** 
0011    @class VpspScanAnalysis
0012    @author M. Wingham, R.Bainbridge
0013    @brief Histogram-based analysis for VPSP scan.
0014 */
0015 class VpspScanAnalysis : public CommissioningAnalysis {
0016 public:
0017   // ---------- con(de)structors ----------
0018 
0019   VpspScanAnalysis(const uint32_t& key);
0020 
0021   VpspScanAnalysis();
0022 
0023   ~VpspScanAnalysis() override { ; }
0024 
0025   friend class VpspScanAlgorithm;
0026 
0027   // ---------- public interface ----------
0028 
0029   /** Identifies if analysis is valid or not. */
0030   bool isValid() const override;
0031 
0032   /** VPSP settings for both APVs. */
0033   inline const VInt& vpsp() const;
0034 
0035   /** Signal levels [ADC] for VPSP settings. */
0036   inline const VInt& adcLevel() const;
0037 
0038   /** Not used. */
0039   inline const VInt& fraction() const;
0040 
0041   /** VPSP setting where baseline leaves "D1" level. */
0042   inline const VInt& topEdge() const;
0043 
0044   /** VPSP setting where baseline leaves "D0" level. */
0045   inline const VInt& bottomEdge() const;
0046 
0047   /** Signal level [ADC] for "digital one". */
0048   inline const VInt& topLevel() const;
0049 
0050   /** Signal level [ADC] for "digital zero". */
0051   inline const VInt& bottomLevel() const;
0052 
0053   // ---------- misc ----------
0054 
0055   /** Prints analysis results. */
0056   void print(std::stringstream&, uint32_t not_used = 0) override;
0057 
0058   /** Overrides base method. */
0059   void summary(std::stringstream&) const override;
0060 
0061   /** Resets analysis member data. */
0062   void reset() override;
0063 
0064   // ---------- private member data ----------
0065 
0066 private:
0067   /** VPSP settings */
0068   VInt vpsp_;
0069 
0070   VInt adcLevel_;
0071 
0072   VInt fraction_;
0073 
0074   VInt topEdge_;
0075 
0076   VInt bottomEdge_;
0077 
0078   VInt topLevel_;
0079 
0080   VInt bottomLevel_;
0081 };
0082 
0083 // ---------- Inline methods ----------
0084 
0085 const VpspScanAnalysis::VInt& VpspScanAnalysis::vpsp() const { return vpsp_; }
0086 const VpspScanAnalysis::VInt& VpspScanAnalysis::adcLevel() const { return adcLevel_; }
0087 const VpspScanAnalysis::VInt& VpspScanAnalysis::fraction() const { return fraction_; }
0088 const VpspScanAnalysis::VInt& VpspScanAnalysis::topEdge() const { return topEdge_; }
0089 const VpspScanAnalysis::VInt& VpspScanAnalysis::bottomEdge() const { return bottomEdge_; }
0090 const VpspScanAnalysis::VInt& VpspScanAnalysis::topLevel() const { return topLevel_; }
0091 const VpspScanAnalysis::VInt& VpspScanAnalysis::bottomLevel() const { return bottomLevel_; }
0092 
0093 #endif  // CondFormats_SiStripObjects_VpspScanAnalysis_H