28 TNamed(name,
"The Go4 Analysis Step Manager"),
48 GO4TRACE((14,
"TGo4AnalysisStepManager::CloseAnalysis()",__LINE__, __FILE__));
50 TGo4Log::Debug(
"Analysis Step Manager -- closing analysis steps...");
57 TGo4Log::Debug(
"Analysis Step Manager -- analysis steps were closed.");
62 GO4TRACE((14,
"TGo4AnalysisStepManager::InitEventClasses()",__LINE__, __FILE__));
65 Bool_t firststepfound = kFALSE;
66 Bool_t laststepfound = kFALSE;
67 TGo4Log::Debug(
"Analysis StepManager -- Initializing EventClasses...");
121 TGo4Log::Debug(
"AnalysisStepManager -- Initializing EventClasses done.");
127 GO4TRACE((12,
"TGo4AnalysisStepManager::SetFirstStep(const char *)",__LINE__, __FILE__));
129 Bool_t result = kFALSE;
158 GO4TRACE((12,
"TGo4AnalysisStepManager::SetLastStep(const char *)",__LINE__, __FILE__));
198 GO4TRACE((12,
"TGo4AnalysisStepManager::SetStepStorage(const char *, Bool_t)",__LINE__, __FILE__));
199 Bool_t result = kFALSE;
213 GO4TRACE((12,
"TGo4AnalysisStepManager::NewStepStore(const char *, TGo4EventStoreParameter *)",__LINE__, __FILE__));
214 Bool_t result=kFALSE;
238 GO4TRACE((12,
"TGo4AnalysisStepManager::NewStepSource(const char *, TGo4EventSourceParameter *)",__LINE__, __FILE__));
239 Bool_t result=kFALSE;
261 GO4TRACE((12,
"TGo4AnalysisStepManager::NewStepProcessor(const char *, TGo4EventProcessorParameter *)",__LINE__, __FILE__));
262 Bool_t result = kFALSE;
277 return step ? step->
Store(par) : 1;
283 return step ? step->
Store(con) : 1;
289 return step ? step->
Store(fit) : 1;
295 return step ? step->
Store(folder) : 1;
300 GO4TRACE((11,
"TGo4AnalysisStepManager::GetInputEvent(Int_t)",__LINE__, __FILE__));
314 GO4TRACE((11,
"TGo4AnalysisStepManager::GetInputEvent(Int_t)",__LINE__, __FILE__));
329 GO4TRACE((11,
"TGo4AnalysisStepManager::GetOutputEvent(const char *)",__LINE__, __FILE__));
342 GO4TRACE((11,
"TGo4AnalysisStepManager::GetOutputEvent(Int_t)",__LINE__, __FILE__));
356 GO4TRACE((14,
"TGo4AnalysisStepManager::AddAnalysisStep(TGo4AnalysisStep *)",__LINE__, __FILE__));
364 GO4TRACE((12,
"TGo4AnalysisStepManager::AddAnalysisStep -- Adding new analysis step",__LINE__, __FILE__));
385 GO4TRACE((12,
"TGo4AnalysisStepManager::AddAnalysisStep -- Analysis step was already there",__LINE__, __FILE__));
393 GO4TRACE((12,
"TGo4AnalysisStepManager::AddAnalysisStep -- Zero Analysis step pointer",__LINE__, __FILE__));
402 GO4TRACE((11,
"TGo4AnalysisStepManager::GetAnalysisStep(const char *)",__LINE__, __FILE__));
418 GO4TRACE((11,
"TGo4AnalysisStepManager::GetAnalysisStepNum(Int_t)",__LINE__, __FILE__));
419 if ((number < 0) || (number >
fxStepList->GetLast()))
return nullptr;
426 GO4TRACE((11,
"TGo4AnalysisStepManager::ProcessAnalysisSteps()",__LINE__, __FILE__));
430 Bool_t isfirststep = kTRUE;
432 Int_t repeatinputstart=-1;
447 isfirststep = kFALSE;
451 fxCurrentStep->SetStatusMessage(
"!!! No Event Source for first analysis step !!!");
468 GO4TRACE((11,
"TGo4AnalysisStepManager::UpdateStatus(TGo4AnalysisStatus*)",__LINE__, __FILE__));
485 GO4TRACE((11,
"TGo4AnalysisStepManager::SetStatus(TGo4AnalysisStatus*)",__LINE__, __FILE__));
505 GO4TRACE((12,
"TGo4AnalysisStepManager::AutoSave()",__LINE__, __FILE__));
Status of the analysis instance.
void SetFirstStepIndex(Int_t i)
void SetLastStepIndex(Int_t i)
Int_t IsStepChecking() const
Int_t GetFirstStepIndex() const
void SetStepChecking(Int_t on)
Bool_t AddStepStatus(TGo4AnalysisStepStatus *next)
Add new step status object to analysis status.
Int_t GetLastStepIndex() const
void ClearStepStatus()
Clear all existing step status objects.
TGo4AnalysisStepStatus * GetStepStatus(const char *name)
Access to certain analysis step status by name.
Int_t GetNumberOfAnalysisSteps() const
Returns number of analysis steps.
TGo4EventElement * GetInputEvent(const char *stepname) const
Returns the input event structure of analysis step.
TObjArray * fxStepList
Array containing all analysis steps.
Int_t IsErrorStopEnabled() const
TGo4AnalysisStep * GetAnalysisStepNum(Int_t number) const
Access to certain analysis step by number.
void AutoSave()
Save step specific parts.
Bool_t SetStepStorage(const char *name, Bool_t on)
Enables analysis step of name to write its output event into its event store.
Bool_t IsStepChecking() const
Bool_t fbStepCheckingMode
True if chain of steps is checked for consistency of input and output events.
TIterator * fxStepIterator
Iterator used for analysis step list.
Int_t fiLastStepIndex
Index describing the last analysis step from the steplist to be processed.
void SetOutputEvent(TGo4EventElement *event)
Int_t Store(const char *name, TGo4Parameter *obj)
Write object obj into eventstore of the step specified by name.
Bool_t NewStepProcessor(const char *name, TGo4EventProcessorParameter *par)
Shuts down the old analysis step processor and creates a new one specified by parameter par.
TGo4AnalysisStep * GetAnalysisStep(const char *name) const
Access to certain analysis step by name.
void SetStatus(TGo4AnalysisStatus *state)
Set step specific part of analysis status object to steplist.
Bool_t SetLastStep(const char *name)
Sets analysis step name as last one to be processed in the chain of steps.
TGo4AnalysisStepManager(const char *name)
Bool_t AddAnalysisStep(TGo4AnalysisStep *next)
Method for user analysis constructor to setup the list of analysis steps.
void UpdateStatus(TGo4AnalysisStatus *state)
Update step specific part of analysis status object.
TGo4AnalysisStep * fxCurrentStep
Points to the currently active analysis step.
Bool_t SetFirstStep(const char *name)
Sets analysis step name as first one to be processed in the chain of steps.
Int_t fiFirstStepIndex
Index describing the first analysis step from the steplist to be processed.
virtual Bool_t InitEventClasses()
Initialization of the event class plugins which are delivered from the user defined event factory.
Int_t ProcessAnalysisSteps()
Uses the chain of analysis steps to process the first input event into an output event which then is ...
virtual ~TGo4AnalysisStepManager()
TGo4EventElement * GetOutputEvent() const
Returns the output event (detector) structure of analysis step.
Int_t fiCurrentStepIndex
Index describing the current analysis step.
void CloseAnalysis()
Finish the analysis run and close all event sources/storages.
Bool_t NewStepStore(const char *name, TGo4EventStoreParameter *par)
Shuts down the old analysis step storage and creates a new one specified by parameter par.
Bool_t NewStepSource(const char *name, TGo4EventSourceParameter *par)
Shuts down the old analysis step event source and creates a new one specified by parameter par.
TGo4EventElement * fxOutputEvent
Link to the last output event produced by the event analysis steps.
Status object of one analysis step.
Contains a single step of the analysis.
Int_t Store(TGo4Parameter *cali)
Saves a parameter correlated with the current event into the storage.
void SetStoreEnabled(Bool_t on=kTRUE)
Enables or disables the event store.
void Close()
Closes the analysis step.
void StoreCalibration()
Store the current calibration object of the event processor into the event store instance.
virtual void InitEventClasses()
Initialization of the event class plugins which are delivered from the user defined event factory.
void NewEventProcessor(TGo4EventProcessorParameter *kind)
For lazy initialization of event processor.
void NewEventSource(TGo4EventSourceParameter *kind)
For lazy initialization of event source.
void SetPreviousStep(TGo4AnalysisStep *pre)
Sets reference to previous analysis step.
Bool_t IsProcessEnabled() const
TGo4EventProcessor * GetEventProcessor() const
Access to the event processor.
TGo4EventElement * GetOutputEvent() const
Access to the output event which has been filled last.
void NewEventStore(TGo4EventStoreParameter *kind)
For lazy initialization of event store.
Bool_t IsMatchingPrevious() const
Check if an analysis step is matching as a previous step to this step.
static TGo4Analysis * Instance()
return analysis instance
void Message(Int_t prio, const char *text,...)
Display a user message.
The abstract base class for the data elements of which the unpacked events (or detector structure dat...
Basic type for all classes containing information to parametrize the event processor.
Abstract event processor.
TGo4EventElement * GetInputEvent()
Access to external raw event which is set as association member.
Basic type for all classes containing information to parameterize the event source.
Basic type for all classes containing information to parametrize the event store.
Central class of Go4Fit package.
static void Debug(const char *text,...) GO4_PRINTF_ARGS
User shortcut for message with prio 0.
Int_t Write(const char *dummy=nullptr, Int_t option=0, Int_t bufsize=0) override
Write tree content to file.
static TGo4MainTree * Instance()
static Bool_t Exists()
True if instance of tree already exists.
void Update()
Update the tree entry information without processing any branch.
Base class for all parameter aggregations, e.g.