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 "TYYYUnpackFact.h" 00017 00018 #include "Riostream.h" 00019 00020 #include "TGo4EventSourceParameter.h" 00021 #include "TGo4UserSourceParameter.h" 00022 00023 #include "TYYYRawEvent.h" 00024 #include "TYYYUnpackEvent.h" 00025 #include "TYYYUnpackProc.h" 00026 #include "TYYYEventSource.h" 00027 00028 //*********************************************************** 00029 TYYYUnpackFact::TYYYUnpackFact(const char* name) 00030 : TGo4EventServerFactory(name) 00031 { 00032 } 00033 //*********************************************************** 00034 TYYYUnpackFact::TYYYUnpackFact() 00035 : TGo4EventServerFactory("YYY Event Fact") 00036 { 00037 } 00038 //*********************************************************** 00039 TYYYUnpackFact::~TYYYUnpackFact() 00040 { 00041 } 00042 //*********************************************************** 00043 00044 TGo4EventElement * TYYYUnpackFact::CreateInputEvent() 00045 { 00046 TYYYRawEvent* event = new TYYYRawEvent("YYYRawEvent"); 00047 return event; 00048 00049 } 00050 00051 //----------------------------------------------------------- 00052 TGo4EventProcessor * TYYYUnpackFact::CreateEventProcessor(TGo4EventProcessorParameter* par) 00053 { 00054 TYYYUnpackProc* proc = new TYYYUnpackProc("YYYUnpackProc"); 00055 return proc; 00056 } 00057 00058 //----------------------------------------------------------- 00059 TGo4EventElement * TYYYUnpackFact::CreateOutputEvent() 00060 { // name is given in TYYYUnpackEvent 00061 TYYYUnpackEvent * event = new TYYYUnpackEvent(); 00062 SetOutputEvent(event); // important for some event store implementations!!! 00063 return event; 00064 } 00065 00066 //----------------------------------------------------------- 00067 TGo4EventSource * TYYYUnpackFact::CreateEventSource(TGo4EventSourceParameter * par) 00068 { 00069 TGo4EventSource* rev=0; 00070 if(par) 00071 { 00072 if(!strcmp(par->ClassName(),"TGo4UserSourceParameter")) 00073 { 00074 rev= new TYYYEventSource(dynamic_cast<TGo4UserSourceParameter* > (par) ); 00075 cout <<"TYYYUnpackFact::CreateEventSource with UserSourceParameter" << endl; 00076 } 00077 else 00078 { 00079 rev=TGo4EventServerFactory::CreateEventSource(par); 00080 cout <<"TYYYUnpackFact::CreateEventSource with parameter "<<par->GetName() << endl; 00081 00082 } 00083 } 00084 return rev; 00085 } 00086 00087 //----------------------------END OF GO4 SOURCE FILE ---------------------