reading Epics data from raw coda data files

From: Timothy Smith (tim_smith@mit.edu)
Date: Tue May 28 2002 - 15:12:47 EDT


Hello Blasters,

        Now that Adam has been able to write epics data into
ET and the raw coda data files, I have worked on reading it
back. TBLEpics has been added to the TBLRaw files in BlastLib2.
Also TCodaRead now understand the new Epics data format.

        I am including below an example of reading the epics
data from the coda event files.

                                Tim
____________________________________________________________________
 Timothy Paul Smith Research Scientist
 MIT Bates Lab tim_smith@mit.edu
 21 Manning Rd. tel: (617) 253-9207
 Middleton, MA 01949 fax: (617) 253-9599
=========================================================

{
  gROOT->Reset();
  gSystem.Load("libBlast.so");
  TBLRaw raw;
  //raw->ReadEpicsMap("Epics.map");
  raw->ReadEpicsMap("/home/blast/blast/commis/epics/EpicsControls.map");
  //raw->Open("epicsTest.dat");
  raw->Open("/scratch/blast/blast/data/dtf/dtf-6.dat");

  int epicsID;
  epicsID = raw->GetEpicsID("pb:ph_inp");

  int loop, check, i;
  float x[12000], y[12000];

  loop = 0;
  check = 0;
  while (check == 0)
    {
      check = raw.ReadNext();
      
      if (raw.epics[epicsID].Time-raw.goTime > 0 && loop < 12000){
        x[loop] = float( raw.epics[epicsID].Time-raw.goTime);
        y[loop] = raw.epics[epicsID].value;
        loop++;
      }
    }
  TGraph gr = TGraph(loop,x,y);
  gr->SetTitle(raw.epics[epicsID].name);
  gr->Draw("ALP");

}



This archive was generated by hypermail 2.1.2 : Mon Feb 24 2014 - 14:07:28 EST