// @(#)root/proof:$Id$
// Author: Sangsu Ryu 2010

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

#ifndef ROOT_TProofNodes
#define ROOT_TProofNodes

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TProofNodes                                                          //
//                                                                      //
// PROOF worker nodes information                                       //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TObject
#include "TObject.h"
#endif

class TProof;
class TMap;

class TProofNodes: public TObject {
private:
   TProof *fProof;
   TMap   *fNodes;        // Map of node infos
   TMap   *fActiveNodes;  // Map of active node infos
   Int_t   fMaxWrksNode;  // Max number of workers per node
   Int_t   fMinWrksNode;  // Min number of workers per node
   Int_t   fNNodes;       // Number of nodes
   Int_t   fNWrks;        // Number of workers
   Int_t   fNActiveWrks;  // Number of active workers
   Int_t   fNCores;       // Number of total cores

   void Build();
public:
   TProofNodes(TProof* proof);

   virtual ~TProofNodes();
   Int_t ActivateWorkers(Int_t nwrks);
   Int_t ActivateWorkers(const char *workers);
   Int_t GetMaxWrksPerNode() const { return fMaxWrksNode; }
   Int_t GetNWorkersCluster() const { return fNWrks; }
   Int_t GetNNodes() const { return fNNodes; }
   Int_t GetNCores() const { return fNCores; }
   Int_t GetMinWrksPerNode() const { return fMinWrksNode; }
   Int_t GetNActives() const { return fNActiveWrks; }
   TMap* GetMapOfNodes() const { return fNodes; }
   TMap* GetMapOfActiveNodes() const { return fActiveNodes; }
   void Print(Option_t* option="") const;

   ClassDef(TProofNodes, 0) //Node and worker information
};

#endif
 TProofNodes.h:1
 TProofNodes.h:2
 TProofNodes.h:3
 TProofNodes.h:4
 TProofNodes.h:5
 TProofNodes.h:6
 TProofNodes.h:7
 TProofNodes.h:8
 TProofNodes.h:9
 TProofNodes.h:10
 TProofNodes.h:11
 TProofNodes.h:12
 TProofNodes.h:13
 TProofNodes.h:14
 TProofNodes.h:15
 TProofNodes.h:16
 TProofNodes.h:17
 TProofNodes.h:18
 TProofNodes.h:19
 TProofNodes.h:20
 TProofNodes.h:21
 TProofNodes.h:22
 TProofNodes.h:23
 TProofNodes.h:24
 TProofNodes.h:25
 TProofNodes.h:26
 TProofNodes.h:27
 TProofNodes.h:28
 TProofNodes.h:29
 TProofNodes.h:30
 TProofNodes.h:31
 TProofNodes.h:32
 TProofNodes.h:33
 TProofNodes.h:34
 TProofNodes.h:35
 TProofNodes.h:36
 TProofNodes.h:37
 TProofNodes.h:38
 TProofNodes.h:39
 TProofNodes.h:40
 TProofNodes.h:41
 TProofNodes.h:42
 TProofNodes.h:43
 TProofNodes.h:44
 TProofNodes.h:45
 TProofNodes.h:46
 TProofNodes.h:47
 TProofNodes.h:48
 TProofNodes.h:49
 TProofNodes.h:50
 TProofNodes.h:51
 TProofNodes.h:52
 TProofNodes.h:53
 TProofNodes.h:54
 TProofNodes.h:55
 TProofNodes.h:56
 TProofNodes.h:57
 TProofNodes.h:58
 TProofNodes.h:59
 TProofNodes.h:60
 TProofNodes.h:61
 TProofNodes.h:62