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 {
44  return step_;
45  }
46  unsigned int first() const {
48  return first_;
49  }
50  unsigned int last() const {
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:
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
pos::PixelDACScanRange::negative_
bool negative_
Definition: PixelDACScanRange.h:87
pos::PixelDACScanRange
Definition: PixelDACScanRange.h:26
pos::PixelDACScanRange::relative_
bool relative_
Definition: PixelDACScanRange.h:83
pos::PixelDACScanRange::setDACChannel
void setDACChannel(std::string name)
Definition: PixelDACScanRange.cc:61
step
step
Definition: StallMonitor.cc:94
pos::PixelDACScanRange::index_
unsigned int index_
Definition: PixelDACScanRange.h:79
pos::PixelDACScanRange::setNegative
void setNegative()
Definition: PixelDACScanRange.h:64
pos
Definition: PixelAliasList.h:18
pos::PixelDACScanRange::getNPoints
unsigned int getNPoints() const
Definition: PixelDACScanRange.h:55
pos::PixelDACScanRange::value
unsigned int value(unsigned int ivalue) const
Definition: PixelDACScanRange.h:56
cms::cuda::assert
assert(be >=bs)
pos::PixelDACScanRange::dacchannel_
unsigned int dacchannel_
Definition: PixelDACScanRange.h:73
pos::PixelDACScanRange::step_
unsigned int step_
Definition: PixelDACScanRange.h:77
pos::PixelDACScanRange::dacchannel
unsigned int dacchannel() const
Definition: PixelDACScanRange.h:41
pos::PixelDACScanRange::name
std::string name() const
Definition: PixelDACScanRange.h:40
pos::PixelDACScanRange::uniformSteps
bool uniformSteps() const
Definition: PixelDACScanRange.h:61
pos::PixelDACScanRange::setRelative
void setRelative()
Definition: PixelDACScanRange.h:62
pos::PixelDACScanRange::last
unsigned int last() const
Definition: PixelDACScanRange.h:50
pos::PixelDACScanRange::values
std::vector< unsigned int > values() const
Definition: PixelDACScanRange.h:67
pos::PixelDACScanRange::uniformSteps_
bool uniformSteps_
Definition: PixelDACScanRange.h:74
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
pos::PixelDACScanRange::step
unsigned int step() const
Definition: PixelDACScanRange.h:42
pos::PixelDACScanRange::name_
std::string name_
Definition: PixelDACScanRange.h:72
pos::PixelDACScanRange::mixValuesAcrossROCs
bool mixValuesAcrossROCs() const
Definition: PixelDACScanRange.h:60
pos::PixelDACScanRange::negative
bool negative() const
Definition: PixelDACScanRange.h:65
pos::PixelDACScanRange::relative
bool relative() const
Definition: PixelDACScanRange.h:63
pos::PixelDACScanRange::last_
unsigned int last_
Definition: PixelDACScanRange.h:76
pos::PixelDACScanRange::first_
unsigned int first_
Definition: PixelDACScanRange.h:75
pos::PixelDACScanRange::values_
std::vector< unsigned int > values_
Definition: PixelDACScanRange.h:78
pos::PixelDACScanRange::mixValuesAcrossROCs_
bool mixValuesAcrossROCs_
Definition: PixelDACScanRange.h:81
testProducerWithPsetDescEmpty_cfi.ivalue
ivalue
Definition: testProducerWithPsetDescEmpty_cfi.py:21
pos::PixelDACScanRange::PixelDACScanRange
PixelDACScanRange()
Definition: PixelDACScanRange.h:28
pos::PixelDACScanRange::index
unsigned int index() const
Definition: PixelDACScanRange.h:54
pos::PixelDACScanRange::first
unsigned int first() const
Definition: PixelDACScanRange.h:46