Changeset 14991
- Timestamp:
- 03/07/13 09:56:09 (13 years ago)
- Location:
- trunk/FACT++/src
- Files:
- 
      - 2 edited
 
 - 
          
  HeadersRateControl.h (modified) (1 diff)
- 
          
  ratecontrol.cc (modified) (5 diffs)
 
Legend:
- Unmodified
- Added
- Removed
- 
      trunk/FACT++/src/HeadersRateControl.hr14432 r14991 18 18 kInProgress, 19 19 }; 20 } 20 }; 21 22 struct DimThreshold 23 { 24 uint16_t threshold; 25 double begin; 26 double end; 27 } __attribute__((__packed__)); 21 28 } 22 29 
- 
      trunk/FACT++/src/ratecontrol.ccr14990 r14991 52 52 53 53 uint64_t fCounter; 54 55 Time fCalibrationTimeStart; 54 56 55 57 bool CheckEventSize(const EventImp &evt, size_t size) … … 283 285 { 284 286 fThresholds.assign(160, fThresholdMin); 285 fDimThreshold.Update(fThresholdMin); 287 288 const RateControl::DimThreshold data = { fThresholdMin, fCalibrationTimeStart.Mjd(), Time().Mjd() }; 289 fDimThreshold.setQuality(0); 290 fDimThreshold.Update(data); 291 292 ostringstream out; 293 out << setprecision(3); 294 out << "Measured rate " << fTriggerRate << "Hz below target rate " << fTargetRate << "... mininum threshold set to " << fThresholdMin; 295 Info(out); 296 286 297 return RateControl::State::kGlobalThresholdSet; 287 298 } … … 294 305 if (diff<=fThresholdMin) 295 306 { 296 fDimThreshold.Update(fThresholdMin); 307 const RateControl::DimThreshold data = { fThresholdMin, fCalibrationTimeStart.Mjd(), Time().Mjd() }; 308 fDimThreshold.setQuality(1); 309 fDimThreshold.Update(data); 310 311 ostringstream out; 312 out << setprecision(3); 313 out << "Next step would be 0... mininum threshold set to " << fThresholdMin; 314 Info(out); 315 297 316 return RateControl::State::kGlobalThresholdSet; 298 317 } … … 368 387 fTriggerRate = -1; 369 388 fCounter = 0; 389 390 fCalibrationTimeStart = Time(); 370 391 371 392 ostringstream out; … … 455 476 fDimFTM("FTM_CONTROL"), 456 477 fDimRS("RATE_SCAN"), 457 fDimThreshold("RATE_CONTROL/THRESHOLD", "S:1", "Resulting threshold after calibration|threshold[dac]:Resulting threshold from calibration") 478 479 fDimThreshold("RATE_CONTROL/THRESHOLD", "S:1;D:1;D:1", 480 "Resulting threshold after calibration" 481 "|threshold[dac]:Resulting threshold from calibration" 482 "|begin[mjd]:Start time of calibration" 483 "|end[mjd]:End time of calibration") 458 484 { 459 485 // ba::io_service::work is a kind of keep_alive for the loop. 
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  
