#include "TROOT.h"
#include "TVirtualTreePlayer.h"
#include "TPluginManager.h"
#include "TClass.h"
TClass *TVirtualTreePlayer::fgPlayer = 0;
TVirtualTreePlayer *TVirtualTreePlayer::fgCurrent = 0;
ClassImp(TVirtualTreePlayer)
TVirtualTreePlayer *TVirtualTreePlayer::TreePlayer(TTree *obj)
{
if (!fgPlayer) {
TPluginHandler *h;
if ((h = gROOT->GetPluginManager()->FindHandler("TVirtualTreePlayer"))) {
if (h->LoadPlugin() == -1)
return 0;
TVirtualTreePlayer::SetPlayer(h->GetClass());
}
if (!fgPlayer) return 0;
}
TVirtualTreePlayer *p = (TVirtualTreePlayer*)fgPlayer->New();
if (p) p->SetTree(obj);
fgCurrent = p;
return p;
}
TVirtualTreePlayer *TVirtualTreePlayer::GetCurrentPlayer()
{
return fgCurrent;
}
void TVirtualTreePlayer::SetPlayer(const char *player)
{
fgPlayer = gROOT->GetClass(player);
}
ROOT page - Class index - Class Hierarchy - 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 ROOT support, or contact the developers with any questions or problems regarding ROOT.