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 #ifndef TGO4ANALYSISSTEP_H 00017 #define TGO4ANALYSISSTEP_H 00018 00019 #include "TNamed.h" 00020 #include "TString.h" 00021 00022 class TFolder; 00023 00024 class TGo4Parameter; 00025 class TGo4Condition; 00026 class TGo4Fitter; 00027 00028 class TGo4Analysis; 00029 class TGo4AnalysisStepStatus; 00030 class TGo4AnalysisStatus; 00031 class TGo4Condition; 00032 class TGo4Fitter; 00033 class TGo4EventProcessorParameter; 00034 class TGo4EventStoreParameter; 00035 class TGo4EventSourceParameter; 00036 00037 class TGo4EventElement; 00038 class TGo4EventFactory; 00039 class TGo4EventSource; 00040 class TGo4EventStore; 00041 class TGo4EventProcessor; 00042 00059 class TGo4AnalysisStep : public TNamed { 00060 public: 00061 00063 TGo4AnalysisStep(); 00066 TGo4AnalysisStep(const char* name, 00067 TGo4EventFactory* eventfactory, 00068 TGo4EventSourceParameter* sourcetype=0, 00069 TGo4EventStoreParameter* storetype=0, 00070 TGo4EventProcessorParameter* processortype=0); 00071 00072 virtual ~TGo4AnalysisStep(); 00073 00078 void SetEventSource(TGo4EventSourceParameter* kind); 00079 00080 00087 void NewEventSource(TGo4EventSourceParameter * kind); 00088 00090 void CloseEventSource(); 00091 00096 void SetEventStore(TGo4EventStoreParameter* kind); 00097 00104 void NewEventStore(TGo4EventStoreParameter * kind); 00105 00107 void CloseEventStore(); 00108 00113 void SetEventProcessor(TGo4EventProcessorParameter* kind); 00114 00121 void NewEventProcessor(TGo4EventProcessorParameter * kind); 00122 00124 void CloseEventProcessor(); 00125 00127 void NewInputEvent(); 00128 00130 void DeleteInputEvent(); 00131 00133 void NewOutputEvent(); 00134 00136 void DeleteOutputEvent(); 00137 00140 virtual void InitEventClasses(); 00141 00143 void SetSourceEnabled(Bool_t on=kTRUE) { fbSourceEnabled=on; } 00144 00146 void SetStoreEnabled(Bool_t on=kTRUE) { fbStoreEnabled=on; } 00147 00149 void SetProcessEnabled(Bool_t on=kTRUE) { fbProcessEnabled=on; } 00150 00152 void SetErrorStopEnabled(Bool_t on) { fbErrorStopEnabled=on; } 00153 00157 void ResetErrorStop() { fbErrorStopped=0; } 00158 00163 void SetInputEvent(TGo4EventElement* in) { fxInputEvent=in; } 00164 00166 void SetPreviousStep(TGo4AnalysisStep * pre) { fxPrevious=pre; } 00167 00169 TGo4AnalysisStep* GetPreviousStep() { return fxPrevious; } 00170 00174 TGo4EventElement* GetOutputEvent() { return fxOutputEvent; } 00175 00180 TGo4EventElement* GetInputEvent() { return fxInputEvent; } 00181 00184 TGo4EventProcessor * GetEventProcessor() { return fxEventProcessor; } 00185 00188 TGo4EventFactory * GetStepFactory() {return fxEventFactory; } 00189 00190 Bool_t IsStoreEnabled() { return fbStoreEnabled; } 00191 00192 Bool_t IsStoreImplemented() { return fbStoreImplemented; } 00193 00194 Bool_t IsSourceImplemented() { return fbSourceImplemented; } 00195 00196 Bool_t IsSourceEnabled() { return fbSourceEnabled; } 00197 00198 Bool_t IsProcessEnabled() { return fbProcessEnabled; } 00199 00201 Bool_t IsErrorStopped() { return fbErrorStopped; } 00202 00204 Bool_t IsErrorStopEnabled() { return fbErrorStopEnabled; } 00205 00207 Int_t GetProcessStatus() { return fiProcessStatus; } 00208 00210 const char* GetStatusMessage() { fcBuffer = fcStatusMessage; return fcBuffer.Data(); } 00211 00213 void SetStatusMessage(const char* txt) { fcStatusMessage = txt; } 00214 00220 Bool_t IsMatchingPrevious(); 00221 00224 const char* GetEventStoreName(); 00225 00228 const char* GetEventSourceName(); 00229 00232 void StoreCalibration(); 00233 00235 Int_t Store(TGo4Parameter* cali); 00236 00238 Int_t Store(TGo4Condition* conny); 00239 00241 Int_t Store(TGo4Fitter* fitter); 00242 00244 Int_t Store(TFolder* fold); 00245 00250 void Process(); 00251 00254 void Close(); 00255 00257 void SetStatus(TGo4AnalysisStepStatus * state); 00258 00260 TGo4AnalysisStepStatus * CreateStatus(); 00261 00262 private: 00263 00265 TGo4Analysis* fxOwner; 00266 00269 TGo4AnalysisStep * fxPrevious; 00270 00274 TGo4EventFactory * fxEventFactory; 00275 00279 TGo4EventStore * fxEventStore; 00280 00285 TGo4EventSource * fxEventSource; 00286 00291 TGo4EventProcessor * fxEventProcessor; 00292 00296 TGo4EventElement * fxInputEvent; 00297 00302 TGo4EventElement * fxOutputEvent; 00303 00308 TGo4EventSourceParameter* fxSourceType; 00309 00314 TGo4EventStoreParameter* fxStoreType; 00315 00320 TGo4EventProcessorParameter* fxProcessorType; 00321 00325 Bool_t fbSourceEnabled; 00326 00329 Bool_t fbSourceImplemented; 00330 00334 Bool_t fbStoreEnabled; 00335 00338 Bool_t fbStoreImplemented; 00339 00345 Bool_t fbProcessEnabled; 00346 00352 Bool_t fbErrorStopEnabled; 00353 00355 Bool_t fbErrorStopped; 00356 00358 Int_t fiProcessStatus; 00359 00361 TString fcStatusMessage; 00362 00364 TString fcBuffer; 00365 00366 ClassDef(TGo4AnalysisStep,1) 00367 }; 00368 00369 #endif //TGO4ANALYSISSTEP_H 00370 00371 //----------------------------END OF GO4 SOURCE FILE ---------------------