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

TGo4StartException.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 "TGo4StartException.h"
00017 
00018 #include "TGo4Log.h"
00019 #include "TGo4Thread.h"
00020 #include "TGo4ThreadHandler.h"
00021 #include "TGo4Runnable.h"
00022 
00023 TGo4StartException::TGo4StartException(const TGo4StartException &right)
00024   :TGo4ThreadException(right)
00025 {
00026    TRACE((14,"TGo4StartException::TGo4StartException() copy constructor",__LINE__, __FILE__));
00027 }
00028 
00029 TGo4StartException::TGo4StartException (TGo4Runnable* runnable, const Text_t* threadname)
00030 : TGo4ThreadException(runnable,threadname)
00031 {
00032    TRACE((14,"TGo4StartException::TGo4StartException(TGo4Runnable*, const Text_t*) constructor",__LINE__, __FILE__));
00033    fxDescription= "!!!-- Go4 Start Exception --!!!";
00034 }
00035 
00036 
00037 TGo4StartException::~TGo4StartException()
00038 {
00039   TRACE((14,"TGo4StartException::~TGo4StartException() destructor",__LINE__, __FILE__));
00040 }
00041 
00042 
00043 TGo4StartException & TGo4StartException::operator=(const TGo4StartException &right)
00044 {
00045    TRACE((14,"TGo4StartException::operator=",__LINE__, __FILE__));
00046    if (&right!=this)
00047       {
00048          TRACE((13,"TGo4StartException::operator= processing copy",__LINE__, __FILE__));
00049          TGo4ThreadException::operator=(right); // copy base class members
00050          // put additional member copies here...
00051          return *this;
00052       }
00053    else
00054       {
00055          // copy is already source object
00056          TRACE((13,"TGo4StartException::operator= source and destination objects are identical",__LINE__, __FILE__));
00057          return *this;
00058       }
00059 }
00060 
00061 Int_t TGo4StartException::Handle ()
00062 {
00063    TRACE((14,"TGo4StartException::Handle()",__LINE__, __FILE__));
00064    Int_t rev=-1;
00065    if(GetThreadName()==0)
00066       // no threadname specified, operate on thread of runnable
00067       {
00068          TRACE((13,"TGo4StartException::Handle() -- starting thread of runnable",__LINE__, __FILE__));
00069          rev=fxRunnable->GetThread()->Start();
00070       }
00071    else
00072       // threadname given, use thread handler to cancel
00073       {
00074          TRACE((13,"TGo4StartException::Handle() -- starting thread by name",__LINE__, __FILE__));
00075          rev=fxThreadHandler->Start(GetThreadName());
00076       }
00077    // note: return values of Start() are boolean, are casted implicitly
00078    return rev;
00079 }
00080 
00081 
00082 
00083 
00084 
00085 //----------------------------END OF GO4 SOURCE FILE ---------------------

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