16 #include "TObjArray.h"
24 #include "TGo4LockGuard.h"
39 TNamed(name,
"The Go4 Analysis Step Manager"),
42 fiCurrentStepIndex(0),
43 fbStepCheckingMode(kTRUE),
59 GO4TRACE((14,
"TGo4AnalysisStepManager::CloseAnalysis()",__LINE__, __FILE__));
61 TGo4Log::Debug(
"Analysis Step Manager -- closing analysis steps...");
64 while((step= dynamic_cast<TGo4AnalysisStep*>(
fxStepIterator->Next() ) ) !=0)
68 TGo4Log::Debug(
"Analysis Step Manager -- analysis steps were closed.");
73 GO4TRACE((14,
"TGo4AnalysisStepManager::InitEventClasses()",__LINE__, __FILE__));
76 Bool_t firststepfound=kFALSE;
77 Bool_t laststepfound=kFALSE;
78 TGo4Log::Debug(
"Analysis StepManager -- Initializing EventClasses...");
83 while((step= dynamic_cast<TGo4AnalysisStep*>(
fxStepIterator->Next() ) ) !=0)
105 firststepfound=kTRUE;
117 while((step= dynamic_cast<TGo4AnalysisStep*>(
fxStepIterator->Next() ) ) !=0)
134 TGo4Log::Debug(
"AnalysisStepManager -- Initializing EventClasses done.");
140 GO4TRACE((12,
"TGo4AnalysisStepManager::SetFirstStep(const char*)",__LINE__, __FILE__));
142 Bool_t result=kFALSE;
177 GO4TRACE((12,
"TGo4AnalysisStepManager::SetLastStep(const char*)",__LINE__, __FILE__));
217 GO4TRACE((12,
"TGo4AnalysisStepManager::SetStepStorage(const char*,Bool_t)",__LINE__, __FILE__));
218 Bool_t result=kFALSE;
236 GO4TRACE((12,
"TGo4AnalysisStepManager::NewStepStore(const char *, TGo4EventStoreParameter*)",__LINE__, __FILE__));
237 Bool_t result=kFALSE;
260 GO4TRACE((12,
"TGo4AnalysisStepManager::NewStepSource(const char *, TGo4EventSourceParameter *)",__LINE__, __FILE__));
261 Bool_t result=kFALSE;
287 GO4TRACE((12,
"TGo4AnalysisStepManager::NewStepProcessor(const char *, TGo4EventProcessorParameter *)",__LINE__, __FILE__));
288 Bool_t result=kFALSE;
303 return (step!=0) ? step->
Store(par) : 1;
309 return (step!=0) ? step->
Store(con) : 1;
315 return (step!=0) ? step->
Store(fit) : 1;
321 return (step!=0) ? step->
Store(folder) : 1;
327 GO4TRACE((11,
"TGo4AnalysisStepManager::GetInputEvent(Int_t)",__LINE__, __FILE__));
342 GO4TRACE((11,
"TGo4AnalysisStepManager::GetInputEvent(Int_t)",__LINE__, __FILE__));
357 GO4TRACE((11,
"TGo4AnalysisStepManager::GetOutputEvent(const char*)",__LINE__, __FILE__));
370 GO4TRACE((11,
"TGo4AnalysisStepManager::GetOutputEvent(Int_t)",__LINE__, __FILE__));
384 GO4TRACE((14,
"TGo4AnalysisStepManager::AddAnalysisStep(TGo4AnalysisStep*)",__LINE__, __FILE__));
392 GO4TRACE((12,
"TGo4AnalysisStepManager::AddAnalysisStep -- Adding new analysis step",__LINE__, __FILE__));
413 GO4TRACE((12,
"TGo4AnalysisStepManager::AddAnalysisStep -- Analysis step was already there",__LINE__, __FILE__));
421 GO4TRACE((12,
"TGo4AnalysisStepManager::AddAnalysisStep -- Zero Analysis step pointer",__LINE__, __FILE__));
430 GO4TRACE((11,
"TGo4AnalysisStepManager::GetAnalysisStep(const char *)",__LINE__, __FILE__));
446 GO4TRACE((11,
"TGo4AnalysisStepManager::GetAnalysisStepNum(Int_t)",__LINE__, __FILE__));
447 if ((number<0) || (number>
fxStepList->GetLast()))
return 0;
454 GO4TRACE((11,
"TGo4AnalysisStepManager::ProcessAnalysisSteps()",__LINE__, __FILE__));
458 Bool_t isfirststep = kTRUE;
460 Int_t repeatinputstart=-1;
475 isfirststep = kFALSE;
496 GO4TRACE((11,
"TGo4AnalysisStepManager::UpdateStatus(TGo4AnalysisStatus*)",__LINE__, __FILE__));
514 GO4TRACE((11,
"TGo4AnalysisStepManager::SetStatus(TGo4AnalysisStatus*)",__LINE__, __FILE__));
536 GO4TRACE((12,
"TGo4AnalysisStepManager::AutoSave()",__LINE__, __FILE__));
542 while((step= dynamic_cast<TGo4AnalysisStep*>(
fxStepIterator->Next() ) ) !=0)
Int_t Store(const char *name, TGo4Parameter *obj)
static TGo4MainTree * Instance()
void SetOutputEvent(TGo4EventElement *event)
TGo4AnalysisStep * fxCurrentStep
Bool_t NewStepProcessor(const char *name, TGo4EventProcessorParameter *par)
Bool_t NewStepSource(const char *name, TGo4EventSourceParameter *par)
void UpdateStatus(TGo4AnalysisStatus *state)
void SetStatus(TGo4AnalysisStatus *state)
TGo4AnalysisStepManager(const char *name)
void SetPreviousStep(TGo4AnalysisStep *pre)
Int_t Store(TGo4Parameter *cali)
void NewEventStore(TGo4EventStoreParameter *kind)
Int_t ProcessAnalysisSteps()
TGo4EventElement * GetOutputEvent() const
void NewEventSource(TGo4EventSourceParameter *kind)
void SetStatus(TGo4AnalysisStepStatus *state)
Bool_t IsKeepInputEvent()
Bool_t IsKeepOutputEvent()
Bool_t IsMatchingPrevious()
void SetFirstStepIndex(Int_t i)
void SetSourceEnabled(Bool_t on=kTRUE)
Bool_t SetStepStorage(const char *name, Bool_t on)
Int_t GetNumberOfAnalysisSteps()
Bool_t IsProcessEnabled() const
Bool_t IsSourceImplemented() const
void SetStatusMessage(const char *txt)
void SetStepChecking(Int_t on)
void Message(Int_t prio, const char *text,...)
Int_t IsStepChecking() const
TGo4AnalysisStepStatus * CreateStatus()
Bool_t AddStepStatus(TGo4AnalysisStepStatus *next)
virtual Bool_t InitEventClasses()
Bool_t NewStepStore(const char *name, TGo4EventStoreParameter *par)
Int_t GetLastStepIndex() const
Bool_t AddAnalysisStep(TGo4AnalysisStep *next)
TGo4EventElement * GetInputEvent(const char *stepname)
TGo4AnalysisStepStatus * GetStepStatus(const char *name)
TIterator * fxStepIterator
void SetStoreEnabled(Bool_t on=kTRUE)
TGo4EventElement * GetInputEvent()
virtual Int_t Write(const char *dummy=0, Int_t option=0, Int_t bufsize=0)
TGo4EventElement * GetOutputEvent()
virtual void InitEventClasses()
TGo4AnalysisStep * GetAnalysisStep(const char *name)
Int_t IsErrorStopEnabled()
void SetLastStepIndex(Int_t i)
TGo4AnalysisStep * GetAnalysisStepNum(Int_t number)
void NewEventProcessor(TGo4EventProcessorParameter *kind)
Bool_t IsErrorStopEnabled() const
Bool_t fbStepCheckingMode
static TGo4Analysis * Instance()
Bool_t SetFirstStep(const char *name)
TGo4EventProcessor * GetEventProcessor() const
virtual ~TGo4AnalysisStepManager()
Bool_t SetLastStep(const char *name)
Int_t GetFirstStepIndex() const
static void Debug(const char *text,...)