Changeset 15200


Ignore:
Timestamp:
03/30/13 16:13:38 (12 years ago)
Author:
tbretz
Message:
Another update to get the checkes most reliable.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/smartfact.cc

    r15187 r15200  
    497497    deque<float> fFtmControlTriggerRateHist;
    498498     int32_t     fFtmControlTriggerRateTooLow;
    499     uint32_t     fFtmControlState;
     499     int         fFtmControlState;
    500500
    501501    float fFtmPatchThresholdMed;
     
    14121412        }
    14131413
     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
    14141425        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;
    14201426
    14211427        const float *brates = dim.fBoardRate; // Board rate
     
    23362342
    23372343        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");
    23392345        newerr |= SetError(fDriveControlMoonDist>155,
    23402346                           "Moon within the field-of-view of the cones");
     
    23422348                           "Moon within the field-of-view of the camera");
    23432349
    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");
    23462352        newerr |= SetError(fDimBiasControl.state()==BIAS::State::kOverCurrent,
    23472353                           "BIAS channels in OverCurrent");
     
    23662372                           "Sensor temperature exceeds outside temperature by more than 9&deg;C");
    23672373
    2368         newerr |= SetError(fFtmControlTriggerRateTooLow>1,
     2374        newerr |= SetError(fFtmControlTriggerRateTooLow>0,
    23692375                           "Trigger rate below 1Hz while trigger switched on");
    23702376
    2371         newerr |= SetError(fFtmControlState!=FTM::kConfiguring && (fFtmControlState&FTM::kFtmLocked)==0,
     2377        newerr |= SetError(fFtmControlState!=FTM::kFtmConfig && (fFtmControlState&FTM::kFtmLocked)==0,
    23722378                           "FTM - clock conditioner not locked!");
    23732379
     
    28792885
    28802886        fDimFscControl.SetCallback(bind(&StateMachineSmartFACT::HandleFscControlStateChange, this, placeholders::_1));
    2881         fDimFtmControl.SetCallback(bind(&StateMachineSmartFACT::HandleFtmControlStateChange, this));
     2887        //fDimFtmControl.SetCallback(bind(&StateMachineSmartFACT::HandleFtmControlStateChange, this));
    28822888        fDimDriveControl.SetCallback(bind(&StateMachineSmartFACT::HandleDriveControlStateChange, this, placeholders::_1));
    28832889        fDimControl.SetCallback(bind(&StateMachineSmartFACT::HandleControlStateChange, this, placeholders::_1));
Note: See TracChangeset for help on using the changeset viewer.