DRS4 Forum
  DRS4 Discussion Forum  Not logged in ELOG logo
Entry  Tue Mar 26 01:17:59 2013, Jill Russek, cascading -- DRS4 Osci.cpp & DRS.cpp 
    Reply  Thu Apr 4 11:32:21 2013, Stefan Ritt, cascading -- DRS4 Osci.cpp & DRS.cpp 
       Reply  Fri Apr 5 02:21:33 2013, Jill Russek, cascading -- DRS4 Osci.cpp & DRS.cpp 
          Reply  Fri Apr 5 08:54:37 2013, Stefan Ritt, cascading -- DRS4 Osci.cpp & DRS.cpp Screen_Shot_2013-04-05_at_8.51.53_.png
             Reply  Wed Apr 10 22:41:21 2013, Jill Russek, cascading -- DRS4 Osci.cpp & DRS.cpp 
                Reply  Thu Apr 11 08:39:12 2013, Stefan Ritt, cascading -- DRS4 Osci.cpp & DRS.cpp 
                   Reply  Thu Apr 11 23:32:57 2013, Jill Russek, cascading -- DRS4 Osci.cpp & DRS.cpp 
                      Reply  Fri Apr 12 08:25:05 2013, Stefan Ritt, cascading -- DRS4 Osci.cpp & DRS.cpp 
                         Reply  Wed Dec 20 15:30:38 2017, Yoni Sher, cascading -- DRS4 Osci.cpp & DRS.cpp 
                            Reply  Wed Dec 20 16:21:42 2017, Stefan Ritt, cascading -- DRS4 Osci.cpp & DRS.cpp 
                               Reply  Wed Dec 20 16:30:45 2017, Yoni Sher, cascading -- DRS4 Osci.cpp & DRS.cpp 
                                  Reply  Wed Dec 20 22:14:35 2017, Stefan Ritt, cascading -- DRS4 Osci.cpp & DRS.cpp 
Message ID: 239     Entry time: Fri Apr 12 08:25:05 2013     In reply to: 238     Reply to this: 647
Author: Stefan Ritt 
Subject: cascading -- DRS4 Osci.cpp & DRS.cpp 

Jill Russek wrote:

Stefan Ritt wrote:

Jill Russek wrote:

 Stefan, thanks for your help so far. If I go with your plan A of just modifying drs_exam.cpp, is there a quick way to get it to save the data from the wave, like how osci.cpp spits out an xml file? (Ignoring the cascading aspect for now)

Thanks again :)

/Jill

Well, you have to learn C programming, I won't do it for you. drs_exam.cpp contains already code to write to the ASCII file data.txt, so you just can use that or modify it to your needs.

/Stefan

 Ha! So then the answer is no, there isn't a ready made function/method to pull out the timing and voltage,  like how it was done in osci.cpp. That's all I wanted to know. (Not whether you would write it for me! Only trying to save time!) Thanks!

/Jill

You misunderstood. The answer is yes. drs_exam.cpp contains already code to write to an ASCII file. If you actually look into the file, you see:

   f = fopen("data.txt", "w");
   ...
   b->GetTime(0, b->GetTriggerCell(0), time_array);
   ...
   b->GetWave(0, 0, wave_array[0]);
   ...
   fprintf(f, "%5.2f %6.2f\n", time_array[i], wave_array[0][i]);

which actually pulls out the timing and voltage and writes it to the file.

ELOG V3.1.4-80633ba