Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef CondFormats_PCLConfig_AlignPCLThresholdsHG_h
0002 #define CondFormats_PCLConfig_AlignPCLThresholdsHG_h
0003 
0004 #include "CondFormats/PCLConfig/interface/AlignPCLThresholds.h"
0005 #include "CondFormats/Serialization/interface/Serializable.h"
0006 
0007 #include <map>
0008 #include <string>
0009 #include <vector>
0010 
0011 class AlignPCLThresholdsHG : public AlignPCLThresholds {
0012 public:
0013   typedef std::unordered_map<std::string, std::vector<float>> param_map;
0014   AlignPCLThresholdsHG() {}
0015 
0016   enum FloatParamIndex {
0017     FRACTION_CUT_X = 0,
0018     FRACTION_CUT_Y = 1,
0019     FRACTION_CUT_Z = 2,
0020     FRACTION_CUT_TX = 3,
0021     FRACTION_CUT_TY = 4,
0022     FRACTION_CUT_TZ = 5,
0023     FSIZE = 6
0024   };
0025 
0026   enum IntParamIndex { ISIZE = 0 };
0027   enum StringParamIndex { SSIZE = 0 };
0028 
0029   void setFloatMap(const param_map &floatMap);
0030   void setFractionCut(const std::string &AlignableId, const coordType &type, const float &cut);
0031 
0032   const param_map &getFloatMap() const { return floatMap_; }
0033   const std::vector<float> &getFloatVec(const std::string &AlignableId) const;
0034 
0035   float getFractionCut(const std::string &AlignableId, const coordType &type) const;
0036   std::array<float, 6> getFractionCut(const std::string &AlignableId) const;
0037 
0038   const bool hasFloatMap(const std::string &AlignableId) const;
0039 
0040   const int payloadVersion() const;
0041 
0042   void printAll() const;
0043 
0044   ~AlignPCLThresholdsHG() override = default;
0045 
0046 private:
0047   param_map floatMap_;
0048   // yet unused, but kept for possible extensions
0049   std::unordered_map<std::string, std::vector<int>> intMap_;
0050   std::unordered_map<std::string, std::vector<std::string>> stringMap_;
0051 
0052   COND_SERIALIZABLE;
0053 };
0054 
0055 #endif