Ignore:
Timestamp:
05/12/11 22:55:23 (14 years ago)
Author:
tbretz
Message:
Added some docu; renamed Coincidence to multiplicity.
File:
1 edited

Legend:

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

    r10688 r10691  
    505505    void CmdReqDynDat()
    506506    {
    507         PostCmd(FTM::kCmdRead, FTM::kReadDynamicData);
     507        PostCmd(FTM::kCmdRead, FTM::kCmdDynamicData);
    508508    }
    509509
    510510    void CmdReqStatDat()
    511511    {
    512         PostCmd(FTM::kCmdRead, FTM::kReadStaticData);
     512        PostCmd(FTM::kCmdRead, FTM::kCmdStaticData);
    513513    }
    514514
    515515    void CmdSendStatDat()
    516516    {
    517         PostCmd(fStaticData.HtoN(), FTM::kCmdWrite, FTM::kWriteStaticData);
     517        PostCmd(fStaticData.HtoN(), FTM::kCmdWrite, FTM::kCmdStaticData);
    518518
    519519        // Request the changed configuration to ensure the
     
    553553
    554554        const boost::array<uint16_t, 2> data = {{ addr, val }};
    555         PostCmd(data, FTM::kCmdWrite, FTM::kWriteRegister);
     555        PostCmd(data, FTM::kCmdWrite, FTM::kCmdRegister);
    556556
    557557        // Request the changed configuration to ensure the
     
    568568
    569569        const boost::array<uint16_t, 1> data = {{ addr }};
    570         PostCmd(data, FTM::kCmdRead, FTM::kReadRegister);
     570        PostCmd(data, FTM::kCmdRead, FTM::kCmdRegister);
    571571
    572572        return true;
     
    813813    }
    814814
    815     bool SetTriggerCoincidence(uint16_t n)
    816     {
    817         if (n==0 || n>FTM::StaticData::kMaxCoincidence)
     815    bool SetTriggerMultiplicity(uint16_t n)
     816    {
     817        if (n==0 || n>FTM::StaticData::kMaxMultiplicity)
    818818            return false;
    819819
    820         if (n==fStaticData.fCoincidencePhysics)
     820        if (n==fStaticData.fMultiplicityPhysics)
    821821            return true;
    822822
    823         fStaticData.fCoincidencePhysics = n;
     823        fStaticData.fMultiplicityPhysics = n;
    824824
    825825        CmdSendStatDat();
     
    843843    }
    844844
    845     bool SetCalibCoincidence(uint16_t n)
    846     {
    847         if (n==0 || n>FTM::StaticData::kMaxCoincidence)
     845    bool SetCalibMultiplicity(uint16_t n)
     846    {
     847        if (n==0 || n>FTM::StaticData::kMaxMultiplicity)
    848848            return false;
    849849
    850         if (n==fStaticData.fCoincidenceCalib)
     850        if (n==fStaticData.fMultiplicityCalib)
    851851            return true;
    852852
    853         fStaticData.fCoincidenceCalib = n;
     853        fStaticData.fMultiplicityCalib = n;
    854854
    855855        CmdSendStatDat();
     
    12641264    }
    12651265
    1266     int SetTriggerCoincidence(const EventImp &evt)
    1267     {
    1268         if (!CheckEventSize(evt.GetSize(), "SetTriggerCoincidence", 2))
    1269             return T::kSM_FatalError;
    1270 
    1271         if (!fFTM.SetTriggerCoincidence(evt.GetUShort()))
    1272             T::Warn("SetTriggerCoincidence -  Value out of range.");
    1273 
    1274         return T::GetCurrentState();
    1275     }
    1276 
    1277     int SetCalibCoincidence(const EventImp &evt)
    1278     {
    1279         if (!CheckEventSize(evt.GetSize(), "SetCalibCoincidence", 2))
    1280             return T::kSM_FatalError;
    1281 
    1282         if (!fFTM.SetCalibCoincidence(evt.GetUShort()))
    1283             T::Warn("SetCalibCoincidence -  Value out of range.");
     1266    int SetTriggerMultiplicity(const EventImp &evt)
     1267    {
     1268        if (!CheckEventSize(evt.GetSize(), "SetTriggerMultiplicity", 2))
     1269            return T::kSM_FatalError;
     1270
     1271        if (!fFTM.SetTriggerMultiplicity(evt.GetUShort()))
     1272            T::Warn("SetTriggerMultiplicity -  Value out of range.");
     1273
     1274        return T::GetCurrentState();
     1275    }
     1276
     1277    int SetCalibMultiplicity(const EventImp &evt)
     1278    {
     1279        if (!CheckEventSize(evt.GetSize(), "SetCalibMultiplicity", 2))
     1280            return T::kSM_FatalError;
     1281
     1282        if (!fFTM.SetCalibMultiplicity(evt.GetUShort()))
     1283            T::Warn("SetCalibMultiplicity -  Value out of range.");
    12841284
    12851285        return T::GetCurrentState();
     
    15161516             "|LPext[int]:number of triggers of the external light pulser");
    15171517
    1518         AddEvent("SET_TRIGGER_COINCIDENCE", "S:1", kStateIdle)
    1519             (boost::bind(&StateMachineFTM::SetTriggerCoincidence, this, _1))
    1520             ("Setup the coincidence condition for physcis triggers"
     1518        AddEvent("SET_TRIGGER_Multiplicity", "S:1", kStateIdle)
     1519            (boost::bind(&StateMachineFTM::SetTriggerMultiplicity, this, _1))
     1520            ("Setup the Multiplicity condition for physcis triggers"
    15211521             "|N[int]:Number of requirered coincident triggers from sum-patches (1-40)");
    15221522
     
    15251525            ("");
    15261526
    1527         AddEvent("SET_CALIBRATION_COINCIDENCE", "S:1", kStateIdle)
    1528             (boost::bind(&StateMachineFTM::SetCalibCoincidence, this, _1))
    1529             ("Setup the coincidence condition for artificial (calibration) triggers"
     1527        AddEvent("SET_CALIBRATION_Multiplicity", "S:1", kStateIdle)
     1528            (boost::bind(&StateMachineFTM::SetCalibMultiplicity, this, _1))
     1529            ("Setup the Multiplicity condition for artificial (calibration) triggers"
    15301530             "|N[int]:Number of requirered coincident triggers from sum-patches (1-40)");
    15311531
Note: See TracChangeset for help on using the changeset viewer.