1664 "|run[idx]:Run no of last conf'd run (-1 if reset or none config'd yet)" 1665 "|next[idx]:Run number which will be assigned to next configuration"),
1667 "Connection status of FAD boards" 1668 "|status[bitpattern]:lower bits stat1, upper bits stat2, for every board. 40=thread" 1669 "|thread[bool]:true or false whether the event builder threads are running")
1675 T::AddStateName(FAD::State::kOffline,
"Disengaged",
1676 "All enabled FAD boards are disconnected and the event-builer thread is not running.");
1679 "All enabled FAD boards are disconnected, but the event-builder thread is running.");
1682 "Only some enabled FAD boards are connected.");
1685 "All enabled FAD boards are connected..");
1688 "Waiting 3 seconds for all FADs to be configured before requesting configuration.");
1691 "Waiting until all boards returned their configuration and they are valid.");
1694 "Waiting until 'enable trigger line' was sent to all boards.");
1697 "The configuration of all boards was successfully cross checked. Waiting for events with a new run number to receive.");
1699 T::AddStateName(FAD::State::kRunInProgress,
"RunInProgress",
1700 "Events currently received by the event builder will be flagged to be written, no end-of-run event occured yet.");
1705 (
"Send a command to the FADs. Values between 0 and 0xffff are allowed." 1706 "|command[uint16]:Command to be transmittted.");
1709 (
"Send a command with data to the FADs. Values between 0 and 0xffff are allowed." 1710 "|command[uint16]:Command to be transmittted." 1711 "|data[uint16]:Data to be sent with the command.");
1718 (
"Set BUSY continously low");
1721 (
"Set BUSY constantly high (has priority over BUSY_OFF)");
1727 (
"Switch Domino wave");
1730 (
"Set Dwrite (possibly high / always low)");
1733 (
"Enable continous (internal) trigger.");
1736 (
"Incoming triggers can be accepted/will not be accepted");
1739 (
"Set debug mode (yes: dump events through command socket, no=dump events through other sockets)");
1743 (
"Enable continous trigger");
1744 T::AddEvent(
"SEND_SINGLE_TRIGGER")
1746 (
"Issue software triggers");
1749 (
"Issue N software triggers (note that these are the triggers sent, not the triggers executed)" 1750 "|N[int]: Number of triggers to be sent to the board.");
1761 (
"Adjust ADC phase (in 'steps')" 1766 (
"Reset the FAD boards' event counter to 0.");
1770 (
"Sent a new run-number to the boards" 1771 "|num[int]:Run number");
1773 T::AddEvent(
"SET_MAX_MEMORY",
"S:1")
1775 (
"Set maximum memory buffer size allowed to be consumed by the EventBuilder to buffer events." 1776 "|memory[short]:Buffer size in Mega-bytes.");
1778 T::AddEvent(
"SET_EVENT_TIMEOUT",
"S:1")
1780 (
"Set the timeout after which an event expires which was not completely received yet." 1781 "|timeout[sec]:Timeout in seconds [1;32767]");
1785 (
"set register to value" 1786 "|addr[short]:Address of register" 1787 "|val[short]:Value to be set");
1792 (
"Set region-of-interest to value" 1793 "|channel[short]:Channel on each chip for which the ROI is set (0-8), -1 for all" 1794 "|val[short]:Value to be set");
1799 (
"Set DAC numbers in range to value" 1800 "|addr[short]:Address of register (-1 for all)" 1801 "|val[short]:Value to be set");
1805 (
"Configure a new run. If the internla trigger is enabled this might even start a new run." 1806 "|time_max[s]:Maximum time before the run is closed in seconds (0: unlimited)" 1807 "|num_max[int]:Maximum number of events before the run is closed in seconds (0: unlimited)" 1808 "|run_type[string]:Run type which describes the runs");
1812 (
"If configuration failed and the fadctrl is waiting for something, use this to reset the state.");
1815 T::AddEvent(
"SET_VERBOSE",
"B:1")
1817 (
"Set verbosity state" 1818 "|verbosity[bool]:disable or enable verbosity for received data (yes/no), except dynamic data");
1820 T::AddEvent(
"SET_HEX_OUTPUT",
"B:1")
1822 (
"Enable or disable hex output for received data" 1823 "|hexout[bool]:disable or enable hex output for received data (yes/no)");
1825 T::AddEvent(
"SET_DATA_OUTPUT",
"B:1")
1827 (
"Enable or disable printing of the received adc data to the console" 1828 "|dataout[bool]:disable or enable data output for received data (yes/no)");
1830 T::AddEvent(
"SET_DEBUG_TX",
"B:1")
1832 (
"Enable or disable the output of messages in case of successfull data transmission to the boards." 1833 "|debug[bool]:disable or enable debug output for transmitted data (yes/no)");
1835 T::AddEvent(
"PRINT_EVENT",
"S:1")
1837 (
"Print (last) event" 1838 "|board[short]:slot from which the event should be printed (-1 for all)");
1840 T::AddEvent(
"BLOCK_TRANSMISSION",
"S:1;B:1")
1842 (
"Blocks the transmission of commands to the given slot. Use with care! For debugging pupose only!" 1843 "|slot[short]:Slot to which the command transmission should be blocked (0-39)" 1844 "|enable[bool]:Whether the command transmission should be blockes (yes) or allowed (no)");
1846 T::AddEvent(
"BLOCK_TRANSMISSION_RANGE",
"S:2;B:1")
1848 (
"Blocks the transmission of commands to the given range of slots. Use with care! For debugging pupose only!" 1849 "|first[short]:First slot to which the command transmission should be blocked (0-39)" 1850 "|last[short]:Last slot to which the command transmission should be blocked (0-39)" 1851 "|enable[bool]:Whether the command transmission should be blockes (yes) or allowed (no)");
1853 T::AddEvent(
"IGNORE_EVENTS",
"S:1;B:1")
1855 (
"Instructs the event-builder to ignore events from the given slot but still read the data from the socket." 1856 "|slot[short]:Slot from which the data should be ignored when building events" 1857 "|enable[bool]:Whether the event builder should ignore data from this slot (yes) or allowed (no)");
1859 T::AddEvent(
"IGNORE_EVENTS_RANGE",
"S:2;B:1")
1861 (
"Instructs the event-builder to ignore events from the given slot but still read the data from the socket." 1862 "|first[short]:First slot from which the data should be ignored when building events" 1863 "|last[short]:Last slot from which the data should be ignored when building events" 1864 "|enable[bool]:Whether the event builder should ignore data from this slot (yes) or allowed (no)");
1868 (
"Close all run files opened by the EventBuilder.");
1877 T::AddEvent(
"START", FAD::State::kOffline)
1879 (
"Start EventBuilder thread and connect all valid slots.");
1883 (
"Stop EventBuilder thread (still write buffered events) and disconnect all slots.");
1887 (
"Immediately abort EventBuilder thread and disconnect all slots.");
1891 (
"Wait for buffers to drain, close all files and reinitialize event builder thread.");
1895 (
"Free all buffers, close all files and reinitialize event builder thread.");
1899 (
"Connect a disconnected slot.");
1903 (
"Disconnect a connected slot.");
1907 (
"Toggle the status of a slot.");
1909 T::AddEvent(
"SET_FILE_FORMAT",
"S:1")
1911 (
"Set the output file format (see FAD::FileFormat_t)");
1913 T::AddEvent(
"START_DRS_CALIBRATION")
1915 (
"Start a drs calibration (shortcut for SET_FILEFORMAT 4)");
1917 T::AddEvent(
"RESET_SECONDARY_DRS_BASELINE")
1919 (
"Reset the secondary drs baseline (e.g. to change roi)");
1921 T::AddEvent(
"LOAD_DRS_CALIBRATION",
"C")
1923 (
"Load a DRS calibration file" 1928 T::AddEvent(
"SET_ZFITS_DEFAULT_NUM_THREADS",
"S")
1930 (
"Set the number of compression threads to use (+1 for writing)" 1931 "|num[int]:Number of threads");
1932 T::AddEvent(
"SET_ZFITS_DEFAULT_MAX_MEMORY",
"S")
1934 (
"Set the maximum amount of memory zfits will use for compression" 1935 "|mem[int]:Memory in MB");
1936 T::AddEvent(
"SET_ZFITS_DEFAULT_NUM_TILES",
"S")
1938 (
"Set the number of tiles with which the catalog is initialized" 1939 "|num[int]:Number of tiles");
1940 T::AddEvent(
"SET_ZFITS_DEFAULT_ROWS_PER_TILE",
"S")
1942 (
"Set the number of rows which are compressed into one tile" 1943 "|num[int]:Number of rows per tile");
1946 T::AddEvent(
"ADD_ADDRESS",
"C", FAD::State::kOffline)
1948 (
"Add the address of a DRS4 board to the first free slot" 1949 "|IP[string]:address in the format <address:port>");
1950 T::AddEvent(
"REMOVE_SLOT",
"S:1", FAD::State::kOffline)
1952 (
"Remove the Iaddress in slot n. For a list see LIST" 1953 "|slot[short]:Remove the address in slot n from the list");
1954 T::AddEvent(
"LIST_SLOTS")
1956 (
"Print a list of all available board addressesa and whether they are enabled");
int StartDrsCalibration()
int SendTriggers(const EventImp &evt)
int SetDac(const EventImp &evt)
int SendCmd(const EventImp &evt)
int SetMaxMemoryBuffer(const EventImp &evt)
EventBuilderWrapper(MessageImp &imp)
int SendCmdData(const EventImp &evt)
vector< uint8_t > fStatus1
int SetIgnoreSlots(const EventImp &evt)
int SetBlockTransmissionRange(const EventImp &evt)
int ResetSecondaryDrsBaseline()
int SetDataOutput(const EventImp &evt)
static uint32_t DefaultMaxMemory(const uint32_t &_n=0)
int CmdEnable(const EventImp &evt, FAD::Enable command)
int ToggleSlot(const EventImp &evt)
int SetHexOutput(const EventImp &evt)
static uint32_t DefaultMaxNumTiles(const uint32_t &_n=0)
int SetIgnoreSlot(const EventImp &evt)
static uint32_t DefaultNumThreads(const uint32_t &_n=-2)
static setter for the default number of threads to use. -1 means all available physical cores ...
void SetOutputFormat(FAD::FileFormat_t f)
int Cmd(FAD::Enable command)
int AddAddress(const EventImp &evt)
int LoadDrsCalibration(const EventImp &evt)
DimDescribedService fDimStartRun
int SetBlockTransmission(const EventImp &evt)
int SetupZFits(const EventImp &evt, const std::function< void(int32_t)> &func)
int PrintEvent(const EventImp &evt)
int SetTriggerRate(const EventImp &evt)
int SetRunNumber(const EventImp &evt)
int SetRegister(const EventImp &evt)
int SetEventTimeoutSec(const EventImp &evt)
int SetVerbosity(const EventImp &evt)
static uint32_t DefaultNumRowsPerTile(const uint32_t &_n=0)
int SetFileFormat(const EventImp &evt)
DimDescribedService fDimConnection
int PhaseShift(const EventImp &evt)
vector< uint8_t > fStatus2
int RemoveSlot(const EventImp &evt)
int EnableSlot(const EventImp &evt, bool enable)
int SetRoi(const EventImp &evt)
int SetDebugTx(const EventImp &evt)
int StartConfigure(const EventImp &evt)