Changeset 16532 for trunk/FACT++
- Timestamp:
- 05/31/13 15:19:27 (11 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/HeadersFAD.h
r16056 r16532 67 67 kConfiguring2, 68 68 kConfigured, 69 k WritingData69 kRunInProgress 70 70 }; 71 71 } -
trunk/FACT++/src/fadctrl.cc
r16106 r16532 1573 1573 1574 1574 // FIXME: Rename WritingData to TakingData 1575 return IsRunInProgress() ? FAD::State::k WritingData: FAD::State::kConnected;1575 return IsRunInProgress() ? FAD::State::kRunInProgress : FAD::State::kConnected; 1576 1576 } 1577 1577 … … 1670 1670 "The configuration of all boards was successfully cross checked. Waiting for events with a new run number to receive."); 1671 1671 1672 T::AddStateName(FAD::State::k WritingData, "WritingData",1673 " The event builder has an open file which belongs to the last run started (that does not mean that new events are currently received)");1672 T::AddStateName(FAD::State::kRunInProgress, "RunInProgress", 1673 "Events currently received by the event builder will be flagged to be written, no end-of-run event occured yet."); 1674 1674 1675 1675 // FAD Commands 1676 T::AddEvent("SEND_CMD", "I:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::k WritingData)1676 T::AddEvent("SEND_CMD", "I:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress) 1677 1677 (bind(&StateMachineFAD::SendCmd, this, placeholders::_1)) 1678 1678 ("Send a command to the FADs. Values between 0 and 0xffff are allowed." 1679 1679 "|command[uint16]:Command to be transmittted."); 1680 T::AddEvent("SEND_DATA", "I:2", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::k WritingData)1680 T::AddEvent("SEND_DATA", "I:2", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress) 1681 1681 (bind(&StateMachineFAD::SendCmdData, this, placeholders::_1)) 1682 1682 ("Send a command with data to the FADs. Values between 0 and 0xffff are allowed." … … 1684 1684 "|data[uint16]:Data to be sent with the command."); 1685 1685 1686 T::AddEvent("ENABLE_SRCLK", "B:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::k WritingData)1686 T::AddEvent("ENABLE_SRCLK", "B:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress) 1687 1687 (bind(&StateMachineFAD::CmdEnable, this, placeholders::_1, FAD::kCmdSrclk)) 1688 1688 ("Set SRCLK"); 1689 T::AddEvent("ENABLE_BUSY_OFF", "B:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::k WritingData)1689 T::AddEvent("ENABLE_BUSY_OFF", "B:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress) 1690 1690 (bind(&StateMachineFAD::CmdEnable, this, placeholders::_1, FAD::kCmdBusyOff)) 1691 1691 ("Set BUSY continously low"); 1692 T::AddEvent("ENABLE_BUSY_ON", "B:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::k WritingData)1692 T::AddEvent("ENABLE_BUSY_ON", "B:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress) 1693 1693 (bind(&StateMachineFAD::CmdEnable, this, placeholders::_1, FAD::kCmdBusyOn)) 1694 1694 ("Set BUSY constantly high (has priority over BUSY_OFF)"); 1695 T::AddEvent("ENABLE_SCLK", "B:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::k WritingData)1695 T::AddEvent("ENABLE_SCLK", "B:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress) 1696 1696 (bind(&StateMachineFAD::CmdEnable, this, placeholders::_1, FAD::kCmdSclk)) 1697 1697 ("Set SCLK"); 1698 T::AddEvent("ENABLE_DRS", "B:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::k WritingData)1698 T::AddEvent("ENABLE_DRS", "B:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress) 1699 1699 (bind(&StateMachineFAD::CmdEnable, this, placeholders::_1, FAD::kCmdDrsEnable)) 1700 1700 ("Switch Domino wave"); 1701 T::AddEvent("ENABLE_DWRITE", "B:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::k WritingData)1701 T::AddEvent("ENABLE_DWRITE", "B:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress) 1702 1702 (bind(&StateMachineFAD::CmdEnable, this, placeholders::_1, FAD::kCmdDwrite)) 1703 1703 ("Set Dwrite (possibly high / always low)"); 1704 T::AddEvent("ENABLE_CONTINOUS_TRIGGER", "B:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::k WritingData)1704 T::AddEvent("ENABLE_CONTINOUS_TRIGGER", "B:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress) 1705 1705 (bind(&StateMachineFAD::CmdEnable, this, placeholders::_1, FAD::kCmdContTrigger)) 1706 1706 ("Enable continous (internal) trigger."); 1707 T::AddEvent("ENABLE_TRIGGER_LINE", "B:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::k WritingData)1707 T::AddEvent("ENABLE_TRIGGER_LINE", "B:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress) 1708 1708 (bind(&StateMachineFAD::CmdEnable, this, placeholders::_1, FAD::kCmdTriggerLine)) 1709 1709 ("Incoming triggers can be accepted/will not be accepted"); 1710 T::AddEvent("ENABLE_COMMAND_SOCKET_MODE", "B:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::k WritingData)1710 T::AddEvent("ENABLE_COMMAND_SOCKET_MODE", "B:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress) 1711 1711 (bind(&StateMachineFAD::CmdEnable, this, placeholders::_1, FAD::kCmdSocket)) 1712 1712 ("Set debug mode (yes: dump events through command socket, no=dump events through other sockets)"); 1713 1713 1714 T::AddEvent("SET_TRIGGER_RATE", "I:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::k WritingData)1714 T::AddEvent("SET_TRIGGER_RATE", "I:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress) 1715 1715 (bind(&StateMachineFAD::SetTriggerRate, this, placeholders::_1)) 1716 1716 ("Enable continous trigger"); … … 1718 1718 (bind(&StateMachineFAD::Trigger, this, 1)) 1719 1719 ("Issue software triggers"); 1720 T::AddEvent("SEND_N_TRIGGERS", "I", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::k WritingData)1720 T::AddEvent("SEND_N_TRIGGERS", "I", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress) 1721 1721 (bind(&StateMachineFAD::SendTriggers, this, placeholders::_1)) 1722 1722 ("Issue N software triggers (note that these are the triggers sent, not the triggers executed)" 1723 1723 "|N[int]: Number of triggers to be sent to the board."); 1724 1724 /* 1725 T::AddEvent("START_RUN", "", FAD::kConnecting, FAD::kConnected, FAD::k WritingData)1725 T::AddEvent("START_RUN", "", FAD::kConnecting, FAD::kConnected, FAD::kRunInProgress) 1726 1726 (bind(&StateMachineFAD::StartRun, this, placeholders::_1, true)) 1727 1727 ("Set FAD DAQ mode. when started, no configurations must be send."); 1728 T::AddEvent("STOP_RUN", FAD::kConnecting, FAD::kConnected, FAD::k WritingData)1728 T::AddEvent("STOP_RUN", FAD::kConnecting, FAD::kConnected, FAD::kRunInProgress) 1729 1729 (bind(&StateMachineFAD::StartRun, this, placeholders::_1, false)) 1730 1730 (""); 1731 1731 */ 1732 T::AddEvent("PHASE_SHIFT", "S:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::k WritingData)1732 T::AddEvent("PHASE_SHIFT", "S:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress) 1733 1733 (bind(&StateMachineFAD::PhaseShift, this, placeholders::_1)) 1734 1734 ("Adjust ADC phase (in 'steps')" 1735 1735 "|phase[short]"); 1736 1736 1737 T::AddEvent("RESET_EVENT_COUNTER", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::k WritingData)1737 T::AddEvent("RESET_EVENT_COUNTER", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress) 1738 1738 (bind(&StateMachineFAD::Cmd, this, FAD::kCmdResetEventCounter)) 1739 1739 ("Reset the FAD boards' event counter to 0."); 1740 1740 1741 T::AddEvent("SET_RUN_NUMBER", "X:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::k WritingData)1741 T::AddEvent("SET_RUN_NUMBER", "X:1", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress) 1742 1742 (bind(&StateMachineFAD::SetRunNumber, this, placeholders::_1)) 1743 1743 ("Sent a new run-number to the boards" … … 1749 1749 "|memory[short]:Buffer size in Mega-bytes."); 1750 1750 1751 T::AddEvent("SET_REGISTER", "I:2", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::k WritingData)1751 T::AddEvent("SET_REGISTER", "I:2", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress) 1752 1752 (bind(&StateMachineFAD::SetRegister, this, placeholders::_1)) 1753 1753 ("set register to value" … … 1756 1756 1757 1757 // FIXME: Maybe add a mask which channels should be set? 1758 T::AddEvent("SET_REGION_OF_INTEREST", "I:2", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::k WritingData)1758 T::AddEvent("SET_REGION_OF_INTEREST", "I:2", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress) 1759 1759 (bind(&StateMachineFAD::SetRoi, this, placeholders::_1)) 1760 1760 ("Set region-of-interest to value" … … 1763 1763 1764 1764 // FIXME: Maybe add a mask which channels should be set? 1765 T::AddEvent("SET_DAC_VALUE", "I:2", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::k WritingData)1765 T::AddEvent("SET_DAC_VALUE", "I:2", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress) 1766 1766 (bind(&StateMachineFAD::SetDac, this, placeholders::_1)) 1767 1767 ("Set DAC numbers in range to value" … … 1769 1769 "|val[short]:Value to be set"); 1770 1770 1771 T::AddEvent("CONFIGURE", "X:2;C", FAD::State::kConnected, FAD::State::kConfigured, FAD::State::k WritingData)1771 T::AddEvent("CONFIGURE", "X:2;C", FAD::State::kConnected, FAD::State::kConfigured, FAD::State::kRunInProgress) 1772 1772 (bind(&StateMachineFAD::StartConfigure, this, placeholders::_1)) 1773 1773 ("Configure a new run. If the internla trigger is enabled this might even start a new run." … … 1832 1832 "|enable[bool]:Whether the event builder should ignore data from this slot (yes) or allowed (no)"); 1833 1833 1834 T::AddEvent("CLOSE_OPEN_FILES", FAD::State::kDisconnected, FAD::State::kConnecting, FAD::State::kConnected, FAD::State::k WritingData)1834 T::AddEvent("CLOSE_OPEN_FILES", FAD::State::kDisconnected, FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress) 1835 1835 (bind(&StateMachineFAD::CloseOpenFiles, this)) 1836 1836 ("Close all run files opened by the EventBuilder."); … … 1847 1847 ("Start EventBuilder thread and connect all valid slots."); 1848 1848 1849 T::AddEvent("STOP", FAD::State::kDisconnected, FAD::State::kConnecting, FAD::State::kConnected, FAD::State::k WritingData)1849 T::AddEvent("STOP", FAD::State::kDisconnected, FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress) 1850 1850 (bind(&StateMachineFAD::StopConnection, this)) 1851 1851 ("Stop EventBuilder thread (still write buffered events) and disconnect all slots."); 1852 1852 1853 T::AddEvent("ABORT", FAD::State::kDisconnected, FAD::State::kConnecting, FAD::State::kConnected, FAD::State::k WritingData)1853 T::AddEvent("ABORT", FAD::State::kDisconnected, FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress) 1854 1854 (bind(&StateMachineFAD::AbortConnection, this)) 1855 1855 ("Immediately abort EventBuilder thread and disconnect all slots."); 1856 1856 1857 T::AddEvent("SOFT_RESET", FAD::State::kConnected, FAD::State::k WritingData)1857 T::AddEvent("SOFT_RESET", FAD::State::kConnected, FAD::State::kRunInProgress) 1858 1858 (bind(&StateMachineFAD::Reset, this, true)) 1859 1859 ("Wait for buffers to drain, close all files and reinitialize event builder thread."); 1860 1860 1861 T::AddEvent("HARD_RESET", FAD::State::kConnected, FAD::State::k WritingData)1861 T::AddEvent("HARD_RESET", FAD::State::kConnected, FAD::State::kRunInProgress) 1862 1862 (bind(&StateMachineFAD::Reset, this, false)) 1863 1863 ("Free all buffers, close all files and reinitialize event builder thread."); -
trunk/FACT++/src/mcp.cc
r16527 r16532 403 403 } 404 404 405 if (fDimFAD.state() != FAD::State::k WritingData)405 if (fDimFAD.state() != FAD::State::kRunInProgress) 406 406 return MCP::State::kTriggerOn; 407 407 … … 415 415 { 416 416 if (/*fDimFTM.state()==FTM::State::kTriggerOn &&*/ 417 fDimFAD.state()==FAD::State::k WritingData)417 fDimFAD.state()==FAD::State::kRunInProgress) 418 418 return MCP::State::kTakingData; 419 419 -
trunk/FACT++/src/smartfact.cc
r16282 r16532 2180 2180 if (hrz.zd<65) 2181 2181 col = HTML::kYellow; 2182 if (hrz.zd<30) 2182 if (hrz.zd<30) # 2183 2183 col = HTML::kGreen; 2184 2184 … … 2438 2438 case MCP::State::kTakingData: 2439 2439 col = HTML::kBlue; 2440 if (fDimFadControl.state()==FAD::State::k WritingData)2440 if (fDimFadControl.state()==FAD::State::kRunInProgress) 2441 2441 col = HTML::kGreen; 2442 2442 break;
Note:
See TracChangeset
for help on using the changeset viewer.