Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ConsumerExport.h

Go to the documentation of this file.
00001 //-------------------------------------------------------------------------
00002 // File: ConsumerExport.hh
00003 // Header file for ConsumerExport.cc
00004 //
00005 // The ConsumerExport class provides methods for the communication of the
00006 // consumer with its display server.
00007 //
00008 // File history:
00009 //
00010 // 07/05/2000  Started class                         Wolfgang Wagner 
00011 // 07/28/2000  Added benchmarking and CANVAS mode    Wolfgang Wagner 
00012 //------------------------------------------------------------------------
00013 //****************************************************************************
00014 // RCS Current Revision Record
00015 //-----------------------------------------------------------------------------
00016 // $Source: /cvs/minoscvs/rep1/minossoft/CDFMonitoringFwk/ConsumerExport.h,v $
00017 // $Revision: 1.1 $
00018 // $Date: 2001/07/16 18:33:48 $
00019 // $Author: dap56 $
00020 // $State: Exp $
00021 // $Locker:  $
00022 //*****************************************************************************
00023 
00024 #ifndef CONSUMEREXPORT_HH
00025 #define CONSUMEREXPORT_HH 1
00026 
00027 #include <stdio.h>
00028 #include <sys/types.h>
00029 #include <time.h>
00030 
00031 #include <iostream>
00032 
00033 #include "TSocket.h"
00034 #include "TServerSocket.h"
00035 #include "TMessage.h"
00036 #include "TMonitor.h"
00037 #include "TList.h"
00038 
00039 class TConsumerInfo;
00040 
00041 class ConsumerExport
00042 {
00043 public:
00044   ConsumerExport(const int firstPort, const bool restartEnable=false, 
00045                  const int reportToStateManager=2);
00046   ~ConsumerExport();
00047     
00048   int send(TConsumerInfo *consinfo, Bool_t modFlag=kFALSE);
00049   int send(const char *messString);
00050   pid_t getServerPid();
00051   static int getMaxString() {return _maxStringLength;}
00052   static void setMaxString(int newLength) {_maxStringLength = newLength;}
00053 
00054 private:
00055   bool           _debug;
00056   bool           _restartEnable;
00057   bool           _sendingEnable;
00058   int            _reportToStateManager;  
00059   int            _port;
00060   pid_t          _serverPid;
00061   time_t         _serverStartTime;
00062   static int     _maxStringLength;
00063   char*          _canvasString;
00064   TMonitor*      _consMonitor;
00065   TServerSocket* _consSS;
00066   TSocket*       _consSock;
00067 
00068   // Declare the copy constructor private, but don't define it.
00069   ConsumerExport(const ConsumerExport& ce);
00070   ConsumerExport& operator=(const ConsumerExport& ce);
00071 
00072   int send(TList *list);
00073   int send(const TObject *object); 
00074   void errorReact(const Int_t sendRes);
00075   void createCanvasString(TList *canvasList);
00076   int  lengthNeeded(TList *canvasList);
00077   int  startServer();
00078   int  connectServer();
00079   int  reestablishServer(); 
00080 };
00081 
00082 #endif

Generated on Mon Feb 15 11:06:33 2010 for loon by  doxygen 1.3.9.1