CMS 3D CMS Logo

PixelDACScanRange.cc
Go to the documentation of this file.
1 //
2 // This class collects the information
3 // about the range of DAC settings used
4 // in scans of the DACs.
5 //
6 //
7 //
8 
11 #include <iostream>
12 #include <cassert>
13 
14 using namespace pos;
15 
17  unsigned int first,
18  unsigned int last,
19  unsigned int step,
20  unsigned int index,
21  bool mixValuesAcrossROCs) {
22  uniformSteps_ = true;
23  relative_ = false;
24  negative_ = false;
25 
26  first_ = first;
27  last_ = last;
28  step_ = step;
29 
30  name_ = name;
31  index_ = index;
33  if (first_ == last_)
34  assert(mixValuesAcrossROCs == false);
35  while (first <= last) {
36  values_.push_back(first);
37  first += step;
38  //FIXME should have a better reporting
39  assert(values_.size() < 1000);
40  }
41 
43 }
44 
46  const std::vector<unsigned int>& values,
47  unsigned int index,
48  bool mixValuesAcrossROCs) {
49  uniformSteps_ = false;
50  relative_ = false;
51  negative_ = false;
52 
53  name_ = name;
54  values_ = values;
56  assert(mixValuesAcrossROCs == false);
57 
59 }
60 
62  if (name == pos::k_DACName_Vdd) {
64  } else if (name == pos::k_DACName_Vana) {
66  } else if (name == pos::k_DACName_Vsf) {
68  } else if (name == pos::k_DACName_Vcomp) {
70  } else if (name == pos::k_DACName_Vleak) {
72  } else if (name == pos::k_DACName_VrgPr) {
74  } else if (name == pos::k_DACName_VwllPr) {
76  } else if (name == pos::k_DACName_VrgSh) {
78  } else if (name == pos::k_DACName_VwllSh) {
80  } else if (name == pos::k_DACName_VHldDel) {
82  } else if (name == pos::k_DACName_Vtrim) {
84  } else if (name == pos::k_DACName_VcThr) {
86  } else if (name == pos::k_DACName_VIbias_bus) {
88  } else if (name == pos::k_DACName_VIbias_sf) {
90  } else if (name == pos::k_DACName_VOffsetOp) {
92  } else if (name == pos::k_DACName_VbiasOp) {
94  } else if (name == pos::k_DACName_VOffsetRO) {
96  } else if (name == pos::k_DACName_VIon) {
98  } else if (name == pos::k_DACName_VIbias_PH) {
100  } else if (name == pos::k_DACName_VIbias_DAC) {
102  } else if (name == pos::k_DACName_VIbias_roc) {
104  } else if (name == pos::k_DACName_VIColOr) {
106  } else if (name == pos::k_DACName_Vnpix) {
108  } else if (name == pos::k_DACName_VsumCol) {
110  } else if (name == pos::k_DACName_Vcal) {
112  } else if (name == pos::k_DACName_CalDel) {
114  } else if (name == pos::k_DACName_WBC) {
116  } else if (name == pos::k_DACName_ChipContReg) {
118  } else {
119  std::cout << __LINE__ << "]\t[PixelDACScanRange::setDACChannel()]\t\t\t "
120  << "The dac name: " << name << " is unknown!" << std::endl;
121  assert(0);
122  }
123 }
const std::string k_DACName_VcThr
Definition: PixelDACNames.h:24
const std::string k_DACName_VrgPr
Definition: PixelDACNames.h:18
const unsigned int k_DACAddress_VwllSh
Definition: PixelDACNames.h:51
const unsigned int k_DACAddress_VIbias_sf
Definition: PixelDACNames.h:56
const std::string k_DACName_ChipContReg
Definition: PixelDACNames.h:41
std::vector< unsigned int > values_
const unsigned int k_DACAddress_VIbias_DAC
Definition: PixelDACNames.h:62
const std::string k_DACName_Vsf
Definition: PixelDACNames.h:15
const std::string k_DACName_CalDel
Definition: PixelDACNames.h:38
const std::string k_DACName_VIbias_sf
Definition: PixelDACNames.h:26
const unsigned int k_DACAddress_WBC
Definition: PixelDACNames.h:70
const unsigned int k_DACAddress_VIon
Definition: PixelDACNames.h:60
const std::string k_DACName_Vtrim
Definition: PixelDACNames.h:23
const std::string k_DACName_VIbias_DAC
Definition: PixelDACNames.h:32
const std::string k_DACName_VwllSh
Definition: PixelDACNames.h:21
const std::string k_DACName_Vnpix
Definition: PixelDACNames.h:35
const std::string k_DACName_Vleak
Definition: PixelDACNames.h:17
const unsigned int k_DACAddress_VIbias_PH
Definition: PixelDACNames.h:61
const std::string k_DACName_VIbias_PH
Definition: PixelDACNames.h:31
const std::string k_DACName_VOffsetRO
Definition: PixelDACNames.h:29
const std::string k_DACName_VIbias_bus
Definition: PixelDACNames.h:25
assert(be >=bs)
const std::string k_DACName_VIColOr
Definition: PixelDACNames.h:34
const unsigned int k_DACAddress_Vsf
Definition: PixelDACNames.h:45
const unsigned int k_DACAddress_Vdd
Definition: PixelDACNames.h:43
const std::string k_DACName_VOffsetOp
Definition: PixelDACNames.h:27
unsigned int index() const
const unsigned int k_DACAddress_VHldDel
Definition: PixelDACNames.h:52
const unsigned int k_DACAddress_VIColOr
Definition: PixelDACNames.h:64
const unsigned int k_DACAddress_Vnpix
Definition: PixelDACNames.h:65
const unsigned int k_DACAddress_VrgSh
Definition: PixelDACNames.h:50
const unsigned int k_DACAddress_Vcomp
Definition: PixelDACNames.h:46
const unsigned int k_DACAddress_VOffsetRO
Definition: PixelDACNames.h:59
const std::string k_DACName_VbiasOp
Definition: PixelDACNames.h:28
const std::string k_DACName_VIbias_roc
Definition: PixelDACNames.h:33
const std::string k_DACName_Vcal
Definition: PixelDACNames.h:37
const unsigned int k_DACAddress_VsumCol
Definition: PixelDACNames.h:66
const unsigned int k_DACAddress_ChipContReg
Definition: PixelDACNames.h:71
std::vector< unsigned int > values() const
const std::string k_DACName_VrgSh
Definition: PixelDACNames.h:20
const std::string k_DACName_VIon
Definition: PixelDACNames.h:30
const unsigned int k_DACAddress_VcThr
Definition: PixelDACNames.h:54
const std::string k_DACName_Vcomp
Definition: PixelDACNames.h:16
const unsigned int k_DACAddress_Vleak
Definition: PixelDACNames.h:47
const std::string k_DACName_WBC
Definition: PixelDACNames.h:40
const std::string k_DACName_Vdd
Definition: PixelDACNames.h:13
const unsigned int k_DACAddress_VOffsetOp
Definition: PixelDACNames.h:57
const std::string k_DACName_VHldDel
Definition: PixelDACNames.h:22
std::string name() const
const unsigned int k_DACAddress_Vcal
Definition: PixelDACNames.h:67
unsigned int last() const
const unsigned int k_DACAddress_VbiasOp
Definition: PixelDACNames.h:58
const std::string k_DACName_VsumCol
Definition: PixelDACNames.h:36
void setDACChannel(std::string name)
const unsigned int k_DACAddress_VwllPr
Definition: PixelDACNames.h:49
unsigned int first() const
A dummy class with ALL public variables.
step
Definition: StallMonitor.cc:83
const unsigned int k_DACAddress_VrgPr
Definition: PixelDACNames.h:48
bool mixValuesAcrossROCs() const
const unsigned int k_DACAddress_Vana
Definition: PixelDACNames.h:44
const std::string k_DACName_Vana
Definition: PixelDACNames.h:14
const unsigned int k_DACAddress_Vtrim
Definition: PixelDACNames.h:53
const unsigned int k_DACAddress_CalDel
Definition: PixelDACNames.h:68
unsigned int step() const
const unsigned int k_DACAddress_VIbias_roc
Definition: PixelDACNames.h:63
const unsigned int k_DACAddress_VIbias_bus
Definition: PixelDACNames.h:55
const std::string k_DACName_VwllPr
Definition: PixelDACNames.h:19