// @(#)root/proof:$Id$
// Author: Fons Rademakers   15/03/07

/*************************************************************************
 * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TVirtualProofPlayer                                                  //
//                                                                      //
// Abstract interface for the PROOF player.                             //
// See the concrete implementations under 'proofplayer' for details.    //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#include "TVirtualProofPlayer.h"
#include "TPluginManager.h"
#include "TROOT.h"
#include "TError.h"

//______________________________________________________________________________
TVirtualProofPlayer *TVirtualProofPlayer::Create(const char *player,
                                                 TProof *pr, TSocket *s)
{
   // Create a PROOF player.

   TPluginHandler *h;
   TVirtualProofPlayer *p = 0;

   if (!player || !*player) {
      ::Error("TVirtualProofPlayer::Create", "player name missing");
      return 0;
   }

   if ((h = gROOT->GetPluginManager()->FindHandler("TVirtualProofPlayer", player))) {
      if (h->LoadPlugin() == -1)
         return 0;
      if (!strcmp(player, "slave"))
         p = (TVirtualProofPlayer *) h->ExecPlugin(1, s);
      else
         p = (TVirtualProofPlayer *) h->ExecPlugin(1, pr);
   }

   return p;
}
 TVirtualProofPlayer.cxx:1
 TVirtualProofPlayer.cxx:2
 TVirtualProofPlayer.cxx:3
 TVirtualProofPlayer.cxx:4
 TVirtualProofPlayer.cxx:5
 TVirtualProofPlayer.cxx:6
 TVirtualProofPlayer.cxx:7
 TVirtualProofPlayer.cxx:8
 TVirtualProofPlayer.cxx:9
 TVirtualProofPlayer.cxx:10
 TVirtualProofPlayer.cxx:11
 TVirtualProofPlayer.cxx:12
 TVirtualProofPlayer.cxx:13
 TVirtualProofPlayer.cxx:14
 TVirtualProofPlayer.cxx:15
 TVirtualProofPlayer.cxx:16
 TVirtualProofPlayer.cxx:17
 TVirtualProofPlayer.cxx:18
 TVirtualProofPlayer.cxx:19
 TVirtualProofPlayer.cxx:20
 TVirtualProofPlayer.cxx:21
 TVirtualProofPlayer.cxx:22
 TVirtualProofPlayer.cxx:23
 TVirtualProofPlayer.cxx:24
 TVirtualProofPlayer.cxx:25
 TVirtualProofPlayer.cxx:26
 TVirtualProofPlayer.cxx:27
 TVirtualProofPlayer.cxx:28
 TVirtualProofPlayer.cxx:29
 TVirtualProofPlayer.cxx:30
 TVirtualProofPlayer.cxx:31
 TVirtualProofPlayer.cxx:32
 TVirtualProofPlayer.cxx:33
 TVirtualProofPlayer.cxx:34
 TVirtualProofPlayer.cxx:35
 TVirtualProofPlayer.cxx:36
 TVirtualProofPlayer.cxx:37
 TVirtualProofPlayer.cxx:38
 TVirtualProofPlayer.cxx:39
 TVirtualProofPlayer.cxx:40
 TVirtualProofPlayer.cxx:41
 TVirtualProofPlayer.cxx:42
 TVirtualProofPlayer.cxx:43
 TVirtualProofPlayer.cxx:44
 TVirtualProofPlayer.cxx:45
 TVirtualProofPlayer.cxx:46
 TVirtualProofPlayer.cxx:47
 TVirtualProofPlayer.cxx:48
 TVirtualProofPlayer.cxx:49
 TVirtualProofPlayer.cxx:50