= TQDC2 =
TQDC2 is the control program for TQDC16VS board.

<<TableOfContents>>

== Install ==

For software installation please proceed to [[https://afi.jinr.ru/apel/|APEL Software Repository]]

== Supported Hardware ==
 * [[TQDC16VS]]

== Data File Format ==

=== TQDC2 Txt Data File Format ===
''TQDC2'' program constructs txt-file with following lines:
 * Ev <evNumber> <TAI_sec>.<TAI_ns>
 * Tdc <ch>: <tdcLeadTime>
 * Adc <ch>: <adcTime>; <sample1> <sample2> ... <sampleN>
where
 . '''TAI time''': Precise arrival time of the trigger
 . '''ch''': Channel number in range 0-15
 . '''tdcLeadTime''': HPTDC time in 0.024/1.024ns steps from trigger (TAI time)
 . '''adcTime''': Timestamp of the first sample in 8ns steps from trigger (TAI time)
 . '''sample''': ADC sample in signed 16-bit integer

=== TQDC2 Raw Data File Format ===
''Raw Data File Format'' is [[MpdDeviceRawDataFormat|MPD Raw Data]] where ''MStream payload'' is [[DataFormatTQDC16VSE|TQDC16VS-E Data Format]] without first 4 32-bit words, e.i. it startted with 4th word ''Event timestamp, TAI seconds''
||<:>word #||<:>byte offset||<:>bits||<:>description||
||<:>   4  ||<:>        16 || 31:0  || Event timestamp, TAI seconds ||

----
[[CategoryTdc|TDC]]