Commit 397fb700 authored by Alejandro Homs Puron's avatar Alejandro Homs Puron Committed by Operator for ID00
Browse files

Add milli_volt capability to Camera::Model::getDACInfo

parent 93d54fe1
......@@ -87,7 +87,8 @@ public:
virtual void getPixelSize(double& x_size, double& y_size) = 0;
virtual void getDACInfo(NameList& name_list,
IntList& idx_list) = 0;
IntList& idx_list,
IntList& milli_volt_list) = 0;
virtual void getADCInfo(NameList& name_list,
IntList& idx_list,
FloatList& factor_list,
......
......@@ -119,7 +119,8 @@ class Eiger : public Camera::Model
virtual std::string getName();
virtual void getPixelSize(double& x_size, double& y_size);
virtual void getDACInfo(NameList& name_list, IntList& idx_list);
virtual void getDACInfo(NameList& name_list, IntList& idx_list,
IntList& milli_volt_list);
virtual void getADCInfo(NameList& name_list, IntList& idx_list,
FloatList& factor_list,
FloatList& min_val_list);
......
......@@ -61,7 +61,8 @@ public:
virtual
void getDACInfo(std::vector<std::string>& name_list /Out/,
std::vector<int>& idx_list /Out/) = 0;
std::vector<int>& idx_list /Out/,
std::vector<int>& milli_volt_list /Out/) = 0;
virtual
void getADCInfo(std::vector<std::string>& name_list /Out/,
std::vector<int>& idx_list /Out/,
......
......@@ -53,7 +53,8 @@ class Eiger : public SlsDetector::Camera::Model
virtual void getPixelSize(double& x_size /Out/, double& y_size /Out/);
virtual void getDACInfo(std::vector<std::string>& name_list /Out/,
std::vector<int>& idx_list /Out/);
std::vector<int>& idx_list /Out/,
std::vector<int>& milli_volt_list /Out/);
virtual void getADCInfo(std::vector<std::string>& name_list /Out/,
std::vector<int>& idx_list /Out/,
std::vector<double>& factor_list /Out/,
......
......@@ -306,41 +306,50 @@ void Eiger::getPixelSize(double& x_size, double& y_size)
DEB_RETURN() << DEB_VAR2(x_size, y_size);
}
void Eiger::getDACInfo(NameList& name_list, IntList& idx_list)
void Eiger::getDACInfo(NameList& name_list, IntList& idx_list,
IntList& milli_volt_list)
{
DEB_MEMBER_FUNCT();
static DACIndex EigerDACList[] = {
Threshold,
EigerSvP,
EigerSvN,
EigerVtr,
EigerVrf,
EigerVrs,
EigerVtgstv,
EigerVcmpLL,
EigerVcmpLR,
EigerVcal,
EigerVcmpRL,
EigerVcmpRR,
EigerRxbRB,
EigerRxbLB,
EigerVcp,
EigerVcn,
EigerVis,
IODelay,
HVNew,
#define EIGER_DAC_MV(x) {x, 1}
#define EIGER_DAC_OTHER(x) {x, 0}
static struct DACData {
DACIndex idx;
int milli_volt;
} EigerDACList[] = {
EIGER_DAC_MV(EigerSvP),
EIGER_DAC_MV(EigerSvN),
EIGER_DAC_MV(EigerVrf),
EIGER_DAC_MV(EigerVrs),
EIGER_DAC_MV(EigerVtr),
EIGER_DAC_MV(EigerVtgstv),
EIGER_DAC_MV(EigerVcal),
EIGER_DAC_MV(EigerVcp),
EIGER_DAC_MV(EigerVcn),
EIGER_DAC_MV(EigerVis),
EIGER_DAC_MV(EigerVcmpLL),
EIGER_DAC_MV(EigerVcmpLR),
EIGER_DAC_MV(EigerVcmpRL),
EIGER_DAC_MV(EigerVcmpRR),
EIGER_DAC_MV(EigerRxbLB),
EIGER_DAC_MV(EigerRxbRB),
EIGER_DAC_MV(Threshold),
EIGER_DAC_OTHER(IODelay),
EIGER_DAC_OTHER(HVNew),
};
const unsigned int size = C_LIST_SIZE(EigerDACList);
name_list.resize(size);
idx_list.resize(size);
DACIndex *idx = EigerDACList;
for (unsigned int i = 0; i < size; ++i, ++idx) {
milli_volt_list.resize(size);
struct DACData *data = EigerDACList;
for (unsigned int i = 0; i < size; ++i, ++data) {
ostringstream os;
os << *idx;
os << data->idx;
name_list[i] = os.str();
idx_list[i] = int(*idx);
idx_list[i] = int(data->idx);
milli_volt_list[i] = data->milli_volt;
DEB_RETURN() << DEB_VAR2(name_list[i], idx_list[i]);
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment