A peak example

{
// This example shows how to plot a region of interest.
// To see the result of this macro, click  here 
// The access of data is made by it's time.
// A much fancyer example is given in  here 
 
   gROOT->Reset();

   // Open a new window (canvas)   

   c1 = new TCanvas("c1","A peak example",1);

// ===== Creates the needed pads by dividing the initial canvas =====

   c1->Divide(2,2);
      
// ===== Opens the frame channel =====

   fc = new VFrameChannel("demoDB.root");

// ===== Gets the needed vectors and draws them =====
// ===== First the upper plots                  =====

   FrVect* frv1 = fc->GetVect("adc.MYGO_ADC1",600000010.,3.);
   FrVect* frvSeis = fc->GetVect("adc.MYGO_Seis",600000010.,3.);

   c1->cd(1);                           // select the first pad
   gVM->Draw(frv1);
   c1->cd(2);                           // select the second pad
   gVM->Draw(frvSeis);
   
// ===== Gets the needed vectors and draws them =====
// ===== Second the same plots superimposed     =====

   // Gets the needed vectors again but zooming on the region of interest
   frv2 = fc->GetVect("adc.MYGO_ADC1",600000010.24,0.06);
   frvSeis2 = fc->GetVect("adc.MYGO_Seis",600000010.24,0.06);
   
   // Draws them in the second pad, superimposed on top of each other
   c1->cd(3);
   gVM->Draw(frv2);
   gVM->Draw(frvSeis2,"same");
}


- ROOT page - VEGA page - Class index - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to , or contact with any questions or problems regarding ROOT or VEGA.