CMS 3D CMS Logo

PixelDACScanRange.h

Go to the documentation of this file.
00001 #ifndef PixelDACScanRange_h
00002 #define PixelDACScanRange_h
00003 
00008 //
00009 // This class collects the information
00010 // about the range of DAC settings used
00011 // in scans of the DACs.
00012 //
00013 //
00014 //
00015 
00016 #include <string>
00017 #include <vector>
00018 
00019 namespace pos{
00025   class PixelDACScanRange {
00026 
00027   public:
00028 
00029     PixelDACScanRange(){;}
00030     PixelDACScanRange(std::string dacname, unsigned int first, 
00031                       unsigned int last, unsigned int step,
00032                       unsigned int index, bool mixValuesAcrossROCs);
00033     PixelDACScanRange(std::string name, 
00034                       std::vector<unsigned int> values,
00035                       unsigned int index, bool mixValuesAcrossROCs);
00036 
00037     std::string name() const { return name_;}
00038     unsigned int dacchannel() const { return dacchannel_; }
00039     unsigned int step() const { assert(uniformSteps_); return step_; }
00040     unsigned int first() const { assert(uniformSteps_); return first_; }
00041     unsigned int last() const { assert(uniformSteps_); return last_; }
00042     unsigned int index() const { return index_; }
00043     unsigned int getNPoints() const { return values_.size(); }
00044     unsigned int value(unsigned int ivalue) const { assert(ivalue<values_.size()); return values_[ivalue]; }
00045     bool mixValuesAcrossROCs() const { return mixValuesAcrossROCs_; }
00046     bool uniformSteps() const { return uniformSteps_; }
00047     void setRelative() { relative_=true; }
00048     bool relative() const { return relative_; }
00049     void setNegative() { negative_=true; }
00050     bool negative() const { return negative_; }
00051 
00052     std::vector<unsigned int> values() const { return values_; }
00053 
00054   private:
00055 
00056     void setDACChannel(std::string name);
00057 
00058 
00059     std::string name_;
00060     unsigned int dacchannel_;
00061     bool uniformSteps_;
00062     unsigned int first_;
00063     unsigned int last_;
00064     unsigned int step_;
00065     std::vector<unsigned int> values_;
00066     unsigned int index_;
00067 
00068     bool mixValuesAcrossROCs_; // whether to spread the DAC values across the entire range on each iteration for different ROCs on a channel
00069 
00070     bool relative_; //Only to be used with 'SetRelative' and indicates that the
00071                     //value specified should apply a change to the default
00072                     //dac setting.
00073 
00074     bool negative_; //Used to flag that relative value is negative
00075 
00076   };
00077 }
00078 #endif

Generated on Tue Jun 9 17:25:23 2009 for CMSSW by  doxygen 1.5.4