Logo ROOT   6.08/07
Reference Guide
TVirtualMonitoring.h
Go to the documentation of this file.
1 // @(#)root/base:$Id$
2 // Author: Andreas-Joachim Peters 15/05/2006
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2006, 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_TVirtualMonitoring
13 #define ROOT_TVirtualMonitoring
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TVirtualMonitoring //
18 // //
19 // Provides the interface for Monitoring plugins. //
20 // //
21 //////////////////////////////////////////////////////////////////////////
22 
23 #ifndef ROOT_TNamed
24 #include "TNamed.h"
25 #endif
26 
27 #ifndef ROOT_TList
28 #include "TList.h"
29 #endif
30 #ifndef ROOT_TMap
31 #include "TMap.h"
32 #endif
33 
34 class TFile;
35 
37 
38 private:
39 
40  TVirtualMonitoringWriter(const TVirtualMonitoringWriter&); // Not implemented
42 
43  Double_t fValue; // double monitor value
44 
45 protected:
46  TList *fTmpOpenPhases; // To store open phases when there is not yet an object
47 
48 public:
49  TVirtualMonitoringWriter() : TNamed(), fValue(0), fTmpOpenPhases(0) { }
51  : TNamed(name, ""), fValue(value), fTmpOpenPhases(0) { }
52 
53  virtual ~TVirtualMonitoringWriter() { if (fTmpOpenPhases) delete fTmpOpenPhases; }
54 
55  // TFile related info. In general they are gathered and sent only sometimes as summaries
56  virtual Bool_t SendFileCloseEvent(TFile * /*file*/)
57  { MayNotUse("SendFileCloseEvent"); return kFALSE; }
58  virtual Bool_t SendFileReadProgress(TFile * /*file*/)
59  { MayNotUse("SendFileReadProgress"); return kFALSE; }
60  virtual Bool_t SendFileWriteProgress(TFile * /*file*/)
61  { MayNotUse("SendFileWriteProgress"); return kFALSE; }
62 
63  virtual Bool_t SendParameters(TList * /*valuelist*/, const char * /*identifier*/ = 0)
64  { MayNotUse("SendParameters"); return kFALSE; }
65  virtual Bool_t SendInfoTime() { MayNotUse("SendInfoTime"); return kFALSE; }
66  virtual Bool_t SendInfoUser(const char * /*user*/ = 0) { MayNotUse("SendInfoUser"); return kFALSE; }
67  virtual Bool_t SendInfoDescription(const char * /*jobtag*/) { MayNotUse("SendInfoDescription"); return kFALSE; }
68  virtual Bool_t SendInfoStatus(const char * /*status*/) { MayNotUse("SendInfoStatus"); return kFALSE; }
69 
70  // An Open might have several phases, and the timings might be interesting
71  // to report
72  // The info is only gathered into openphasestime, and sent when forcesend=kTRUE
73  virtual Bool_t SendFileOpenProgress(TFile * /*file*/, TList * /*openphases*/,
74  const char * /*openphasename*/,
75  Bool_t /*forcesend*/ = kFALSE )
76  { MayNotUse("SendFileOpenProgress"); return kFALSE; }
77 
78  virtual Bool_t SendProcessingStatus(const char * /*status*/, Bool_t /*restarttimer*/ = kFALSE)
79  { MayNotUse("SendProcessingStatus"); return kFALSE; }
80  virtual Bool_t SendProcessingProgress(Double_t /*nevent*/, Double_t /*nbytes*/, Bool_t /*force*/ = kFALSE)
81  { MayNotUse("SendProcessingProgress"); return kFALSE; }
82  virtual void SetLogLevel(const char * /*loglevel*/ = "WARNING")
83  { MayNotUse("SetLogLevel"); };
84  virtual void Verbose(Bool_t /*onoff*/) { MayNotUse("Verbose"); }
85 
86  ClassDef(TVirtualMonitoringWriter,0) // ABC for Sending Monitoring Information
87 };
88 
89 
91 
92 public:
93  TVirtualMonitoringReader( const char * /*serviceurl*/ ="") { }
95 
96  virtual void DumpResult() { MayNotUse("DumpResult"); }
97  virtual void GetValues(const char * /*farmName*/, const char * /*clusterName*/,
98  const char * /*nodeName*/, const char * /*paramName*/,
99  Long_t /*min*/, Long_t /*max*/, Bool_t /*debug*/ = kFALSE)
100  { MayNotUse("GetValues"); }
101  virtual void GetLastValues(const char * /*farmName*/, const char * /*clusterName*/,
102  const char * /*nodeName*/, const char * /*paramName*/,
103  Bool_t /*debug*/ =kFALSE)
104  { MayNotUse("GetLastValues"); }
105  virtual void ProxyValues(const char * /*farmName*/, const char * /*clusterName*/,
106  const char * /*nodeName*/, const char * /*paramName*/,
107  Long_t /*min*/, Long_t /*max*/, Long_t /*lifetime*/)
108  { MayNotUse("ProxyValues"); }
109 
110  virtual TMap *GetMap() { MayNotUse("GetMap"); return 0; }
111  virtual void DeleteMap(TMap * /*map*/) { MayNotUse("DeleteMap"); }
112 
113  ClassDef(TVirtualMonitoringReader, 1) // ABC for Reading Monitoring Information
114 };
115 
116 
119 
120 
121 #endif
virtual Bool_t SendFileCloseEvent(TFile *)
virtual Bool_t SendFileWriteProgress(TFile *)
virtual void SetLogLevel(const char *="WARNING")
virtual Bool_t SendInfoStatus(const char *)
virtual void Verbose(Bool_t)
virtual Bool_t SendProcessingProgress(Double_t, Double_t, Bool_t=kFALSE)
virtual Bool_t SendFileOpenProgress(TFile *, TList *, const char *, Bool_t=kFALSE)
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
Definition: TFile.h:50
virtual void GetLastValues(const char *, const char *, const char *, const char *, Bool_t=kFALSE)
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
#define ClassDef(name, id)
Definition: Rtypes.h:254
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:33
R__EXTERN TVirtualMonitoringWriter * gMonitoringWriter
TVirtualMonitoringWriter & operator=(const TVirtualMonitoringWriter &)
R__EXTERN TVirtualMonitoringReader * gMonitoringReader
void MayNotUse(const char *method) const
Use this method to signal that a method (defined in a base class) may not be called in a derived clas...
Definition: TObject.cxx:978
A doubly linked list.
Definition: TList.h:47
virtual Bool_t SendInfoTime()
virtual Bool_t SendParameters(TList *, const char *=0)
virtual Bool_t SendProcessingStatus(const char *, Bool_t=kFALSE)
long Long_t
Definition: RtypesCore.h:50
double Double_t
Definition: RtypesCore.h:55
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
Definition: TMap.h:44
TVirtualMonitoringWriter(const char *name, Double_t value)
virtual Bool_t SendFileReadProgress(TFile *)
#define R__EXTERN
Definition: DllImport.h:27
TVirtualMonitoringReader(const char *="")
virtual void DeleteMap(TMap *)
virtual void ProxyValues(const char *, const char *, const char *, const char *, Long_t, Long_t, Long_t)
char name[80]
Definition: TGX11.cxx:109
virtual Bool_t SendInfoDescription(const char *)
virtual void GetValues(const char *, const char *, const char *, const char *, Long_t, Long_t, Bool_t=kFALSE)
virtual Bool_t SendInfoUser(const char *=0)