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

/Go4TaskHandler/TGo4TaskStatus.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 /* Generated by Together */
00017 
00018 #include "TGo4TaskStatus.h"
00019 #include "TGo4TaskHandlerStatus.h"
00020 #include <iostream>
00021 
00022 using namespace std;
00023 
00024 
00025 
00026 
00027 TGo4TaskStatus::TGo4TaskStatus()
00028 {}
00029 
00030 
00031 TGo4TaskStatus::~TGo4TaskStatus()
00032 {
00033    delete fxTaskHandlerStatus;   
00034 }
00035 
00036 TGo4TaskStatus::TGo4TaskStatus(const char* name)
00037 : TGo4Status(name), fxTaskHandlerStatus(0)
00038 {
00039    
00040 }
00041 void TGo4TaskStatus::SetFlags(Bool_t blocking,
00042                                  Bool_t autocreate,
00043                                  Bool_t autostart,
00044                                  Bool_t terminating,
00045                                  Bool_t initdone)
00046 {
00047    fbAppBlocking=blocking;
00048    fbAutoCreate=autocreate;
00049    fbAutoStart=autostart;
00050    fbTerminating=terminating;
00051    fbInitDone=initdone;
00052 }
00053 void TGo4TaskStatus::SetTaskHandlerStatus(TGo4TaskHandlerStatus* thstate)
00054 {
00055    fxTaskHandlerStatus=thstate;
00056 
00057 }
00058 Int_t TGo4TaskStatus::PrintStatus(Text_t* buffer, Int_t buflen)
00059 {
00060    //
00061    if(buflen<=0 && buffer!=0)
00062       return 0;
00063    Int_t locallen=4096;   
00064    Text_t localbuf[locallen];
00065    Text_t* current=localbuf;
00066    Int_t size=0;
00067    Int_t restlen=locallen;
00068    current=PrintBuffer(current,restlen, "G-OOOO->    Client Status Class %s Printout:  <-OOOO-G\n",GetName());
00069    current=PrintBuffer(current,restlen, "G-OOOO-> ---------------------------------------------- <-OOOO-G\n");
00070    current=PrintBuffer(current,restlen, "G-OOOO-> Blockingmode: %d\n",fbAppBlocking);
00071    current=PrintBuffer(current,restlen, "G-OOOO-> Autocreate: %d\n",fbAutoCreate);
00072    current=PrintBuffer(current,restlen, "G-OOOO-> Autostart: %d\n",fbAutoStart);
00073    current=PrintBuffer(current,restlen, "G-OOOO-> InitDone: %d\n",fbInitDone);
00074    current=PrintBuffer(current,restlen, "G-OOOO-> IsTerminating: %d\n",fbTerminating);
00075    current=PrintBuffer(current,restlen, "G-OOOO-> ---------------------------------------------- <-OOOO-G\n");
00076    Int_t delta=fxTaskHandlerStatus->PrintStatus(current,restlen);
00077    restlen-=delta;
00078    current+= delta;   
00079    current=PrintBuffer(current,restlen, "G-OOOO-> END Client Status Class Printout END <-OOOO-G\n");
00080    if(buffer==0)
00081       {
00082          cout << localbuf << endl;
00083       }
00084    else
00085       {
00086          size=locallen-restlen;
00087          if(size>buflen-1)
00088                size=buflen-1;
00089          strncpy(buffer,localbuf,size);
00090       }
00091    return size;
00092 }
00093 
00094 
00095 
00096 ClassImp(TGo4TaskStatus) 
00097 
00098 //----------------------------END OF GO4 SOURCE FILE ---------------------

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