{
// This simple example opens a demo meta database and plots a vector.// The vector is scrolled 1 s at a time, nvecmax times.// The extraction of the vector shows that one can select a vector// without having to think about the frame boundaries.// The length of the vector is arbitrary and is only limited by the available// amount of memory.
gROOT->Reset();
gBenchmark->Start("scroll");
FrVect* frv;
double time;
// Max number of vectors displayedint nvecmax = 20;
// Time step of the scrolldouble tistep = 1;
// Length of the displayed vectordouble veclength = 4;
// Open a new window (canvas)
c1 = new TCanvas("c1","c1",1);
// Open a frame channel
fc = new VFrameChannel("demoDB.root");
// Start time
time = fc->GetStart();
// Get the first vector
frv = fc->GetVect("adc.MYGO_ADC1",time,veclength);
int nvec = 0;
while ( (frv!=0) && (nvec<nvecmax) ) {
nvec++;
printf("nvect = %d, time = %fn",nvec,time);
// Draws the vectorgVM->Draw(frv);
// Update the canvas
gPad->Update();
FrVectFree(frv);
time += tistep;
frv = fc->GetVect("adc.MYGO_ADC1",time,veclength); // Get the next vector
}
gBenchmark->Show("scroll");
}
- 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.