//*-- Author : Damir Buskulic 22/04/03//////////////////////////////////////////////////////////////////////////// //// VFrameChannelViewer //// //// Viewer based on Data Display. Allows users to view frame and vector //// data from an interactive session in Vega. //// If fc is a frame channel already defined, the command //// //// vega[] fc->StartViewer() //// //// will launch it. //// Uses code from Data Display, developped by D. Verkindt for Virgo. //// ////////////////////////////////////////////////////////////////////////////
#include "VFrameChannelViewer.h"
#include "TROOT.h"
#include "VDyPlot.h"
#include "TH2.h"
extern "C" {
#include "dataDisplay.h"
}
ClassImp(VFrameChannelViewer)
//______________________________________________________________________________VFrameChannelViewer::VFrameChannelViewer()
{
//*-*-*-*-*-*-*-*-*-*Default FrameChannel player constructor*-*-*-*-*-*-*-*//*-* =======================================mFrameChannel = 0;
}
//______________________________________________________________________________VFrameChannelViewer::VFrameChannelViewer(VVirtualFrameChannel *fc)
{
//*-*-*-*-*-*-*-*-*-*Default FrameChannel player constructor*-*-*-*-*-*-*-*//*-* =======================================mFrameChannel = fc;
if (gROOT->IsBatch()) {
Warning("VFrameChannelViewer","Cannot launch viewer in batch mode");
} else if (Dy == 0) {
DyMain((void*)mFrameChannel);
} else {
Warning("VFrameChannelViewer","Only one viewer possible at a time");
}
}
//______________________________________________________________________________doubleVFrameChannelViewer::GetCurrentTime()
{
return DyGetStartTime();
}
//______________________________________________________________________________TObject* VFrameChannelViewer::GetPlot(int numpad, int numsubpad)
{
// Return a pointer to a plot drawn by the viewer// numpad and numsubpad are the pad and subpad number// of the plot inside the viewer canvas
TObject* obj=0;
TPad* savepad = (TPad*)gPad;
gDDCanvas->cd(numpad);
if (numsubpad && gPad) gPad->cd(numsubpad);
// Loop on all objects contained in the pad
TIter next(gPad->GetListOfPrimitives());
while ((obj = next())) {
// If 1Dim plot or 2Dim histo
if (obj->InheritsFrom(VDyPlot::Class()) ||
obj->InheritsFrom(TH2F::Class())) {
break;
}
}
savepad->cd();
return obj;
}
- 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.