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

/Go4Event/TGo4EventSource.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 "TGo4EventSource.h"
00017 
00018 #include <iostream.h>
00019 
00020 #include "Go4Event/TGo4EventErrorException.h"
00021 #include "Go4Log/TGo4Log.h"
00022 // #include "Go4Exceptions/Go4Exceptions.h"
00023 
00024 const Int_t TGo4EventSource::fgiTIMEOUTDEFAULT=1; // source timeout default in seconds
00025 const UInt_t TGo4EventSource::fguTXTLEN=256; // length of text buffers
00026 
00027 
00028 TGo4EventSource::TGo4EventSource(const char* name)
00029 :TNamed(name, "This is a Go4 Event Source"),
00030 fiCreateStatus(0), fiEventStatus(0)
00031 {
00032 TRACE((15,"TGo4EventSource::TGo4EventSource()",__LINE__, __FILE__));
00033 }
00034 
00035 TGo4EventSource::TGo4EventSource()
00036 :TNamed("default eventsource","This is a Go4 EventSource"),
00037 fiCreateStatus(0), fiEventStatus(0)
00038 {
00039 }
00040 
00041 TGo4EventSource::~TGo4EventSource()
00042 {
00043 TRACE((15,"TGo4EventSource::~TGo4EventSource()",__LINE__, __FILE__));
00044 
00045 }
00046 
00047 void TGo4EventSource::ThrowError(Int_t crestat, Int_t errstat, Text_t* message,...)
00048    {
00049       //
00050       UInt_t lbuflen=TGo4EventSource::fguTXTLEN;
00051       Text_t txtbuf[lbuflen];
00052       va_list args;
00053       va_start(args, message);
00054       vsnprintf(txtbuf, lbuflen, message, args);
00055       va_end(args);
00056       if(crestat!=0)
00057          SetCreateStatus(crestat);
00058       if(errstat!=0)
00059          SetEventStatus(errstat);
00060       SetErrMess(txtbuf);
00061       throw TGo4EventErrorException(this);
00062    }
00063 
00064 void TGo4EventSource::Clear(Option_t* opt)
00065 {
00066  // dummy clear, may be implemented by user
00067  cout <<"default clear of eventsource "<<GetName() << endl;
00068 }
00069 
00070 
00071 ClassImp(TGo4EventSource)
00072 
00073 //----------------------------END OF GO4 SOURCE FILE ---------------------

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