CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
28  public:
29 
31  PixelDACScanRange(std::string dacname, unsigned int first,
32  unsigned int last, unsigned int step,
33  unsigned int index, bool mixValuesAcrossROCs);
34  PixelDACScanRange(std::string name,
35  std::vector<unsigned int> values,
36  unsigned int index, bool mixValuesAcrossROCs);
37 
38  std::string name() const { return name_;}
39  unsigned int dacchannel() const { return dacchannel_; }
40  unsigned int step() const { assert(uniformSteps_); return step_; }
41  unsigned int first() const { assert(uniformSteps_); return first_; }
42  unsigned int last() const { assert(uniformSteps_); return last_; }
43  unsigned int index() const { return index_; }
44  unsigned int getNPoints() const { return values_.size(); }
45  unsigned int value(unsigned int ivalue) const { assert(ivalue<values_.size()); return values_[ivalue]; }
46  bool mixValuesAcrossROCs() const { return mixValuesAcrossROCs_; }
47  bool uniformSteps() const { return uniformSteps_; }
48  void setRelative() { relative_=true; }
49  bool relative() const { return relative_; }
50  void setNegative() { negative_=true; }
51  bool negative() const { return negative_; }
52 
53  std::vector<unsigned int> values() const { return values_; }
54 
55  private:
56 
57  void setDACChannel(std::string name);
58 
59 
60  std::string name_;
61  unsigned int dacchannel_;
63  unsigned int first_;
64  unsigned int last_;
65  unsigned int step_;
66  std::vector<unsigned int> values_;
67  unsigned int index_;
68 
69  bool mixValuesAcrossROCs_; // whether to spread the DAC values across the entire range on each iteration for different ROCs on a channel
70 
71  bool relative_; //Only to be used with 'SetRelative' and indicates that the
72  //value specified should apply a change to the default
73  //dac setting.
74 
75  bool negative_; //Used to flag that relative value is negative
76 
77  };
78 }
79 #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
unsigned int index() const