Changeset 14509 for trunk/FACT++/src


Ignore:
Timestamp:
10/22/12 22:40:48 (12 years ago)
Author:
tbretz
Message:
Use the correct state (the ftmctrl state to reset the trigger-zero counter; check the clock conditioner setting only during data taking or in idle (excludes all configuration states)
File:
1 edited

Legend:

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

    r14508 r14509  
    13681368    }
    13691369
    1370     int HandleMcpStateChange()
     1370    int HandleFtmControlStateChange()
    13711371    {
    13721372        const int32_t &last  = fDimFtmControl.last.second;
    13731373        const int32_t &state = fDimFtmControl.state();
    13741374
    1375         // If a new run has ben started ensure that the counter
     1375        // If a new run has been started ensure that the counter
    13761376        // is reset. The reset in HandleFtmTriggerRates might
    13771377        // arrive only after the run was started.
    1378         if (last<MCP::State::kTriggerOn && state>=MCP::State::kTriggerOn)
     1378        if (last!=FTM::State::kTriggerOn && state==MCP::State::kTriggerOn)
    13791379            fFtmControlTriggerRateTooLow = -1;
    13801380
     
    23042304                           "Sensor temperature exceeds outside temperature by more than 8&deg;C");
    23052305
    2306         newerr |= SetError(fFtmControlTriggerRateTooLow>1 && fDimMcp.state()==MCP::State::kTakingData,
    2307                            "Trigger rate below 1Hz during data taking");
    2308 
    2309         newerr |= SetError(fDimFtmControl.state()>FTM::State::kDisconnected&&(fFtmControlState&FTM::kFtmLocked)==0,
     2306        newerr |= SetError(fFtmControlTriggerRateTooLow>1 && fDimFtmControl.state()==FTM::State::kTriggerOn,
     2307                           "Trigger rate below 1Hz while trigger switched on");
     2308
     2309        newerr |= SetError((fDimFtmControl.state()==FTM::State::kTriggerOn||fDimFtmControl.state()==FTM::State::kIdle) &&
     2310                           (fFtmControlState&FTM::kFtmLocked)==0,
    23102311                           "FTM - clock conditioner not locked!");
    23112312
     
    28112812
    28122813        fDimFscControl.SetCallback(bind(&StateMachineSmartFACT::HandleFscControlStateChange, this, placeholders::_1));
     2814        fDimFtmControl.SetCallback(bind(&StateMachineSmartFACT::HandleFtmControlStateChange, this));
    28132815        fDimDriveControl.SetCallback(bind(&StateMachineSmartFACT::HandleDriveControlStateChange, this, placeholders::_1));
    2814         fDimMcp.SetCallback(bind(&StateMachineSmartFACT::HandleMcpStateChange, this));
    28152816        fDimControl.SetCallback(bind(&StateMachineSmartFACT::HandleControlStateChange, this, placeholders::_1));
    28162817        fDimControl.AddCallback("dotest.dim", bind(&StateMachineSmartFACT::HandleDoTest, this, placeholders::_1));
Note: See TracChangeset for help on using the changeset viewer.