Hi Christian, You do not say how your data were written (Fortran, C, C++ program?) To read binary data from C++, you can use the iostream library or directly the open,read, etc function. See for example man 2 open or look at an example in the Root class TFile. http://root.cern.ch/root/html/src/TFile.cxx.html#TFile:SysOpen If you want to store your data in Root format, you should create a TTree object with one branch corresponding to your ADCs and one branch corresponding to your wired chamber coordinates. I cannot give more info at this point without knowing more on your data structure. Fixed number of ADCs, coordinates, etc. For creating a Tree, I suggest you look at the page recently announced by Suzanne Panacek at URL: http://www-pat.fnal.gov/root/Persistence/Persistence.htm see also http://www-pat.fnal.gov/root/ Rene Brun On Thu, 11 May 2000, Christian D. HAEBERLI wrote: > Dear Rooters > > You helped me already a lot of times and I need your help once more. > Thank you in advance. > > This week I made some test measurements in T9 at CERN. I read out 50 ADC > channels and 2 wired chambers (4 plains). I made runs of about 20'000 > evemts. > > Now I have to following data structure in binary files: > data is structured in spills of about 400 events. First there all ADC > values of one spill, last second are the values (coordinates)of the > wired chambers of one spill. > > Now, I have to: > - read in binary data > - match the events together > - make plots (wired chamber coordinates against ADC values) > > My questions about this: > -What's is the fastest way to read in binary data? The flags, the adc > values, the wired chambers coordinates are all u_shorts in the DAQ > software. So I have to read words of 2 bytes. > - I can fill a TNtuple with the ADC values and an other NTuple with the > wired chambers coordinates. How can I match these NTuples together? > - Can I do plots out of two NTuples? > - Or is TNtuple the wrong way to solve my problem? > > > > Thank you very much for your help!! > > Christian > > > > -- > Christian Haeberli > University of Bern > Laboratory for High Energy Physics > Sidlerstr. 5 > CH-3012 Bern >
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:25 MET