File indexing completed on 2024-04-06 11:58:12
0001 #ifndef PixelDACScanRange_h
0002 #define PixelDACScanRange_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #include <string>
0017 #include <vector>
0018 #include <cassert>
0019
0020 namespace pos {
0021
0022
0023
0024
0025
0026 class PixelDACScanRange {
0027 public:
0028 PixelDACScanRange() { ; }
0029 PixelDACScanRange(std::string dacname,
0030 unsigned int first,
0031 unsigned int last,
0032 unsigned int step,
0033 unsigned int index,
0034 bool mixValuesAcrossROCs);
0035 PixelDACScanRange(std::string name,
0036 const std::vector<unsigned int>& values,
0037 unsigned int index,
0038 bool mixValuesAcrossROCs);
0039
0040 std::string name() const { return name_; }
0041 unsigned int dacchannel() const { return dacchannel_; }
0042 unsigned int step() const {
0043 assert(uniformSteps_);
0044 return step_;
0045 }
0046 unsigned int first() const {
0047 assert(uniformSteps_);
0048 return first_;
0049 }
0050 unsigned int last() const {
0051 assert(uniformSteps_);
0052 return last_;
0053 }
0054 unsigned int index() const { return index_; }
0055 unsigned int getNPoints() const { return values_.size(); }
0056 unsigned int value(unsigned int ivalue) const {
0057 assert(ivalue < values_.size());
0058 return values_[ivalue];
0059 }
0060 bool mixValuesAcrossROCs() const { return mixValuesAcrossROCs_; }
0061 bool uniformSteps() const { return uniformSteps_; }
0062 void setRelative() { relative_ = true; }
0063 bool relative() const { return relative_; }
0064 void setNegative() { negative_ = true; }
0065 bool negative() const { return negative_; }
0066
0067 std::vector<unsigned int> values() const { return values_; }
0068
0069 private:
0070 void setDACChannel(std::string name);
0071
0072 std::string name_;
0073 unsigned int dacchannel_;
0074 bool uniformSteps_;
0075 unsigned int first_;
0076 unsigned int last_;
0077 unsigned int step_;
0078 std::vector<unsigned int> values_;
0079 unsigned int index_;
0080
0081 bool mixValuesAcrossROCs_;
0082
0083 bool relative_;
0084
0085
0086
0087 bool negative_;
0088 };
0089 }
0090 #endif