-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
realtime reading of binary files #33
base: master
Are you sure you want to change the base?
Conversation
I would suggest to implement 2 modalities via config file:
On the other hand, I think that doing the analysis process while running may consume a lot of resources in the DAQ computer. I would suggest to do a quick algorithm to retrieve the most important parameters for visualization. I was planning to work on a DAQ program which should also include on-line visualization which is linked with this feature but it would require time. |
Right, probably an option would be to keep a variable that tells us the |
I think reusing what we have would be the most efficient, because any new implementation at the processing chains, would have a direct impact on the possibilities of the new DAQ system. We could always launch the visualization data chain with low Perhaps REST could be installed at a raspberry PI for the visualization routines. The TPC data flow is broadcasted and could be intercepted by any device. |
We don't need to play the trick of file size. The trick is already played by checking the output of So online visualization/Data processing switch is already enabled with this PR. By setting fMaxWaitTimeEOF to 0 switches to data processing mode. By setting it to ~5 sec switches to online visualization mode, unless there is no data from daq within 5 seconds.
|
This is possible. We can mount nfs to a shared disk and run REST/daq software on different computers. The files updated by daq computer can be correctly read from the REST computer. |
Right, we could have even a Raspberry PI running REST, processing the online data at NFS, generating the PNG files, and placing them at a webserver location created by the Raspberry PI, so it could be accessed anywhere. Not sure if that would be good enough, but I guess it would be for a refresh rate of ~5seconds. Perhaps other ideas @juanangp @lobis |
I was expecting that but always get stuck at the end of the file. I've added some And this the code:
It stays like that no matter how much time I set for |
It seems that there is some problems when n is not 1. I am looking into that. |
e.g. you are at file position 7, the total length of file is 10. If you run: |
Now it should be working. |
…rn previous behavier(no-waiting)
Have you been able to see an histogram growing in real time? In my case the problem is still the same, it enters in the while loop but never reach to read further in the file. |
For me it is working. First I modify the rml file and set The usage of new
|
Not sure what is going on but I'm still at the same point. I've checked also that we are using
And I set And with the macro I can see changes in the file size: I'm using PD: Sorry for the long post but it's also helpful to me to have everything written down. |
I updated |
The OS is Debian 4.19.194-1 x86_64 GNU/Linux and the file system |
What about this PR? |
I found it later on that for The |
I added a method
FRead()
inTRestRawToSignalProcess
to replace the defaultfread()
. It can:Now with the help of this method,
TRestRawMultiCoBoAsAdToSignalProcess
is able to process data when the file is still writing.