TVirtualProofPlayer.cxx

Go to the documentation of this file.
00001 // @(#)root/proof:$Id: TVirtualProofPlayer.cxx 21467 2007-12-18 17:44:44Z ganis $
00002 // Author: Fons Rademakers   15/03/07
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 //////////////////////////////////////////////////////////////////////////
00013 //                                                                      //
00014 // TVirtualProofPlayer                                                  //
00015 //                                                                      //
00016 // Abstract interface for the PROOF player.                             //
00017 // See the concrete implementations under 'proofplayer' for details.    //
00018 //                                                                      //
00019 //////////////////////////////////////////////////////////////////////////
00020 
00021 #include "TVirtualProofPlayer.h"
00022 #include "TPluginManager.h"
00023 #include "TROOT.h"
00024 #include "TError.h"
00025 
00026 //______________________________________________________________________________
00027 TVirtualProofPlayer *TVirtualProofPlayer::Create(const char *player,
00028                                                  TProof *pr, TSocket *s)
00029 {
00030    // Create a PROOF player.
00031 
00032    TPluginHandler *h;
00033    TVirtualProofPlayer *p = 0;
00034 
00035    if (!player || !*player) {
00036       ::Error("TVirtualProofPlayer::Create", "player name missing");
00037       return 0;
00038    }
00039 
00040    if ((h = gROOT->GetPluginManager()->FindHandler("TVirtualProofPlayer", player))) {
00041       if (h->LoadPlugin() == -1)
00042          return 0;
00043       if (!strcmp(player, "slave"))
00044          p = (TVirtualProofPlayer *) h->ExecPlugin(1, s);
00045       else
00046          p = (TVirtualProofPlayer *) h->ExecPlugin(1, pr);
00047    }
00048 
00049    return p;
00050 }

Generated on Tue Jul 5 14:51:42 2011 for ROOT_528-00b_version by  doxygen 1.5.1