Changeset 196 for drsdaq/HVFeedback.cc
- Timestamp:
- 04/01/10 16:08:50 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
drsdaq/HVFeedback.cc
r193 r196 79 79 80 80 // Initial state 81 Gain = ato i(m->GetConfig("DefaultGain"));81 Gain = atof(m->GetConfig("DefaultGain"));printf("Gain %d\n", Gain); 82 82 SetFBMode(FB_Off); 83 83 SetNumAverages(fDefaultNumAverage); … … 112 112 113 113 // Check for LED trigger channel on given channel and if feedback running 114 //if (FBMode==FB_Off || m->WaveForm[fLedTrigBoard][fLedTrigChip][fLedTrigChannel][(fLedTrigSample+m->TriggerCell[fLedTrigBoard][fLedTrigChip])%kNumberOfBins] < fLedTrigThreshold) {115 114 if (FBMode==FB_Off || m->WaveForm[fLedTrigBoard][fLedTrigChip][fLedTrigChannel][fLedTrigSample] < fLedTrigThreshold) { 116 115 return false; … … 153 152 Correction = -(Target[i][j][k] - Average[i][j][k])*Response[i][j][k]*Gain; 154 153 if (fabs(Correction) > 0.1) Correction = fabs(Correction)/Correction*0.1; // Limit changes to 100 mV 155 if(Correction==0 || Target[i][j][k] ==0 || PixMap->DRS_to_Pixel(i,j,k).empty()) break; 156 154 if(Correction==0 || Target[i][j][k]==0 || PixMap->DRS_to_Pixel(i,j,k).empty()) break; 157 155 printf("Average of board %d, chip %d, channel %d is %.2f +/- %.2f Correction %.3f\n",i,j,k,Average[i][j][k],Sigma[i][j][k],Correction); 158 156 … … 354 352 355 353 DimClient::sendCommand("Bias/Command", Textbuffer); 356 357 354 return true; 358 355 }
Note:
See TracChangeset
for help on using the changeset viewer.