Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

TGo4EventProcessor.cxx

Go to the documentation of this file.
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 "TGo4EventProcessor.h"
00017 
00018 #include "Riostream.h"
00019 #include "snprintf.h"
00020 
00021 #include "TGo4Log.h"
00022 #include "TGo4EventElement.h"
00023 #include "TGo4EventCalibration.h"
00024 #include "TGo4AnalysisImp.h"
00025 
00026 TGo4EventProcessor::TGo4EventProcessor(const char* name)
00027 : TGo4EventSource(name), fxInputEvent(0), fxCalibration(0)
00028 {
00029 TRACE((15,"TGo4EventProcessor::TGo4EventProcessor()",__LINE__, __FILE__));
00030 }
00031 
00032 TGo4EventProcessor::~TGo4EventProcessor()
00033 {
00034 TRACE((15,"TGo4EventProcessor::~TGo4EventProcessor()",__LINE__, __FILE__));
00035 }
00036 
00037 Bool_t TGo4EventProcessor::CheckInputEvent(const char* classname)
00038 {
00039    TRACE((12,"TGo4EventProcessor::CheckInputEvent()",__LINE__, __FILE__));
00040    if(fxInputEvent==0)
00041       {
00042          return kFALSE;
00043       }
00044    else
00045       {
00046          if(!strcmp(fxInputEvent->ClassName(),classname))
00047             {
00048                return kTRUE;
00049             }
00050          else
00051             {
00052                return kFALSE;
00053             }
00054 
00055      }
00056 
00057 }
00058 
00059 Bool_t TGo4EventProcessor::CheckCalibration(const char* classname)
00060 {
00061    TRACE((12,"TGo4EventProcessor::CheckCalibration()",__LINE__, __FILE__));
00062    if(fxCalibration==0)
00063       {
00064          return kFALSE;
00065       }
00066    else
00067       {
00068          if(!strcmp(fxCalibration->ClassName(),classname))
00069             {
00070                return kTRUE;
00071             }
00072          else
00073             {
00074                return kFALSE;
00075             }
00076      }
00077 }
00078 
00079 Bool_t TGo4EventProcessor::AddObject(TNamed* any, const Text_t* subfolder)
00080 {
00081    return (TGo4Analysis::Instance()->AddObject(any,subfolder));
00082 }
00083 
00084 Bool_t TGo4EventProcessor::AddHistogram(TH1* his, const Text_t* subfolder, Bool_t replace)
00085 {
00086    return (TGo4Analysis::Instance()->AddHistogram(his,subfolder,replace));
00087 }
00088 
00089 Bool_t TGo4EventProcessor::AddParameter(TGo4Parameter* par,const Text_t* subfolder)
00090 {
00091   return (TGo4Analysis::Instance()->AddParameter(par,subfolder));
00092 }
00093 
00094 Bool_t TGo4EventProcessor::AddPicture(TGo4Picture* pic,const Text_t* subfolder)
00095 {
00096   return (TGo4Analysis::Instance()->AddPicture(pic,subfolder));
00097 }
00098 
00099 Bool_t TGo4EventProcessor::AddCanvas(TCanvas* can, const Text_t* subfolder)
00100 {
00101   return (TGo4Analysis::Instance()->AddCanvas(can,subfolder));
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  // dummy clear, may be implemented by user
00195 }
00196 
00197 
00198 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Fri Nov 28 12:59:07 2008 for Go4-v3.04-1 by  doxygen 1.4.2