Extracting and displaying some slow monitoring data

{
// This example shows how to plot a set of slow monitoring values.
// To see the result of this macro, click  here 
// A ntuple is build and used to plot various combinations of variables.
 
   gROOT->Reset();
   gBenchmark->Start("sms");

   // Open a new window (canvas)   

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

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

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

   fcsms = new VFrameChannel("SMSdemoDB.root");

// ===== First builds the ntuple from the MYGOSMS station values =====

   nt = fcsms->ExtractSMS("nt","MYGOSMS",600000000,5000);

   gBenchmark->Show("sms");

// ===== Then draws the plots =====

   c1->cd(1);                           // select the first pad

  // Sets some style options
   gStyle->SetMarkerColor(50);
   gStyle->SetMarkerStyle(8);
   gStyle->SetMarkerSize(0.5);

  // Draws the value VF1 with respect to time 
  // t is automatically filled as the first variable of the ntuple at extraction
   nt->DrawSeries("MYGOSMS.VF1","","P");
   
  // Gets the last plot produced and sets some options
   vs = gVM->GetLastPlot();
   vs->SetTitle("");
   
  // Superimposes the values of sqrt(VI2+50) (it's an example)
   nt->DrawSeries("sqrt(MYGOSMS.VI2+50)","","same");
   vs = gVM->GetLastPlot();
   vs->SetLineColor(4);
  
  // Draws a title for the graphs
   pl = new TPaveLabel(-400,135,1000,156,"VF1,sqrt(VI2+50)","br");
   pl->Draw();
   
// ===== In the second pad, draws a histogram =====
// ===== of values VF1 with respect to sqrt(VI2+50)    =====

   c1->cd(2);                          // select the second pad
  // Draws the histogram
   nt->Draw("MYGOSMS.VF1:sqrt(MYGOSMS.VI2+50)","","cont0");
}


- 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.