00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #include "TGo4ObjectQueue.h"
00015
00016 #include "Riostream.h"
00017
00018 #include "TGo4Log.h"
00019
00020 TGo4ObjectQueue::TGo4ObjectQueue()
00021 : TGo4Queue("Default object queue")
00022 {
00023 TRACE((14,"TGo4ObjectQueue::TGo4ObjectQueue()", __LINE__, __FILE__));
00024 }
00025
00026 TGo4ObjectQueue::TGo4ObjectQueue(const char* name)
00027 : TGo4Queue(name)
00028 {
00029 TRACE((14,"TGo4ObjectQueue::TGo4ObjectQueue(const char*)", __LINE__, __FILE__));
00030 }
00031
00032 TGo4ObjectQueue::~TGo4ObjectQueue()
00033 {
00034 TRACE((14,"TGo4ObjectQueue::~TTGo4ObjectQueue()", __LINE__, __FILE__));
00035 }
00036
00037 TObject* TGo4ObjectQueue::WaitObject()
00038 {
00039 TRACE((12,"TGo4ObjectQueue::WaitObject()", __LINE__, __FILE__));
00040 return (Wait());
00041 }
00042
00043 void TGo4ObjectQueue::AddObject(TObject * object, Bool_t clone)
00044 {
00045 TRACE((12,"TGo4ObjectQueue::AddObject(TObject*, Bool_t)", __LINE__, __FILE__));
00046 TObject* entry=0;
00047 if(clone && (object!=0))
00048 {
00049 entry=object->Clone();
00050 }
00051 else
00052 {
00053 entry=object;
00054 }
00055 Add(entry);
00056
00057 }
00058
00059 void TGo4ObjectQueue::AddObjectFromBuffer(TBuffer* buffer)
00060 {
00061 TRACE((12,"TGo4ObjectQueue::AddObjectFromBuffer(TBuffer*)", __LINE__, __FILE__));
00062 TObject* entry=0;
00063 if(buffer!=0)
00064 {
00065 buffer->SetReadMode();
00066 buffer->Reset();
00067 buffer->InitMap();
00068 TClass* cl= buffer->ReadClass();
00069
00070
00071
00072 buffer->Reset();
00073 entry = buffer->ReadObject(cl);
00074
00075
00076
00077
00078 }
00079 else
00080 {
00081
00082 }
00083 Add(entry);
00084 }