Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

TGo4TerminateException.cxx

Go to the documentation of this file.
00001 //-------------------------------------------------------------
00002 //        Go4 Release Package v3.04-01 (build 30401)
00003 //                      28-November-2008
00004 //---------------------------------------------------------------
00005 //   The GSI Online Offline Object Oriented (Go4) Project
00006 //   Experiment Data Processing at EE 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 "TGo4TerminateException.h"
00017 
00018 #include "TThread.h"
00019 
00020 #include "TGo4Log.h"
00021 #include "TGo4ThreadManager.h"
00022 #include "TGo4Runnable.h"
00023 
00024 TGo4TerminateException::TGo4TerminateException (TGo4Runnable* runnable)
00025 {
00026  TRACE((14,"TGo4TerminateException::TGo4TerminateException (TGo4Runnable*)", __LINE__, __FILE__));
00027    fxDescription= "!!!-- Go4 Terminate Exception --!!!";
00028    fxThreadManager=runnable->GetThreadManager();
00029 }
00030 
00031 TGo4TerminateException::TGo4TerminateException (TGo4ThreadManager* man)
00032 {
00033 TRACE((14,"TGo4TerminateException::TGo4TerminateException (TGo4ThreadManager*)", __LINE__, __FILE__));
00034    fxDescription= "!!!-- Go4 Terminate Exception --!!!";
00035    fxThreadManager=man;
00036 }
00037 
00038 TGo4TerminateException::TGo4TerminateException(const TGo4TerminateException &right)
00039   :TGo4ControlException(right)
00040 {
00041 TRACE((14,"TGo4TerminateException::TGo4TerminateException (const TGo4TerminateException*)", __LINE__, __FILE__));
00042    fxThreadManager=right.fxThreadManager;
00043 }
00044 
00045 TGo4TerminateException & TGo4TerminateException::operator=(const TGo4TerminateException &right)
00046 {
00047 TRACE((14,"TGo4TerminateException::operator=(const TGo4TerminateException*)", __LINE__, __FILE__));
00048    if (&right!=this)
00049       {
00050          ;
00051          TGo4ControlException::operator=(right); // copy base class members
00052          // put additional member copies here...
00053          fxThreadManager=right.fxThreadManager;
00054          return *this;
00055       }
00056    else
00057       {
00058          // copy is already source object
00059          ;
00060          return *this;
00061       }
00062 }
00063 
00064 TGo4TerminateException::~TGo4TerminateException()
00065 {
00066    TRACE((14,"TGo4TerminateException::~TGo4TerminateException()", __LINE__, __FILE__));
00067 
00068 }
00069 
00070 Int_t TGo4TerminateException::Handle ()
00071 {
00072 TRACE((12,"TGo4TaskHandlerAbortException::Handle()", __LINE__, __FILE__));
00073 
00074    TGo4Log::Debug("\n Terminate Exception default Handle: Terminating Thread Manager %s ... \n",
00075             fxThreadManager->GetName());
00076    fxThreadManager->Terminate();
00077    TThread::CancelPoint();
00078    return 0;
00079 
00080 }
00081 
00082 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Fri Nov 28 12:59:31 2008 for Go4-v3.04-1 by  doxygen 1.4.2