00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include "TGo4EventProcessor.h"
00017
00018 #include <iostream.h>
00019
00020 #include "Go4Log/TGo4Log.h"
00021 #include "TGo4EventElement.h"
00022 #include "TGo4EventCalibration.h"
00023 #include "Go4Analysis/TGo4AnalysisImp.h"
00024
00025 TGo4EventProcessor::TGo4EventProcessor(const char* name)
00026 : TGo4EventSource(name), fxInputEvent(0), fxCalibration(0)
00027 {
00028 TRACE((15,"TGo4EventProcessor::TGo4EventProcessor()",__LINE__, __FILE__));
00029 }
00030
00031 TGo4EventProcessor::~TGo4EventProcessor()
00032 {
00033 TRACE((15,"TGo4EventProcessor::~TGo4EventProcessor()",__LINE__, __FILE__));
00034 }
00035
00036 Bool_t TGo4EventProcessor::CheckInputEvent(const char* classname)
00037 {
00038 TRACE((12,"TGo4EventProcessor::CheckInputEvent()",__LINE__, __FILE__));
00039 if(fxInputEvent==0)
00040 {
00041 return kFALSE;
00042 }
00043 else
00044 {
00045 if(!strcmp(fxInputEvent->ClassName(),classname))
00046 {
00047 return kTRUE;
00048 }
00049 else
00050 {
00051 return kFALSE;
00052 }
00053
00054 }
00055
00056 }
00057
00058 Bool_t TGo4EventProcessor::CheckCalibration(const char* classname)
00059 {
00060 TRACE((12,"TGo4EventProcessor::CheckCalibration()",__LINE__, __FILE__));
00061 if(fxCalibration==0)
00062 {
00063 return kFALSE;
00064 }
00065 else
00066 {
00067 if(!strcmp(fxCalibration->ClassName(),classname))
00068 {
00069 return kTRUE;
00070 }
00071 else
00072 {
00073 return kFALSE;
00074 }
00075 }
00076 }
00077
00078 Bool_t TGo4EventProcessor::AddObject(TNamed* any, const Text_t* subfolder)
00079 {
00080 return (TGo4Analysis::Instance()->AddObject(any,subfolder));
00081 }
00082
00083 Bool_t TGo4EventProcessor::AddHistogram(TH1* his, const Text_t* subfolder, Bool_t replace)
00084 {
00085 return (TGo4Analysis::Instance()->AddHistogram(his,subfolder,replace));
00086 }
00087
00088 Bool_t TGo4EventProcessor::AddParameter(TGo4Parameter* par,const Text_t* subfolder)
00089 {
00090 return (TGo4Analysis::Instance()->AddParameter(par,subfolder));
00091 }
00092
00093 Bool_t TGo4EventProcessor::AddPicture(TGo4Picture* pic,const Text_t* subfolder)
00094 {
00095 return (TGo4Analysis::Instance()->AddPicture(pic,subfolder));
00096 }
00097
00098 Bool_t TGo4EventProcessor::AddCanvas(TCanvas* can, const Text_t* subfolder)
00099 {
00100 return (TGo4Analysis::Instance()->AddCanvas(can,subfolder));
00101 }
00102
00103
00104 Bool_t TGo4EventProcessor::AddAnalysisCondition(TGo4Condition* con,const Text_t* subfolder)
00105 {
00106 return (TGo4Analysis::Instance()->AddAnalysisCondition(con,subfolder));
00107 }
00108
00109 Bool_t TGo4EventProcessor::RemoveHistogram(const Text_t* name)
00110 {
00111 return (TGo4Analysis::Instance()->RemoveHistogram(name));
00112 }
00113
00114 Bool_t TGo4EventProcessor::RemoveParameter(const Text_t* name)
00115 {
00116 return (TGo4Analysis::Instance()->RemoveParameter(name));
00117 }
00118
00119 Bool_t TGo4EventProcessor::RemovePicture(const Text_t* name)
00120 {
00121 return (TGo4Analysis::Instance()->RemovePicture(name));
00122 }
00123
00124 Bool_t TGo4EventProcessor::RemoveCanvas(const Text_t* name)
00125 {
00126 return (TGo4Analysis::Instance()->RemoveCanvas(name));
00127 }
00128
00129 Bool_t TGo4EventProcessor::RemoveAnalysisCondition(const Text_t* name)
00130 {
00131 return (TGo4Analysis::Instance()->RemoveAnalysisCondition(name));
00132 }
00133
00134 TNamed* TGo4EventProcessor::GetObject(const Text_t* name, const Text_t* folder)
00135 {
00136 return (TGo4Analysis::Instance()->GetObject(name,folder));
00137 }
00138
00139
00140 TH1* TGo4EventProcessor::GetHistogram(const Text_t* name)
00141 {
00142 return (TGo4Analysis::Instance()->GetHistogram(name));
00143 }
00144
00145 TGo4Parameter* TGo4EventProcessor::GetParameter(const Text_t* name)
00146 {
00147 return (TGo4Analysis::Instance()->GetParameter(name));
00148 }
00149
00150 TGo4Picture* TGo4EventProcessor::GetPicture(const Text_t* name)
00151 {
00152 return (TGo4Analysis::Instance()->GetPicture(name));
00153 }
00154
00155 TCanvas* TGo4EventProcessor::GetCanvas(const Text_t* name)
00156 {
00157 return (TGo4Analysis::Instance()->GetCanvas(name));
00158 }
00159
00160 TGo4Condition* TGo4EventProcessor::GetAnalysisCondition(const Text_t* name)
00161 {
00162 return (TGo4Analysis::Instance()->GetAnalysisCondition(name));
00163 }
00164
00165 TGo4EventElement* TGo4EventProcessor::GetInputEvent(const Text_t* stepname)
00166 {
00167 return (TGo4Analysis::Instance()->GetInputEvent(stepname) );
00168 }
00169
00170 TGo4EventElement* TGo4EventProcessor::GetOutputEvent(const Text_t* stepname)
00171 {
00172 return (TGo4Analysis::Instance()->GetOutputEvent(stepname) );
00173 }
00174
00175 void TGo4EventProcessor::Message(Int_t prio, const Text_t* text,...)
00176 {
00177 Text_t txtbuf[__MESSAGETEXTLENGTH__];
00178 va_list args;
00179 va_start(args, text);
00180 vsnprintf(txtbuf, __MESSAGETEXTLENGTH__, text, args);
00181 va_end(args);
00182 TGo4Analysis::Instance()->Message(prio,txtbuf);
00183 }
00184
00185 void TGo4EventProcessor::SendObjectToGUI(TNamed* ob)
00186 {
00187 return (TGo4Analysis::Instance()->SendObjectToGUI(ob ) );
00188 }
00189
00190
00191 void TGo4EventProcessor::Clear(Option_t* opt)
00192 {
00193 cout <<"Default Clear of eventprocessor "<< GetName() << endl;
00194
00195 }
00196
00197 ClassImp(TGo4EventProcessor)
00198
00199
00200
00201
00202