Changeset 10691 for trunk/FACT++/src/ftmctrl.cc
- Timestamp:
- 05/12/11 22:55:23 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/ftmctrl.cc
r10688 r10691 505 505 void CmdReqDynDat() 506 506 { 507 PostCmd(FTM::kCmdRead, FTM::k ReadDynamicData);507 PostCmd(FTM::kCmdRead, FTM::kCmdDynamicData); 508 508 } 509 509 510 510 void CmdReqStatDat() 511 511 { 512 PostCmd(FTM::kCmdRead, FTM::k ReadStaticData);512 PostCmd(FTM::kCmdRead, FTM::kCmdStaticData); 513 513 } 514 514 515 515 void CmdSendStatDat() 516 516 { 517 PostCmd(fStaticData.HtoN(), FTM::kCmdWrite, FTM::k WriteStaticData);517 PostCmd(fStaticData.HtoN(), FTM::kCmdWrite, FTM::kCmdStaticData); 518 518 519 519 // Request the changed configuration to ensure the … … 553 553 554 554 const boost::array<uint16_t, 2> data = {{ addr, val }}; 555 PostCmd(data, FTM::kCmdWrite, FTM::k WriteRegister);555 PostCmd(data, FTM::kCmdWrite, FTM::kCmdRegister); 556 556 557 557 // Request the changed configuration to ensure the … … 568 568 569 569 const boost::array<uint16_t, 1> data = {{ addr }}; 570 PostCmd(data, FTM::kCmdRead, FTM::k ReadRegister);570 PostCmd(data, FTM::kCmdRead, FTM::kCmdRegister); 571 571 572 572 return true; … … 813 813 } 814 814 815 bool SetTrigger Coincidence(uint16_t n)816 { 817 if (n==0 || n>FTM::StaticData::kMax Coincidence)815 bool SetTriggerMultiplicity(uint16_t n) 816 { 817 if (n==0 || n>FTM::StaticData::kMaxMultiplicity) 818 818 return false; 819 819 820 if (n==fStaticData.f CoincidencePhysics)820 if (n==fStaticData.fMultiplicityPhysics) 821 821 return true; 822 822 823 fStaticData.f CoincidencePhysics = n;823 fStaticData.fMultiplicityPhysics = n; 824 824 825 825 CmdSendStatDat(); … … 843 843 } 844 844 845 bool SetCalib Coincidence(uint16_t n)846 { 847 if (n==0 || n>FTM::StaticData::kMax Coincidence)845 bool SetCalibMultiplicity(uint16_t n) 846 { 847 if (n==0 || n>FTM::StaticData::kMaxMultiplicity) 848 848 return false; 849 849 850 if (n==fStaticData.f CoincidenceCalib)850 if (n==fStaticData.fMultiplicityCalib) 851 851 return true; 852 852 853 fStaticData.f CoincidenceCalib = n;853 fStaticData.fMultiplicityCalib = n; 854 854 855 855 CmdSendStatDat(); … … 1264 1264 } 1265 1265 1266 int SetTrigger Coincidence(const EventImp &evt)1267 { 1268 if (!CheckEventSize(evt.GetSize(), "SetTrigger Coincidence", 2))1269 return T::kSM_FatalError; 1270 1271 if (!fFTM.SetTrigger Coincidence(evt.GetUShort()))1272 T::Warn("SetTrigger Coincidence- Value out of range.");1273 1274 return T::GetCurrentState(); 1275 } 1276 1277 int SetCalib Coincidence(const EventImp &evt)1278 { 1279 if (!CheckEventSize(evt.GetSize(), "SetCalib Coincidence", 2))1280 return T::kSM_FatalError; 1281 1282 if (!fFTM.SetCalib Coincidence(evt.GetUShort()))1283 T::Warn("SetCalib Coincidence- 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."); 1284 1284 1285 1285 return T::GetCurrentState(); … … 1516 1516 "|LPext[int]:number of triggers of the external light pulser"); 1517 1517 1518 AddEvent("SET_TRIGGER_ COINCIDENCE", "S:1", kStateIdle)1519 (boost::bind(&StateMachineFTM::SetTrigger Coincidence, this, _1))1520 ("Setup the coincidencecondition 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" 1521 1521 "|N[int]:Number of requirered coincident triggers from sum-patches (1-40)"); 1522 1522 … … 1525 1525 (""); 1526 1526 1527 AddEvent("SET_CALIBRATION_ COINCIDENCE", "S:1", kStateIdle)1528 (boost::bind(&StateMachineFTM::SetCalib Coincidence, this, _1))1529 ("Setup the coincidencecondition 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" 1530 1530 "|N[int]:Number of requirered coincident triggers from sum-patches (1-40)"); 1531 1531
Note:
See TracChangeset
for help on using the changeset viewer.