GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
TGo4AnalysisStep.h
Go to the documentation of this file.
1 // $Id$
2 //-----------------------------------------------------------------------
3 // The GSI Online Offline Object Oriented (Go4) Project
4 // Experiment Data Processing at EE department, GSI
5 //-----------------------------------------------------------------------
6 // Copyright (C) 2000- GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
7 // Planckstr. 1, 64291 Darmstadt, Germany
8 // Contact: http://go4.gsi.de
9 //-----------------------------------------------------------------------
10 // This software can be used under the license agreements as stated
11 // in Go4License.txt file which is part of the distribution.
12 //-----------------------------------------------------------------------
13 
14 #ifndef TGO4ANALYSISSTEP_H
15 #define TGO4ANALYSISSTEP_H
16 
17 #include "TNamed.h"
18 #include "TString.h"
19 
20 class TFolder;
21 
22 class TGo4Parameter;
23 class TGo4Condition;
24 class TGo4Fitter;
25 
26 class TGo4Analysis;
28 class TGo4AnalysisStatus;
29 class TGo4Condition;
30 class TGo4Fitter;
34 
35 class TGo4EventElement;
36 class TGo4EventFactory;
37 class TGo4EventSource;
38 class TGo4EventStore;
39 //class TGo4EventProcessor;
40 #include "TGo4EventProcessor.h"
41 
58 class TGo4AnalysisStep : public TNamed {
59  public:
60 
65  TGo4AnalysisStep(const char *name,
66  TGo4EventFactory *eventfactory,
67  TGo4EventSourceParameter *sourcetype = nullptr,
68  TGo4EventStoreParameter *storetype = nullptr,
69  TGo4EventProcessorParameter *processortype = nullptr);
70 
71  virtual ~TGo4AnalysisStep();
72 
78 
80  Bool_t IsEventSourceParam() const;
81 
89 
92 
94  void CloseEventSource();
95 
101 
104 
106  Bool_t IsEventStoreParam() const;
107 
115 
117  void CloseEventStore();
118 
124 
132 
134  void CloseEventProcessor();
135 
137  void NewInputEvent();
138 
140  void DeleteInputEvent();
141 
143  void NewOutputEvent();
144 
146  void DeleteOutputEvent();
147 
150  virtual void InitEventClasses();
151 
153  void SetSourceEnabled(Bool_t on = kTRUE) { fbSourceEnabled = on; }
154 
156  void SetStoreEnabled(Bool_t on = kTRUE) { fbStoreEnabled = on; }
157 
159  void SetProcessEnabled(Bool_t on = kTRUE) { fbProcessEnabled = on; }
160 
162  void SetErrorStopEnabled(Bool_t on) { fbErrorStopEnabled = on; }
163 
168 
174 
177 
180 
185 
191 
195 
199 
200  Bool_t IsStoreEnabled() const { return fbStoreEnabled; }
201 
202  Bool_t IsStoreImplemented() const { return fbStoreImplemented; }
203 
204  Bool_t IsSourceImplemented() const { return fbSourceImplemented; }
205 
206  Bool_t IsSourceEnabled() const { return fbSourceEnabled; }
207 
208  Bool_t IsProcessEnabled() const { return fbProcessEnabled; }
209 
210  Bool_t IsKeepInputEvent() const { return fxEventProcessor ? fxEventProcessor->IsKeepInputEvent() : kFALSE; }
211 
212  Bool_t IsKeepOutputEvent() const { return fxEventProcessor ? fxEventProcessor->IsKeepOutputEvent() : kFALSE; }
213 
215  Bool_t IsErrorStopped() const { return fbErrorStopped; }
216 
218  Bool_t IsErrorStopEnabled() const { return fbErrorStopEnabled; }
219 
221  Int_t GetProcessStatus() const { return fiProcessStatus; }
222 
224  const char *GetStatusMessage() const { return fcStatusMessage.Data(); }
225 
227  void SetStatusMessage(const char *txt) { fcStatusMessage = txt; }
228 
234  Bool_t IsMatchingPrevious() const;
235 
238  const char *GetEventStoreName() const;
239 
242  const char *GetEventSourceName() const;
243 
246  void StoreCalibration();
247 
249  Int_t Store(TGo4Parameter *cali);
250 
252  Int_t Store(TGo4Condition *conny);
253 
255  Int_t Store(TGo4Fitter *fitter);
256 
258  Int_t Store(TFolder *fold);
259 
264  void Process();
265 
268  void Close();
269 
271  void SetStatus(TGo4AnalysisStepStatus *state);
272 
275 
276  private:
277 
279  TGo4Analysis *fxOwner{nullptr};
280 
284 
289 
294 
300 
306 
311 
317 
323 
329 
335 
339  Bool_t fbSourceEnabled{kFALSE};
340 
343  Bool_t fbSourceImplemented{kFALSE};
344 
348  Bool_t fbStoreEnabled{kFALSE};
349 
352  Bool_t fbStoreImplemented{kFALSE};
353 
359  Bool_t fbProcessEnabled{kFALSE};
360 
366  Bool_t fbErrorStopEnabled{kFALSE};
367 
369  Bool_t fbErrorStopped{kFALSE};
370 
372  Int_t fiProcessStatus{0};
373 
375  TString fcStatusMessage;
376 
377  ClassDefOverride(TGo4AnalysisStep,1)
378 };
379 
380 #endif
TGo4EventElement * GetInputEvent() const
Bool_t IsKeepInputEvent() const
Bool_t IsSourceEnabled() const
TGo4EventStoreParameter * GetEventStore() const
TGo4EventElement * fxInputEvent
void SetPreviousStep(TGo4AnalysisStep *pre)
Bool_t IsSourceImplemented() const
Int_t Store(TGo4Parameter *cali)
void NewEventStore(TGo4EventStoreParameter *kind)
void SetEventStore(TGo4EventStoreParameter *kind)
void NewEventSource(TGo4EventSourceParameter *kind)
void SetStatus(TGo4AnalysisStepStatus *state)
TGo4EventFactory * fxEventFactory
Bool_t IsEventSourceParam() const
void SetInputEvent(TGo4EventElement *in)
TGo4EventElement * GetOutputEvent() const
Int_t GetProcessStatus() const
TGo4EventElement * fxOutputEvent
Bool_t IsErrorStopped() const
Bool_t IsStoreEnabled() const
Bool_t IsKeepInputEvent() const
TGo4AnalysisStep * GetPreviousStep() const
TGo4EventStoreParameter * fxStoreType
Bool_t IsProcessEnabled() const
void SetSourceEnabled(Bool_t on=kTRUE)
TGo4EventSource * fxEventSource
TGo4EventFactory * GetStepFactory() const
TGo4EventProcessor * fxEventProcessor
void SetStatusMessage(const char *txt)
Bool_t IsErrorStopEnabled() const
TGo4AnalysisStepStatus * CreateStatus()
Bool_t IsKeepOutputEvent() const
Bool_t IsMatchingPrevious() const
TGo4EventStore * fxEventStore
TGo4Analysis * fxOwner
const char * GetEventSourceName() const
Bool_t IsKeepOutputEvent() const
TGo4AnalysisStep * fxPrevious
void SetStoreEnabled(Bool_t on=kTRUE)
TGo4EventProcessor * GetEventProcessor() const
void SetProcessEnabled(Bool_t on=kTRUE)
void SetEventSource(TGo4EventSourceParameter *kind)
virtual void InitEventClasses()
void SetEventProcessor(TGo4EventProcessorParameter *kind)
const char * GetEventStoreName() const
TGo4EventSourceParameter * fxSourceType
virtual ~TGo4AnalysisStep()
TGo4EventSourceParameter * GetEventSource() const
void SetErrorStopEnabled(Bool_t on)
void NewEventProcessor(TGo4EventProcessorParameter *kind)
const char * GetStatusMessage() const
TGo4EventProcessorParameter * fxProcessorType
Bool_t IsStoreImplemented() const
Bool_t IsEventStoreParam() const