ROOT logo
// @(#)root/proofplayer:$Id$
// Author: G.Ganis July 2011

/*************************************************************************
 * Copyright (C) 1995-2004, 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_TProofMonSender
#define ROOT_TProofMonSender

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TProofMonSender                                                      //
//                                                                      //
// Provides the interface for PROOF monitoring to different writers.    //
// Allows to decouple the information sent from the backend.            //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TNamed
#include "TNamed.h"
#endif

class TDSet;
class TList;
class TPerfStat;

class TProofMonSender : public TNamed {

protected:
   Int_t        fSummaryVrs;           // Version of the summary 'table'
   Int_t        fDataSetInfoVrs;       // Version of the dataset info 'table'
   Int_t        fFileInfoVrs;          // Version of the file info 'table'
   enum EConfigBits {                  // TProofMonSender status/config bits
      kSendSummary        = BIT(15),   // Toggle sending of summary
      kSendDataSetInfo    = BIT(16),   // Toggle sending of dataset info
      kSendFileInfo       = BIT(17)    // Toggle sending of files info
   };

   // Auxilliary class describing dataset multiplets
   class TDSetPlet : public TNamed {
   public:
      Int_t    fFiles;
      Int_t    fMissing;
      TDSet   *fDSet;
      TDSetPlet(const char *name, TDSet *ds = 0) :
         TNamed(name, ""), fFiles(0), fMissing(0), fDSet(ds) { }
      virtual ~TDSetPlet() { }
   };
    
public:

   TProofMonSender(const char *n = "Abstract",
                   const char *t = "ProofMonSender") : TNamed(n,t),
                   fSummaryVrs(2), fDataSetInfoVrs(1), fFileInfoVrs(1)
                   { SetBit(TObject::kInvalidObject);
                     SetBit(kSendSummary);
                     SetBit(kSendDataSetInfo);
                     ResetBit(kSendFileInfo); }
   virtual ~TProofMonSender() { }

   // This changes the send control options
   Int_t SetSendOptions(const char *);

   // Object validity
   Bool_t IsValid() const { return (TestBit(TObject::kInvalidObject)) ? kFALSE : kTRUE; }

   // Summary record
   virtual Int_t SendSummary(TList *, const char *) = 0;

   // Information about the dataset(s) processed
   virtual Int_t SendDataSetInfo(TDSet *, TList *, const char *, const char *) = 0;

   // Detailed information about files
   virtual Int_t SendFileInfo(TDSet *, TList *, const char *, const char *) = 0;
   
   ClassDef(TProofMonSender,0); // Interface for PROOF monitoring
};

#endif
 TProofMonSender.h:1
 TProofMonSender.h:2
 TProofMonSender.h:3
 TProofMonSender.h:4
 TProofMonSender.h:5
 TProofMonSender.h:6
 TProofMonSender.h:7
 TProofMonSender.h:8
 TProofMonSender.h:9
 TProofMonSender.h:10
 TProofMonSender.h:11
 TProofMonSender.h:12
 TProofMonSender.h:13
 TProofMonSender.h:14
 TProofMonSender.h:15
 TProofMonSender.h:16
 TProofMonSender.h:17
 TProofMonSender.h:18
 TProofMonSender.h:19
 TProofMonSender.h:20
 TProofMonSender.h:21
 TProofMonSender.h:22
 TProofMonSender.h:23
 TProofMonSender.h:24
 TProofMonSender.h:25
 TProofMonSender.h:26
 TProofMonSender.h:27
 TProofMonSender.h:28
 TProofMonSender.h:29
 TProofMonSender.h:30
 TProofMonSender.h:31
 TProofMonSender.h:32
 TProofMonSender.h:33
 TProofMonSender.h:34
 TProofMonSender.h:35
 TProofMonSender.h:36
 TProofMonSender.h:37
 TProofMonSender.h:38
 TProofMonSender.h:39
 TProofMonSender.h:40
 TProofMonSender.h:41
 TProofMonSender.h:42
 TProofMonSender.h:43
 TProofMonSender.h:44
 TProofMonSender.h:45
 TProofMonSender.h:46
 TProofMonSender.h:47
 TProofMonSender.h:48
 TProofMonSender.h:49
 TProofMonSender.h:50
 TProofMonSender.h:51
 TProofMonSender.h:52
 TProofMonSender.h:53
 TProofMonSender.h:54
 TProofMonSender.h:55
 TProofMonSender.h:56
 TProofMonSender.h:57
 TProofMonSender.h:58
 TProofMonSender.h:59
 TProofMonSender.h:60
 TProofMonSender.h:61
 TProofMonSender.h:62
 TProofMonSender.h:63
 TProofMonSender.h:64
 TProofMonSender.h:65
 TProofMonSender.h:66
 TProofMonSender.h:67
 TProofMonSender.h:68
 TProofMonSender.h:69
 TProofMonSender.h:70
 TProofMonSender.h:71
 TProofMonSender.h:72
 TProofMonSender.h:73
 TProofMonSender.h:74
 TProofMonSender.h:75
 TProofMonSender.h:76
 TProofMonSender.h:77
 TProofMonSender.h:78
 TProofMonSender.h:79
 TProofMonSender.h:80
 TProofMonSender.h:81
 TProofMonSender.h:82
 TProofMonSender.h:83
 TProofMonSender.h:84