Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:51:37

0001 #ifndef CondFormats_SiStripObjects_FedCablingAnalysis_H
0002 #define CondFormats_SiStripObjects_FedCablingAnalysis_H
0003 
0004 #include "CondFormats/SiStripObjects/interface/CommissioningAnalysis.h"
0005 #include "DataFormats/SiStripCommon/interface/SiStripConstants.h"
0006 #include <sstream>
0007 #include <vector>
0008 #include <map>
0009 #include <cstdint>
0010 
0011 /** 
0012    @class FedCablingAnalysis
0013    @author R.Bainbridge
0014    @brief Histogram-based analysis for connection loop.
0015 */
0016 class FedCablingAnalysis : public CommissioningAnalysis {
0017 public:
0018   // ---------- con(de)structors and typedefs ----------
0019 
0020   FedCablingAnalysis(const uint32_t& key);
0021 
0022   FedCablingAnalysis();
0023 
0024   ~FedCablingAnalysis() override { ; }
0025 
0026   typedef std::map<uint32_t, uint16_t> Candidates;
0027 
0028   friend class FedCablingAlgorithm;
0029 
0030   // ---------- public interface ----------
0031 
0032   /** Identifies if analysis is valid or not. */
0033   bool isValid() const override;
0034 
0035   /** FED id. */
0036   inline const uint16_t& fedId() const;
0037 
0038   /** FED channel. */
0039   inline const uint16_t& fedCh() const;
0040 
0041   /** Light level [ADC]. */
0042   inline const float& adcLevel() const;
0043 
0044   /** Container for candidate connections. */
0045   inline const Candidates& candidates() const;
0046 
0047   // ---------- misc ----------
0048 
0049   /** Prints analysis results. */
0050   void print(std::stringstream&, uint32_t not_used = 0) override;
0051 
0052   /** Resets analysis member data. */
0053   void reset() override;
0054 
0055   // ---------- public static data ----------
0056 
0057 public:
0058   /** Threshold to identify candidate connections. */
0059   static const float threshold_;
0060 
0061   // ---------- private member data ----------
0062 
0063 private:
0064   /** FED id */
0065   uint16_t fedId_;
0066 
0067   /** FED channel */
0068   uint16_t fedCh_;
0069 
0070   /** Light level [ADC]. */
0071   float adcLevel_;
0072 
0073   /** Container for candidate connections. */
0074   Candidates candidates_;
0075 };
0076 
0077 // ---------- Inline methods ----------
0078 
0079 const uint16_t& FedCablingAnalysis::fedId() const { return fedId_; }
0080 const uint16_t& FedCablingAnalysis::fedCh() const { return fedCh_; }
0081 const float& FedCablingAnalysis::adcLevel() const { return adcLevel_; }
0082 const FedCablingAnalysis::Candidates& FedCablingAnalysis::candidates() const { return candidates_; }
0083 
0084 #endif  // CondFormats_SiStripObjects_FedCablingAnalysis_H