Logo ROOT  
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 #include "TNamed.h"
24 
25 #ifdef R__LESS_INCLUDES
26 class TList;
27 class TMap;
28 #else
29 #include "TList.h"
30 #include "TMap.h"
31 #endif
32 
33 class TFile;
34 
36 
37 private:
38 
41 
42  Double_t fValue; // double monitor value
43 
44 protected:
45  TList *fTmpOpenPhases; // To store open phases when there is not yet an object
46 
47 public:
50  : TNamed(name, ""), fValue(value), fTmpOpenPhases(0) { }
51 
52  virtual ~TVirtualMonitoringWriter();
53 
54  // TFile related info. In general they are gathered and sent only sometimes as summaries
55  virtual Bool_t SendFileCloseEvent(TFile * /*file*/)
56  { MayNotUse("SendFileCloseEvent"); return kFALSE; }
57  virtual Bool_t SendFileReadProgress(TFile * /*file*/)
58  { MayNotUse("SendFileReadProgress"); return kFALSE; }
59  virtual Bool_t SendFileWriteProgress(TFile * /*file*/)
60  { MayNotUse("SendFileWriteProgress"); return kFALSE; }
61 
62  virtual Bool_t SendParameters(TList * /*valuelist*/, const char * /*identifier*/ = 0)
63  { MayNotUse("SendParameters"); return kFALSE; }
64  virtual Bool_t SendInfoTime() { MayNotUse("SendInfoTime"); return kFALSE; }
65  virtual Bool_t SendInfoUser(const char * /*user*/ = 0) { MayNotUse("SendInfoUser"); return kFALSE; }
66  virtual Bool_t SendInfoDescription(const char * /*jobtag*/) { MayNotUse("SendInfoDescription"); return kFALSE; }
67  virtual Bool_t SendInfoStatus(const char * /*status*/) { MayNotUse("SendInfoStatus"); return kFALSE; }
68 
69  // An Open might have several phases, and the timings might be interesting
70  // to report
71  // The info is only gathered into openphasestime, and sent when forcesend=kTRUE
72  virtual Bool_t SendFileOpenProgress(TFile * /*file*/, TList * /*openphases*/,
73  const char * /*openphasename*/,
74  Bool_t /*forcesend*/ = kFALSE )
75  { MayNotUse("SendFileOpenProgress"); return kFALSE; }
76 
77  virtual Bool_t SendProcessingStatus(const char * /*status*/, Bool_t /*restarttimer*/ = kFALSE)
78  { MayNotUse("SendProcessingStatus"); return kFALSE; }
79  virtual Bool_t SendProcessingProgress(Double_t /*nevent*/, Double_t /*nbytes*/, Bool_t /*force*/ = kFALSE)
80  { MayNotUse("SendProcessingProgress"); return kFALSE; }
81  virtual void SetLogLevel(const char * /*loglevel*/ = "WARNING")
82  { MayNotUse("SetLogLevel"); };
83  virtual void Verbose(Bool_t /*onoff*/) { MayNotUse("Verbose"); }
84 
85  ClassDef(TVirtualMonitoringWriter,0) // ABC for Sending Monitoring Information
86 };
87 
88 
90 
91 public:
92  TVirtualMonitoringReader( const char * /*serviceurl*/ ="") { }
94 
95  virtual void DumpResult() { MayNotUse("DumpResult"); }
96  virtual void GetValues(const char * /*farmName*/, const char * /*clusterName*/,
97  const char * /*nodeName*/, const char * /*paramName*/,
98  Long_t /*min*/, Long_t /*max*/, Bool_t /*debug*/ = kFALSE)
99  { MayNotUse("GetValues"); }
100  virtual void GetLastValues(const char * /*farmName*/, const char * /*clusterName*/,
101  const char * /*nodeName*/, const char * /*paramName*/,
102  Bool_t /*debug*/ =kFALSE)
103  { MayNotUse("GetLastValues"); }
104  virtual void ProxyValues(const char * /*farmName*/, const char * /*clusterName*/,
105  const char * /*nodeName*/, const char * /*paramName*/,
106  Long_t /*min*/, Long_t /*max*/, Long_t /*lifetime*/)
107  { MayNotUse("ProxyValues"); }
108 
109  virtual TMap *GetMap() { MayNotUse("GetMap"); return 0; }
110  virtual void DeleteMap(TMap * /*map*/) { MayNotUse("DeleteMap"); }
111 
112  ClassDef(TVirtualMonitoringReader, 1) // ABC for Reading Monitoring Information
113 };
114 
115 
118 
119 
120 #endif
TVirtualMonitoringWriter::SendInfoUser
virtual Bool_t SendInfoUser(const char *=0)
Definition: TVirtualMonitoring.h:65
gMonitoringReader
R__EXTERN TVirtualMonitoringReader * gMonitoringReader
Definition: TVirtualMonitoring.h:117
TVirtualMonitoringWriter::~TVirtualMonitoringWriter
virtual ~TVirtualMonitoringWriter()
destructor
Definition: TVirtualMonitoring.cxx:33
TVirtualMonitoringReader::TVirtualMonitoringReader
TVirtualMonitoringReader(const char *="")
Definition: TVirtualMonitoring.h:92
TVirtualMonitoringWriter::TVirtualMonitoringWriter
TVirtualMonitoringWriter()
Definition: TVirtualMonitoring.h:48
TVirtualMonitoringWriter::fValue
Double_t fValue
Definition: TVirtualMonitoring.h:42
TNamed.h
TVirtualMonitoringReader::~TVirtualMonitoringReader
virtual ~TVirtualMonitoringReader()
Definition: TVirtualMonitoring.h:93
TVirtualMonitoringReader::GetMap
virtual TMap * GetMap()
Definition: TVirtualMonitoring.h:109
TVirtualMonitoringWriter::SendInfoDescription
virtual Bool_t SendInfoDescription(const char *)
Definition: TVirtualMonitoring.h:66
TVirtualMonitoringReader::ProxyValues
virtual void ProxyValues(const char *, const char *, const char *, const char *, Long_t, Long_t, Long_t)
Definition: TVirtualMonitoring.h:104
TVirtualMonitoringWriter
Definition: TVirtualMonitoring.h:35
TList.h
TObject::MayNotUse
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:943
TVirtualMonitoringWriter::TVirtualMonitoringWriter
TVirtualMonitoringWriter(const char *name, Double_t value)
Definition: TVirtualMonitoring.h:49
TVirtualMonitoringReader
Definition: TVirtualMonitoring.h:89
bool
TVirtualMonitoringWriter::TVirtualMonitoringWriter
TVirtualMonitoringWriter(const TVirtualMonitoringWriter &)=delete
TVirtualMonitoringReader::GetValues
virtual void GetValues(const char *, const char *, const char *, const char *, Long_t, Long_t, Bool_t=kFALSE)
Definition: TVirtualMonitoring.h:96
TVirtualMonitoringWriter::SendFileOpenProgress
virtual Bool_t SendFileOpenProgress(TFile *, TList *, const char *, Bool_t=kFALSE)
Definition: TVirtualMonitoring.h:72
TNamed
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
TVirtualMonitoringWriter::SendParameters
virtual Bool_t SendParameters(TList *, const char *=0)
Definition: TVirtualMonitoring.h:62
Long_t
long Long_t
Definition: RtypesCore.h:54
TVirtualMonitoringWriter::fTmpOpenPhases
TList * fTmpOpenPhases
Definition: TVirtualMonitoring.h:45
TVirtualMonitoringReader::DumpResult
virtual void DumpResult()
Definition: TVirtualMonitoring.h:95
TVirtualMonitoringWriter::SendInfoStatus
virtual Bool_t SendInfoStatus(const char *)
Definition: TVirtualMonitoring.h:67
TVirtualMonitoringWriter::SetLogLevel
virtual void SetLogLevel(const char *="WARNING")
Definition: TVirtualMonitoring.h:81
TVirtualMonitoringWriter::SendProcessingStatus
virtual Bool_t SendProcessingStatus(const char *, Bool_t=kFALSE)
Definition: TVirtualMonitoring.h:77
TFile
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
Definition: TFile.h:54
TVirtualMonitoringWriter::SendFileWriteProgress
virtual Bool_t SendFileWriteProgress(TFile *)
Definition: TVirtualMonitoring.h:59
TVirtualMonitoringWriter::SendInfoTime
virtual Bool_t SendInfoTime()
Definition: TVirtualMonitoring.h:64
Double_t
double Double_t
Definition: RtypesCore.h:59
TVirtualMonitoringReader::DeleteMap
virtual void DeleteMap(TMap *)
Definition: TVirtualMonitoring.h:110
TVirtualMonitoringWriter::SendFileCloseEvent
virtual Bool_t SendFileCloseEvent(TFile *)
Definition: TVirtualMonitoring.h:55
TVirtualMonitoringWriter::Verbose
virtual void Verbose(Bool_t)
Definition: TVirtualMonitoring.h:83
gMonitoringWriter
R__EXTERN TVirtualMonitoringWriter * gMonitoringWriter
Definition: TVirtualMonitoring.h:116
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TMap.h
name
char name[80]
Definition: TGX11.cxx:110
TVirtualMonitoringWriter::SendFileReadProgress
virtual Bool_t SendFileReadProgress(TFile *)
Definition: TVirtualMonitoring.h:57
R__EXTERN
#define R__EXTERN
Definition: DllImport.h:27
TVirtualMonitoringReader::GetLastValues
virtual void GetLastValues(const char *, const char *, const char *, const char *, Bool_t=kFALSE)
Definition: TVirtualMonitoring.h:100
TList
A doubly linked list.
Definition: TList.h:44
TVirtualMonitoringWriter::operator=
TVirtualMonitoringWriter & operator=(const TVirtualMonitoringWriter &)=delete
TVirtualMonitoringWriter::SendProcessingProgress
virtual Bool_t SendProcessingProgress(Double_t, Double_t, Bool_t=kFALSE)
Definition: TVirtualMonitoring.h:79
TMap
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
Definition: TMap.h:40