Logo ROOT   6.14/05
Reference Guide
TVirtualProofPlayer.cxx
Go to the documentation of this file.
1 // @(#)root/proof:$Id$
2 // Author: Fons Rademakers 15/03/07
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 /** \class TVirtualProofPlayer
13 \ingroup proofkernel
14 
15 Abstract interface for the PROOF player.
16 See the concrete implementations under 'proofplayer' for details.
17 
18 */
19 
20 #include "TVirtualProofPlayer.h"
21 #include "TPluginManager.h"
22 #include "TROOT.h"
23 #include "TError.h"
24 
25 ////////////////////////////////////////////////////////////////////////////////
26 /// Create a PROOF player.
27 
29  TProof *pr, TSocket *s)
30 {
32  TVirtualProofPlayer *p = 0;
33 
34  if (!player || !*player) {
35  ::Error("TVirtualProofPlayer::Create", "player name missing");
36  return 0;
37  }
38 
39  if ((h = gROOT->GetPluginManager()->FindHandler("TVirtualProofPlayer", player))) {
40  if (h->LoadPlugin() == -1)
41  return 0;
42  if (!strcmp(player, "slave"))
43  p = (TVirtualProofPlayer *) h->ExecPlugin(1, s);
44  else
45  p = (TVirtualProofPlayer *) h->ExecPlugin(1, pr);
46  }
47 
48  return p;
49 }
#define gROOT
Definition: TROOT.h:410
Int_t LoadPlugin()
Load the plugin library for this handler.
static TVirtualProofPlayer * Create(const char *player, TProof *p, TSocket *s=0)
Create a PROOF player.
Long_t ExecPlugin(int nargs, const T &... params)
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition: TObject.cxx:880
#define h(i)
Definition: RSha256.hxx:106
This class controls a Parallel ROOT Facility, PROOF, cluster.
Definition: TProof.h:316
static constexpr double s
Abstract interface for the PROOF player.