Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TVirtualMonitoring.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // @(#)root/base:$Id$
0002 // Author: Andreas-Joachim Peters   15/05/2006
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TVirtualMonitoring
0013 #define ROOT_TVirtualMonitoring
0014 
0015 //////////////////////////////////////////////////////////////////////////
0016 //                                                                      //
0017 // TVirtualMonitoring                                                   //
0018 //                                                                      //
0019 // Provides the interface for Monitoring plugins.                       //
0020 //                                                                      //
0021 //////////////////////////////////////////////////////////////////////////
0022 
0023 #include "TNamed.h"
0024 
0025 #ifdef R__LESS_INCLUDES
0026 class TList;
0027 class TMap;
0028 #else
0029 #include "TList.h"
0030 #include "TMap.h"
0031 #endif
0032 
0033 class TFile;
0034 
0035 class TVirtualMonitoringWriter : public TNamed {
0036 
0037 private:
0038 
0039    TVirtualMonitoringWriter(const TVirtualMonitoringWriter&) = delete;
0040    TVirtualMonitoringWriter& operator=(const TVirtualMonitoringWriter&) = delete;
0041 
0042    Double_t fValue;  // double monitor value
0043 
0044 protected:
0045    TList     *fTmpOpenPhases;       // To store open phases when there is not yet an object
0046 
0047 public:
0048    TVirtualMonitoringWriter() : TNamed(), fValue(0), fTmpOpenPhases(nullptr) { }
0049    TVirtualMonitoringWriter(const char *name, Double_t value)
0050      : TNamed(name, ""), fValue(value), fTmpOpenPhases(nullptr) { }
0051 
0052    virtual ~TVirtualMonitoringWriter();
0053 
0054    // TFile related info. In general they are gathered and sent only sometimes as summaries
0055    virtual Bool_t SendFileCloseEvent(TFile * /*file*/)
0056       { MayNotUse("SendFileCloseEvent"); return kFALSE; }
0057    virtual Bool_t SendFileReadProgress(TFile * /*file*/)
0058       { MayNotUse("SendFileReadProgress"); return kFALSE; }
0059    virtual Bool_t SendFileWriteProgress(TFile * /*file*/)
0060       { MayNotUse("SendFileWriteProgress"); return kFALSE; }
0061 
0062    virtual Bool_t SendParameters(TList * /*valuelist*/, const char * /*identifier*/ = nullptr)
0063       { MayNotUse("SendParameters"); return kFALSE; }
0064    virtual Bool_t SendInfoTime() { MayNotUse("SendInfoTime"); return kFALSE; }
0065    virtual Bool_t SendInfoUser(const char * /*user*/ = nullptr) { MayNotUse("SendInfoUser"); return kFALSE; }
0066    virtual Bool_t SendInfoDescription(const char * /*jobtag*/) { MayNotUse("SendInfoDescription"); return kFALSE; }
0067    virtual Bool_t SendInfoStatus(const char * /*status*/) { MayNotUse("SendInfoStatus"); return kFALSE; }
0068 
0069    // An Open might have several phases, and the timings might be interesting
0070    // to report
0071    // The info is only gathered into openphasestime, and sent when forcesend=kTRUE
0072    virtual Bool_t SendFileOpenProgress(TFile * /*file*/, TList * /*openphases*/,
0073                                        const char * /*openphasename*/,
0074                                        Bool_t /*forcesend*/ = kFALSE )
0075       { MayNotUse("SendFileOpenProgress"); return kFALSE; }
0076 
0077    virtual Bool_t SendProcessingStatus(const char * /*status*/, Bool_t /*restarttimer*/ = kFALSE)
0078       { MayNotUse("SendProcessingStatus"); return kFALSE; }
0079    virtual Bool_t SendProcessingProgress(Double_t /*nevent*/, Double_t /*nbytes*/, Bool_t /*force*/ = kFALSE)
0080       { MayNotUse("SendProcessingProgress"); return kFALSE; }
0081    virtual void   SetLogLevel(const char * /*loglevel*/ = "WARNING")
0082       { MayNotUse("SetLogLevel"); };
0083    virtual void   Verbose(Bool_t /*onoff*/) { MayNotUse("Verbose"); }
0084 
0085    ClassDefOverride(TVirtualMonitoringWriter,0)  // ABC for Sending Monitoring Information
0086 };
0087 
0088 
0089 class TVirtualMonitoringReader : public TNamed {
0090 
0091 public:
0092    TVirtualMonitoringReader( const char * /*serviceurl*/ ="") { }
0093    virtual ~TVirtualMonitoringReader() { }
0094 
0095    virtual void   DumpResult() { MayNotUse("DumpResult"); }
0096    virtual void   GetValues(const char * /*farmName*/, const char * /*clusterName*/,
0097                             const char * /*nodeName*/, const char * /*paramName*/,
0098                             Long_t /*min*/, Long_t /*max*/, Bool_t /*debug*/ = kFALSE)
0099       { MayNotUse("GetValues"); }
0100    virtual void   GetLastValues(const char * /*farmName*/, const char * /*clusterName*/,
0101                                 const char * /*nodeName*/, const char * /*paramName*/,
0102                                 Bool_t /*debug*/ =kFALSE)
0103       { MayNotUse("GetLastValues"); }
0104    virtual void   ProxyValues(const char * /*farmName*/, const char * /*clusterName*/,
0105                               const char * /*nodeName*/, const char * /*paramName*/,
0106                               Long_t /*min*/, Long_t /*max*/, Long_t /*lifetime*/)
0107       { MayNotUse("ProxyValues"); }
0108 
0109    virtual TMap *GetMap() { MayNotUse("GetMap"); return nullptr; }
0110    virtual void DeleteMap(TMap * /*map*/) { MayNotUse("DeleteMap"); }
0111 
0112    ClassDefOverride(TVirtualMonitoringReader, 1) // ABC for Reading Monitoring Information
0113 };
0114 
0115 
0116 R__EXTERN TVirtualMonitoringWriter *gMonitoringWriter;
0117 R__EXTERN TVirtualMonitoringReader *gMonitoringReader;
0118 
0119 
0120 #endif