#include <PixelDACScanRange.h>
Public Member Functions | |
unsigned int | dacchannel () const |
unsigned int | first () const |
unsigned int | getNPoints () const |
unsigned int | index () const |
unsigned int | last () const |
bool | mixValuesAcrossROCs () const |
std::string | name () const |
bool | negative () const |
PixelDACScanRange (std::string dacname, unsigned int first, unsigned int last, unsigned int step, unsigned int index, bool mixValuesAcrossROCs) | |
PixelDACScanRange () | |
PixelDACScanRange (std::string name, std::vector< unsigned int > values, unsigned int index, bool mixValuesAcrossROCs) | |
bool | relative () const |
void | setNegative () |
void | setRelative () |
unsigned int | step () const |
bool | uniformSteps () const |
unsigned int | value (unsigned int ivalue) const |
std::vector< unsigned int > | values () const |
Private Member Functions | |
void | setDACChannel (std::string name) |
Private Attributes | |
unsigned int | dacchannel_ |
unsigned int | first_ |
unsigned int | index_ |
unsigned int | last_ |
bool | mixValuesAcrossROCs_ |
std::string | name_ |
bool | negative_ |
bool | relative_ |
unsigned int | step_ |
bool | uniformSteps_ |
std::vector< unsigned int > | values_ |
Definition at line 26 of file PixelDACScanRange.h.
pos::PixelDACScanRange::PixelDACScanRange | ( | ) | [inline] |
Definition at line 30 of file PixelDACScanRange.h.
{;}
PixelDACScanRange::PixelDACScanRange | ( | std::string | dacname, |
unsigned int | first, | ||
unsigned int | last, | ||
unsigned int | step, | ||
unsigned int | index, | ||
bool | mixValuesAcrossROCs | ||
) |
Definition at line 16 of file PixelDACScanRange.cc.
References first(), first_, index(), index_, last(), last_, mixValuesAcrossROCs(), mixValuesAcrossROCs_, name(), name_, negative_, relative_, setDACChannel(), step(), step_, uniformSteps_, and values_.
{ uniformSteps_=true; relative_=false; negative_=false; first_=first; last_=last; step_=step; name_=name; index_=index; mixValuesAcrossROCs_=mixValuesAcrossROCs; if (first_==last_) assert( mixValuesAcrossROCs==false ); while(first<=last){ values_.push_back(first); first+=step; //FIXME should have a better reporting assert(values_.size()<1000); } setDACChannel(name); }
PixelDACScanRange::PixelDACScanRange | ( | std::string | name, |
std::vector< unsigned int > | values, | ||
unsigned int | index, | ||
bool | mixValuesAcrossROCs | ||
) |
Definition at line 43 of file PixelDACScanRange.cc.
References mixValuesAcrossROCs(), mixValuesAcrossROCs_, name(), name_, negative_, relative_, setDACChannel(), uniformSteps_, values(), and values_.
{ uniformSteps_=false; relative_=false; negative_=false; name_=name; values_=values; mixValuesAcrossROCs_=mixValuesAcrossROCs; assert( mixValuesAcrossROCs==false ); setDACChannel(name); }
unsigned int pos::PixelDACScanRange::dacchannel | ( | ) | const [inline] |
unsigned int pos::PixelDACScanRange::first | ( | ) | const [inline] |
Definition at line 41 of file PixelDACScanRange.h.
References first_, and uniformSteps_.
Referenced by PixelDACScanRange().
{ assert(uniformSteps_); return first_; }
unsigned int pos::PixelDACScanRange::getNPoints | ( | ) | const [inline] |
unsigned int pos::PixelDACScanRange::index | ( | ) | const [inline] |
Definition at line 43 of file PixelDACScanRange.h.
References index_.
Referenced by PixelDACScanRange().
{ return index_; }
unsigned int pos::PixelDACScanRange::last | ( | ) | const [inline] |
Definition at line 42 of file PixelDACScanRange.h.
References last_, and uniformSteps_.
Referenced by PixelDACScanRange().
{ assert(uniformSteps_); return last_; }
bool pos::PixelDACScanRange::mixValuesAcrossROCs | ( | ) | const [inline] |
Definition at line 46 of file PixelDACScanRange.h.
References mixValuesAcrossROCs_.
Referenced by PixelDACScanRange().
{ return mixValuesAcrossROCs_; }
std::string pos::PixelDACScanRange::name | ( | ) | const [inline] |
Definition at line 38 of file PixelDACScanRange.h.
References name_.
Referenced by PixelDACScanRange().
{ return name_;}
bool pos::PixelDACScanRange::negative | ( | ) | const [inline] |
bool pos::PixelDACScanRange::relative | ( | ) | const [inline] |
void PixelDACScanRange::setDACChannel | ( | std::string | name | ) | [private] |
Definition at line 61 of file PixelDACScanRange.cc.
References gather_cfg::cout, dacchannel_, pos::k_DACAddress_CalDel, pos::k_DACAddress_ChipContReg, pos::k_DACAddress_Vana, pos::k_DACAddress_VbiasOp, pos::k_DACAddress_Vcal, pos::k_DACAddress_Vcomp, pos::k_DACAddress_VcThr, pos::k_DACAddress_Vdd, pos::k_DACAddress_VHldDel, pos::k_DACAddress_VIbias_bus, pos::k_DACAddress_VIbias_DAC, pos::k_DACAddress_VIbias_PH, pos::k_DACAddress_VIbias_roc, pos::k_DACAddress_VIbias_sf, pos::k_DACAddress_VIColOr, pos::k_DACAddress_VIon, pos::k_DACAddress_Vleak, pos::k_DACAddress_Vnpix, pos::k_DACAddress_VOffsetOp, pos::k_DACAddress_VOffsetRO, pos::k_DACAddress_VrgPr, pos::k_DACAddress_VrgSh, pos::k_DACAddress_Vsf, pos::k_DACAddress_VsumCol, pos::k_DACAddress_Vtrim, pos::k_DACAddress_VwllPr, pos::k_DACAddress_VwllSh, pos::k_DACAddress_WBC, pos::k_DACName_CalDel, pos::k_DACName_ChipContReg, pos::k_DACName_Vana, pos::k_DACName_VbiasOp, pos::k_DACName_Vcal, pos::k_DACName_Vcomp, pos::k_DACName_VcThr, pos::k_DACName_Vdd, pos::k_DACName_VHldDel, pos::k_DACName_VIbias_bus, pos::k_DACName_VIbias_DAC, pos::k_DACName_VIbias_PH, pos::k_DACName_VIbias_roc, pos::k_DACName_VIbias_sf, pos::k_DACName_VIColOr, pos::k_DACName_VIon, pos::k_DACName_Vleak, pos::k_DACName_Vnpix, pos::k_DACName_VOffsetOp, pos::k_DACName_VOffsetRO, pos::k_DACName_VrgPr, pos::k_DACName_VrgSh, pos::k_DACName_Vsf, pos::k_DACName_VsumCol, pos::k_DACName_Vtrim, pos::k_DACName_VwllPr, pos::k_DACName_VwllSh, and pos::k_DACName_WBC.
Referenced by PixelDACScanRange().
{ if (name==pos::k_DACName_Vdd) { dacchannel_=pos::k_DACAddress_Vdd ; } else if (name==pos::k_DACName_Vana) { dacchannel_=pos::k_DACAddress_Vana ; } else if (name==pos::k_DACName_Vsf) { dacchannel_=pos::k_DACAddress_Vsf ; } else if (name==pos::k_DACName_Vcomp) { dacchannel_=pos::k_DACAddress_Vcomp ; } else if (name==pos::k_DACName_Vleak) { dacchannel_=pos::k_DACAddress_Vleak ; } else if (name==pos::k_DACName_VrgPr) { dacchannel_=pos::k_DACAddress_VrgPr ; } else if (name==pos::k_DACName_VwllPr) { dacchannel_=pos::k_DACAddress_VwllPr ; } else if (name==pos::k_DACName_VrgSh) { dacchannel_=pos::k_DACAddress_VrgSh ; } else if (name==pos::k_DACName_VwllSh) { dacchannel_=pos::k_DACAddress_VwllSh ; } else if (name==pos::k_DACName_VHldDel) { dacchannel_=pos::k_DACAddress_VHldDel ; } else if (name==pos::k_DACName_Vtrim) { dacchannel_=pos::k_DACAddress_Vtrim ; } else if (name==pos::k_DACName_VcThr) { dacchannel_=pos::k_DACAddress_VcThr ; } else if (name==pos::k_DACName_VIbias_bus) { dacchannel_=pos::k_DACAddress_VIbias_bus ; } else if (name==pos::k_DACName_VIbias_sf) { dacchannel_=pos::k_DACAddress_VIbias_sf ; } else if (name==pos::k_DACName_VOffsetOp) { dacchannel_=pos::k_DACAddress_VOffsetOp ; } else if (name==pos::k_DACName_VbiasOp) { dacchannel_=pos::k_DACAddress_VbiasOp ; } else if (name==pos::k_DACName_VOffsetRO) { dacchannel_=pos::k_DACAddress_VOffsetRO ; } else if (name==pos::k_DACName_VIon) { dacchannel_=pos::k_DACAddress_VIon ; } else if (name==pos::k_DACName_VIbias_PH) { dacchannel_=pos::k_DACAddress_VIbias_PH ; } else if (name==pos::k_DACName_VIbias_DAC) { dacchannel_=pos::k_DACAddress_VIbias_DAC ; } else if (name==pos::k_DACName_VIbias_roc) { dacchannel_=pos::k_DACAddress_VIbias_roc ; } else if (name==pos::k_DACName_VIColOr) { dacchannel_=pos::k_DACAddress_VIColOr ; } else if (name==pos::k_DACName_Vnpix) { dacchannel_=pos::k_DACAddress_Vnpix ; } else if (name==pos::k_DACName_VsumCol) { dacchannel_=pos::k_DACAddress_VsumCol ; } else if (name==pos::k_DACName_Vcal) { dacchannel_=pos::k_DACAddress_Vcal ; } else if (name==pos::k_DACName_CalDel) { dacchannel_=pos::k_DACAddress_CalDel ; } else if (name==pos::k_DACName_WBC) { dacchannel_=pos::k_DACAddress_WBC ; } else if (name==pos::k_DACName_ChipContReg) { dacchannel_=pos::k_DACAddress_ChipContReg ; } else { std::cout << __LINE__ << "]\t[PixelDACScanRange::setDACChannel()]\t\t\t " << "The dac name: " << name << " is unknown!" << std::endl; assert(0); } }
void pos::PixelDACScanRange::setNegative | ( | ) | [inline] |
Definition at line 50 of file PixelDACScanRange.h.
References negative_.
Referenced by pos::PixelCalibConfiguration::PixelCalibConfiguration().
{ negative_=true; }
void pos::PixelDACScanRange::setRelative | ( | ) | [inline] |
Definition at line 48 of file PixelDACScanRange.h.
References relative_.
Referenced by pos::PixelCalibConfiguration::PixelCalibConfiguration().
{ relative_=true; }
unsigned int pos::PixelDACScanRange::step | ( | ) | const [inline] |
Definition at line 40 of file PixelDACScanRange.h.
References step_, and uniformSteps_.
Referenced by PixelDACScanRange().
{ assert(uniformSteps_); return step_; }
bool pos::PixelDACScanRange::uniformSteps | ( | ) | const [inline] |
Definition at line 47 of file PixelDACScanRange.h.
References uniformSteps_.
{ return uniformSteps_; }
unsigned int pos::PixelDACScanRange::value | ( | unsigned int | ivalue | ) | const [inline] |
Definition at line 45 of file PixelDACScanRange.h.
References values_.
std::vector<unsigned int> pos::PixelDACScanRange::values | ( | ) | const [inline] |
Definition at line 53 of file PixelDACScanRange.h.
References values_.
Referenced by PixelDACScanRange().
{ return values_; }
unsigned int pos::PixelDACScanRange::dacchannel_ [private] |
Definition at line 61 of file PixelDACScanRange.h.
Referenced by dacchannel(), and setDACChannel().
unsigned int pos::PixelDACScanRange::first_ [private] |
Definition at line 63 of file PixelDACScanRange.h.
Referenced by first(), and PixelDACScanRange().
unsigned int pos::PixelDACScanRange::index_ [private] |
Definition at line 67 of file PixelDACScanRange.h.
Referenced by index(), and PixelDACScanRange().
unsigned int pos::PixelDACScanRange::last_ [private] |
Definition at line 64 of file PixelDACScanRange.h.
Referenced by last(), and PixelDACScanRange().
bool pos::PixelDACScanRange::mixValuesAcrossROCs_ [private] |
Definition at line 69 of file PixelDACScanRange.h.
Referenced by mixValuesAcrossROCs(), and PixelDACScanRange().
std::string pos::PixelDACScanRange::name_ [private] |
Definition at line 60 of file PixelDACScanRange.h.
Referenced by name(), and PixelDACScanRange().
bool pos::PixelDACScanRange::negative_ [private] |
Definition at line 75 of file PixelDACScanRange.h.
Referenced by negative(), PixelDACScanRange(), and setNegative().
bool pos::PixelDACScanRange::relative_ [private] |
Definition at line 71 of file PixelDACScanRange.h.
Referenced by PixelDACScanRange(), relative(), and setRelative().
unsigned int pos::PixelDACScanRange::step_ [private] |
Definition at line 65 of file PixelDACScanRange.h.
Referenced by PixelDACScanRange(), and step().
bool pos::PixelDACScanRange::uniformSteps_ [private] |
Definition at line 62 of file PixelDACScanRange.h.
Referenced by first(), last(), PixelDACScanRange(), step(), and uniformSteps().
std::vector<unsigned int> pos::PixelDACScanRange::values_ [private] |
Definition at line 66 of file PixelDACScanRange.h.
Referenced by getNPoints(), PixelDACScanRange(), value(), and values().