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