Changeset 15200
- Timestamp:
- 03/30/13 16:13:38 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/smartfact.cc
r15187 r15200 497 497 deque<float> fFtmControlTriggerRateHist; 498 498 int32_t fFtmControlTriggerRateTooLow; 499 uint32_tfFtmControlState;499 int fFtmControlState; 500 500 501 501 float fFtmPatchThresholdMed; … … 1412 1412 } 1413 1413 1414 const FTM::DimTriggerRates &dim = d.Ref<FTM::DimTriggerRates>(); 1415 1416 // If the trigger rate is too low... 1417 // ... and the run was not just started (can lead to very small elapsed times) 1418 // ... and the trigger is switched on 1419 // ... and there was no state change (then the trigger was started or stopped) 1420 fFtmControlTriggerRateTooLow = 1421 dim.fTriggerRate<1 && dim.fElapsedTime>0.45 && 1422 (fFtmControlState&FTM::kFtmStates)==FTM::kFtmRunning && 1423 (fFtmControlState&FTM::kFtmStates)==(d.GetQoS()&FTM::kFtmStates); 1424 1414 1425 fFtmControlState = d.GetQoS(); 1415 1416 const FTM::DimTriggerRates &dim = d.Ref<FTM::DimTriggerRates>();1417 1418 // two consecutive low rates.1419 fFtmControlTriggerRateTooLow = (fFtmControlState&FTM::kFtmStates)==FTM::kRunning && dim.fTriggerRate<1;1420 1426 1421 1427 const float *brates = dim.fBoardRate; // Board rate … … 2336 2342 2337 2343 newerr |= SetError(fDimDriveControl.state()>0xff && data_taking && data_run, 2338 "Drive in ERROR state during data- taking");2344 "Drive in ERROR state during data-run"); 2339 2345 newerr |= SetError(fDriveControlMoonDist>155, 2340 2346 "Moon within the field-of-view of the cones"); … … 2342 2348 "Moon within the field-of-view of the camera"); 2343 2349 2344 newerr |= SetError(fDimBiasControl.state()<BIAS::State::kRamping && data_taking ,2345 "BIAS not operating during data- taking");2350 newerr |= SetError(fDimBiasControl.state()<BIAS::State::kRamping && data_taking && data_run, 2351 "BIAS not operating during data-run"); 2346 2352 newerr |= SetError(fDimBiasControl.state()==BIAS::State::kOverCurrent, 2347 2353 "BIAS channels in OverCurrent"); … … 2366 2372 "Sensor temperature exceeds outside temperature by more than 9°C"); 2367 2373 2368 newerr |= SetError(fFtmControlTriggerRateTooLow> 1,2374 newerr |= SetError(fFtmControlTriggerRateTooLow>0, 2369 2375 "Trigger rate below 1Hz while trigger switched on"); 2370 2376 2371 newerr |= SetError(fFtmControlState!=FTM::k Configuring && (fFtmControlState&FTM::kFtmLocked)==0,2377 newerr |= SetError(fFtmControlState!=FTM::kFtmConfig && (fFtmControlState&FTM::kFtmLocked)==0, 2372 2378 "FTM - clock conditioner not locked!"); 2373 2379 … … 2879 2885 2880 2886 fDimFscControl.SetCallback(bind(&StateMachineSmartFACT::HandleFscControlStateChange, this, placeholders::_1)); 2881 fDimFtmControl.SetCallback(bind(&StateMachineSmartFACT::HandleFtmControlStateChange, this));2887 //fDimFtmControl.SetCallback(bind(&StateMachineSmartFACT::HandleFtmControlStateChange, this)); 2882 2888 fDimDriveControl.SetCallback(bind(&StateMachineSmartFACT::HandleDriveControlStateChange, this, placeholders::_1)); 2883 2889 fDimControl.SetCallback(bind(&StateMachineSmartFACT::HandleControlStateChange, this, placeholders::_1));
Note:
See TracChangeset
for help on using the changeset viewer.