//*-- Author :    Damir Buskulic   21/03/03

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// VVirtualFrameChannelPlayer                                           //
//                                                                      //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#include "TROOT.h"
#include "TPluginManager.h"
#include "VVirtualFrameChannelPlayer.h"

TClass  *VVirtualFrameChannelPlayer::mgPlayer = 0;

ClassImp(VVirtualFrameChannelPlayer)

//______________________________________________________________________________
VVirtualFrameChannelPlayer::VVirtualFrameChannelPlayer() : TObject()
{
//
// Frame channel player constructor
//
   mProcVectList   = "";
   mProcStart      = 0;
   mProcLength     = -1;
   mProcStep       = 0;
}

//______________________________________________________________________________
  VVirtualFrameChannelPlayer *VVirtualFrameChannelPlayer::FrameChannelPlayer(VVirtualFrameChannel *obj)
{
   // Static function returning a pointer to a frame channel player.
   // The player will process the specified obj. If the frame channel player
   // does not exist a default player is created.

   // if no player set yet,  create a default player via the PluginManager
   if (!mgPlayer) {
      TPluginHandler *h;
      //if ((h = GetPluginManager()->FindHandler("TVirtualProof")))
      //   h->LoadPlugin();
      if ((h = gROOT->GetPluginManager()->FindHandler("VVirtualFrameChannelPlayer"))) {
         if (h->LoadPlugin() == -1) {
            return 0;}
         VVirtualFrameChannelPlayer::SetPlayer(h->GetClass());
         if (!mgPlayer) return 0;
      } else return 0;
   }
   //create an instance of the Tree player
   VVirtualFrameChannelPlayer *p = (VVirtualFrameChannelPlayer*)mgPlayer->New();
   if (p) p->SetFrameChannel(obj);
   return p;
}

//______________________________________________________________________________
  void VVirtualFrameChannelPlayer::SetPlayer(const char *player)
{
   // Static function to set an alternative frame channel player.

   mgPlayer = gROOT->GetClass(player);
}

//______________________________________________________________________________
  void VVirtualFrameChannelPlayer::StartEmptyViewer()
{
   // Static function to start an emty viewer.

   if (gROOT->IsBatch()) {
      printf("Warning in <VVirtualFrameChannelPlayer::StartEmptyViewer> : Viewer cannot run in batch moden");
      return;
   }

// Load the viewer library if necessary
   TPluginHandler *h;
   if ((h = gROOT->GetPluginManager()->FindHandler("VVirtualFrameChannelViewer"))) {
      if (h->LoadPlugin() == -1) return;
      h->ExecPlugin(1,0);
   }   
}


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