Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

/Go4TaskHandler/TGo4TaskHandlerStatus.cxx

Go to the documentation of this file.
00001 //---------------------------------------------------------------
00002 //        Go4 Release Package v2.10-5 (build 21005) 
00003 //                      03-Nov-2005
00004 //---------------------------------------------------------------
00005 //       The GSI Online Offline Object Oriented (Go4) Project
00006 //       Experiment Data Processing at DVEE department, GSI
00007 //---------------------------------------------------------------
00008 //
00009 //Copyright (C) 2000- Gesellschaft f. Schwerionenforschung, GSI
00010 //                    Planckstr. 1, 64291 Darmstadt, Germany
00011 //Contact:            http://go4.gsi.de
00012 //----------------------------------------------------------------
00013 //This software can be used under the license agreements as stated
00014 //in Go4License.txt file which is part of the distribution.
00015 //----------------------------------------------------------------
00016 #include "TGo4TaskHandlerStatus.h"
00017 
00018 #include <iostream.h>
00019 
00020 #include "Go4Log/TGo4Log.h"
00021 
00022 TGo4TaskHandlerStatus::TGo4TaskHandlerStatus(const char* name) : TGo4Status(name)
00023 {
00024 }
00025 
00026 TGo4TaskHandlerStatus::~TGo4TaskHandlerStatus()
00027 {
00028 }
00029 
00030 Int_t TGo4TaskHandlerStatus::PrintStatus(Text_t* buffer, Int_t buflen)
00031 {
00032    if(buflen<=0 && buffer!=0)
00033       return 0;
00034    Int_t locallen=4096;
00035    Text_t localbuf[locallen];
00036    Text_t* current=localbuf;
00037    Int_t restlen=locallen;
00038    Int_t size=0;
00039    current=PrintBuffer(current,restlen, "G-OOOO-> TaskHandler Status Class %s Printout: <-OOOO-G\n",GetName());
00040    current=PrintBuffer(current,restlen, "G-OOOO-> --------------------------------------------------------------------- <-OOOO-G\n");
00041    current=PrintBuffer(current,restlen, "G-OOOO-> Remote Server: %s\n",GetHostName());
00042    current=PrintBuffer(current,restlen, "G-OOOO-> Negotiation Port: %d\n",fuNegPort);
00043    current=PrintBuffer(current,restlen, "G-OOOO-> Command Thread: %s\n",GetComName());
00044    current=PrintBuffer(current,restlen, "G-OOOO-> Command Port: %d\n",fiComPort);
00045    current=PrintBuffer(current,restlen, "G-OOOO-> Data Thread: %s\n",GetDatName());
00046    current=PrintBuffer(current,restlen, "G-OOOO-> Data Port: %d\n",fiDatPort);
00047    current=PrintBuffer(current,restlen, "G-OOOO-> Status Thread: %s\n",GetStatName());
00048    current=PrintBuffer(current,restlen, "G-OOOO-> Status Port: %d\n",fiStatPort);
00049    if(fbIsAborting)
00050       {
00051          current=PrintBuffer(current,restlen, "G-OOOO-> Aborting State: TRUE\n");
00052       }
00053    else
00054       {
00055          current=PrintBuffer(current,restlen, "G-OOOO-> Aborting State: FALSE\n");
00056       }
00057    current=PrintBuffer(current,restlen, "G-OOOO-> END TaskHandler Status Class Printout END <-OOOO-G\n");
00058    if(buffer==0)
00059          {
00060              cout << localbuf << endl;
00061          }
00062       else
00063          {
00064             size=locallen-restlen;
00065             if(size>buflen-1)
00066                size=buflen-1;
00067             strncpy(buffer,localbuf,size);
00068          }
00069    return size;
00070 }
00071 
00072 void TGo4TaskHandlerStatus::SetFlags(Bool_t isaborting)
00073 {
00074    fbIsAborting=isaborting;
00075 }
00076 
00077 void TGo4TaskHandlerStatus::SetPorts(UInt_t neg, Int_t com, Int_t stat, Int_t dat)
00078 {
00079    fuNegPort=neg;
00080    fiComPort=com;
00081    fiStatPort=stat;
00082    fiDatPort=dat;
00083 }
00084 
00085 void TGo4TaskHandlerStatus::SetNames(const char* com, const char* stat, const char* dat, const char* host)
00086 {
00087    fxComName = com;
00088    fxStatName = stat;
00089    fxDatName = dat;
00090    fxHostName = host;
00091 }
00092 
00093 ClassImp(TGo4TaskHandlerStatus)
00094 
00095 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Tue Nov 8 10:56:06 2005 for Go4-v2.10-5 by doxygen1.2.15