CTB fragment generator
- M. Roda
CTB fragment generator M. Roda Class implementation - - PowerPoint PPT Presentation
CTB fragment generator M. Roda Class implementation TriggerBoardReader CTB_Controller Creates the Fragment generator from a +send_config() +send_start() buffer of words +send_stop() +send_reset() CTB_Controller
– Creates the Fragment generator from a
buffer of words
– Simply send the control commands to the
board
– Handles the receiving threads and fills the
buffer of words
TriggerBoardReader
+getNext_() +start() +stop()
CTB_Controller
+send_config() +send_start() +send_stop() +send_reset()
CTB_Receiver
+Buffer()
CommandableFragmentGenerator
the buffer of word
1)One that fills a raw buffer – currently a boost::spsc_queue of uint8_t from whatever is coming from a TCP socket 2)The other reads the previous queue and fills a spsc_queue of 16 byte words
fragment generator whenever getNext_() is called
TCP socket queue<uint8_t> queue<trigger_word> 1st thread 2nd thread
is put into a Fragment
– The time stamp associated with the fragment is the timestamp of the first available
word in the buffer
FragmentGenerator, it’s happening in a higher level of ArtDAQ.
– It is based on the timestamp of the fragment – The fragmentGenerator will continuously send fragment as the board sends
triggers at all times
– The Board is sending regularly a timestamp word – Whenever this word is seen, a new fragment is created and its associated timestamp
will be the one of the word
– At the present board configuration we create a fragment every 10 μs if there is at least a
triggerword
– Possible solution: combine together more words – Drawback: we increase the number of lost trigger words (see next slide)
– Ideally we would like to store all the words whose TS is within the
5ms readout window
a strange thing is happening at the edges – see the diagram of an example
– Possible solution: redundancy
– The diagram is just an example, something similar might happen at
the end of the readout window
problem if we loose something at the edge
– According to Nuno, it is a problem – I’m happy to go both ways but I guess we need an agreement first – What I want to stress is that this is unavoidable with the current
system as we don’t know the 5 ms start and end while we create the fragment
– There might be the possibility to fix this using some fcl file options to
be passed by the FragmentGenerator, I have to check with Kurt
word word word Fragment single TS 5 ms window
All these words are lost as The fragment TS is out of the 5ms But we would have liked to save the last word
time
– Not implemented yet
check
– It’s going to be a simple file (binary or txt) for every 5 minutes of run or so – It will contain every trigger word received from the BoardReader
– The natural place for this implementation is the thread which is filling the word_buffer – Every word pushed into the buffer will also be printed into the file