CMS 3D CMS Logo

PixelDACScanRange.h
Go to the documentation of this file.
1 #ifndef PixelDACScanRange_h
2 #define PixelDACScanRange_h
3 
8 //
9 // This class collects the information
10 // about the range of DAC settings used
11 // in scans of the DACs.
12 //
13 //
14 //
15 
16 #include <string>
17 #include <vector>
18 #include <cassert>
19 
20 namespace pos {
27  public:
30  unsigned int first,
31  unsigned int last,
32  unsigned int step,
33  unsigned int index,
34  bool mixValuesAcrossROCs);
36  const std::vector<unsigned int>& values,
37  unsigned int index,
38  bool mixValuesAcrossROCs);
39 
40  std::string name() const { return name_; }
41  unsigned int dacchannel() const { return dacchannel_; }
42  unsigned int step() const {
43  assert(uniformSteps_);
44  return step_;
45  }
46  unsigned int first() const {
47  assert(uniformSteps_);
48  return first_;
49  }
50  unsigned int last() const {
51  assert(uniformSteps_);
52  return last_;
53  }
54  unsigned int index() const { return index_; }
55  unsigned int getNPoints() const { return values_.size(); }
56  unsigned int value(unsigned int ivalue) const {
57  assert(ivalue < values_.size());
58  return values_[ivalue];
59  }
60  bool mixValuesAcrossROCs() const { return mixValuesAcrossROCs_; }
61  bool uniformSteps() const { return uniformSteps_; }
62  void setRelative() { relative_ = true; }
63  bool relative() const { return relative_; }
64  void setNegative() { negative_ = true; }
65  bool negative() const { return negative_; }
66 
67  std::vector<unsigned int> values() const { return values_; }
68 
69  private:
70  void setDACChannel(std::string name);
71 
73  unsigned int dacchannel_;
75  unsigned int first_;
76  unsigned int last_;
77  unsigned int step_;
78  std::vector<unsigned int> values_;
79  unsigned int index_;
80 
81  bool mixValuesAcrossROCs_; // whether to spread the DAC values across the entire range on each iteration for different ROCs on a channel
82 
83  bool relative_; //Only to be used with 'SetRelative' and indicates that the
84  //value specified should apply a change to the default
85  //dac setting.
86 
87  bool negative_; //Used to flag that relative value is negative
88  };
89 } // namespace pos
90 #endif
std::vector< unsigned int > values_
unsigned int last() const
unsigned int dacchannel() const
bool mixValuesAcrossROCs() const
unsigned int getNPoints() const
std::string name() const
unsigned int first() const
unsigned int step() const
std::vector< unsigned int > values() const
void setDACChannel(std::string name)
unsigned int value(unsigned int ivalue) const
step
Definition: StallMonitor.cc:94
unsigned int index() const