Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TProofMonSender.h
Go to the documentation of this file.
1 // @(#)root/proofplayer:$Id$
2 // Author: G.Ganis July 2011
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2004, 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 #ifndef ROOT_TProofMonSender
13 #define ROOT_TProofMonSender
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TProofMonSender //
18 // //
19 // Provides the interface for PROOF monitoring to different writers. //
20 // Allows to decouple the information sent from the backend. //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 #include "TNamed.h"
25 
26 class TDSet;
27 class TList;
28 class TPerfStat;
29 
30 class TProofMonSender : public TNamed {
31 
32 protected:
33  Int_t fSummaryVrs; // Version of the summary 'table'
34  Int_t fDataSetInfoVrs; // Version of the dataset info 'table'
35  Int_t fFileInfoVrs; // Version of the file info 'table'
36  enum EConfigBits { // TProofMonSender status/config bits
37  kSendSummary = BIT(15), // Toggle sending of summary
38  kSendDataSetInfo = BIT(16), // Toggle sending of dataset info
39  kSendFileInfo = BIT(17) // Toggle sending of files info
40  };
41 
42  // Auxilliary class describing dataset multiplets
43  class TDSetPlet : public TNamed {
44  public:
45  Int_t fFiles;
46  Int_t fMissing;
47  TDSet *fDSet;
48  TDSetPlet(const char *name, TDSet *ds = 0) :
49  TNamed(name, ""), fFiles(0), fMissing(0), fDSet(ds) { }
50  virtual ~TDSetPlet() { }
51  };
52 
53 public:
54 
55  TProofMonSender(const char *n = "Abstract",
56  const char *t = "ProofMonSender") : TNamed(n,t),
57  fSummaryVrs(2), fDataSetInfoVrs(1), fFileInfoVrs(1)
58  { SetBit(TObject::kInvalidObject);
59  SetBit(kSendSummary);
60  SetBit(kSendDataSetInfo);
61  ResetBit(kSendFileInfo); }
62  virtual ~TProofMonSender() { }
63 
64  // This changes the send control options
65  Int_t SetSendOptions(const char *);
66 
67  // Object validity
68  Bool_t IsValid() const { return (TestBit(TObject::kInvalidObject)) ? kFALSE : kTRUE; }
69 
70  // Summary record
71  virtual Int_t SendSummary(TList *, const char *) = 0;
72 
73  // Information about the dataset(s) processed
74  virtual Int_t SendDataSetInfo(TDSet *, TList *, const char *, const char *) = 0;
75 
76  // Detailed information about files
77  virtual Int_t SendFileInfo(TDSet *, TList *, const char *, const char *) = 0;
78 
79  ClassDef(TProofMonSender,0); // Interface for PROOF monitoring
80 };
81 
82 #endif