mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-22 22:40:02 +02:00
some more changes in savesettings for gotthard and loadsettings
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@259 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
parent
8ed87df48f
commit
7b058c55cf
@ -5107,12 +5107,12 @@ int slsDetector::loadSettingsFile(string fname, int imod) {
|
|||||||
ostfn << ".sn" << setfill('0') << setw(3) << hex << getId(MODULE_SERIAL_NUMBER, im);
|
ostfn << ".sn" << setfill('0') << setw(3) << hex << getId(MODULE_SERIAL_NUMBER, im);
|
||||||
fn=ostfn.str();
|
fn=ostfn.str();
|
||||||
}
|
}
|
||||||
//settings is saved in myMod.reg for gotthard
|
|
||||||
if(thisDetector->myDetectorType==GOTTHARD)
|
|
||||||
myMod->reg=thisDetector->currentSettings;
|
|
||||||
myMod=readSettingsFile(fn, thisDetector->myDetectorType);
|
myMod=readSettingsFile(fn, thisDetector->myDetectorType);
|
||||||
if (myMod) {
|
if (myMod) {
|
||||||
myMod->module=im;
|
myMod->module=im;
|
||||||
|
//settings is saved in myMod.reg for gotthard
|
||||||
|
if(thisDetector->myDetectorType==GOTTHARD)
|
||||||
|
myMod->reg=thisDetector->currentSettings;
|
||||||
setModule(*myMod);
|
setModule(*myMod);
|
||||||
deleteModule(myMod);
|
deleteModule(myMod);
|
||||||
} else
|
} else
|
||||||
|
@ -288,6 +288,7 @@ int energyConversion::writeSettingsFile(string fname, detectorType myDetectorTyp
|
|||||||
outfile << names[idac] << " " << iv << std::endl;
|
outfile << names[idac] << " " << iv << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(myDetectorType!=GOTTHARD){
|
||||||
for (ichip=0; ichip<mod.nchip; ichip++) {
|
for (ichip=0; ichip<mod.nchip; ichip++) {
|
||||||
iv1=mod.chipregs[ichip]&1;
|
iv1=mod.chipregs[ichip]&1;
|
||||||
outfile << names[idac] << " " << iv1 << std::endl;
|
outfile << names[idac] << " " << iv1 << std::endl;
|
||||||
@ -312,6 +313,7 @@ int energyConversion::writeSettingsFile(string fname, detectorType myDetectorTyp
|
|||||||
outfile << iv1 << std::endl;
|
outfile << iv1 << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
outfile.close();
|
outfile.close();
|
||||||
return OK;
|
return OK;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user