GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TGo4AnalysisStepManager Class Reference

This object is responsible for the organisation of analysis steps. More...

#include <TGo4AnalysisStepManager.h>

+ Inheritance diagram for TGo4AnalysisStepManager:

Public Member Functions

 TGo4AnalysisStepManager (const char *name)
 
virtual ~TGo4AnalysisStepManager ()
 
Bool_t AddAnalysisStep (TGo4AnalysisStep *next)
 Method for user analysis constructor to setup the list of analysis steps.
 
void AutoSave ()
 Save step specific parts.
 
void CloseAnalysis ()
 Finish the analysis run and close all event sources/storages.
 
TGo4AnalysisStepGetAnalysisStep (const char *name) const
 Access to certain analysis step by name.
 
TGo4AnalysisStepGetAnalysisStepNum (Int_t number) const
 Access to certain analysis step by number.
 
TGo4EventElementGetInputEvent (const char *stepname) const
 Returns the input event structure of analysis step.
 
TGo4EventElementGetInputEvent (Int_t stepindex) const
 Returns the input event structure of analysis step.
 
Int_t GetNumberOfAnalysisSteps () const
 Returns number of analysis steps.
 
TGo4EventElementGetOutputEvent () const
 Returns the output event (detector) structure of analysis step.
 
TGo4EventElementGetOutputEvent (const char *stepname) const
 Returns the output event (detector) structure of analysis step.
 
TGo4EventElementGetOutputEvent (Int_t stepindex) const
 Returns the output event (detector) structure of analysis step.
 
virtual Bool_t InitEventClasses ()
 Initialization of the event class plugins which are delivered from the user defined event factory.
 
Int_t IsErrorStopEnabled () const
 
Bool_t IsStepChecking () const
 
Bool_t NewStepProcessor (const char *name, TGo4EventProcessorParameter *par)
 Shuts down the old analysis step processor 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.
 
Bool_t NewStepStore (const char *name, TGo4EventStoreParameter *par)
 Shuts down the old analysis step storage and creates a new one specified by parameter par.
 
Int_t ProcessAnalysisSteps ()
 Uses the chain of analysis steps to process the first input event into an output event which then is accessible at the output event member.
 
Bool_t SetFirstStep (const char *name)
 Sets analysis step name as first one to be processed in the chain of steps.
 
Bool_t SetLastStep (const char *name)
 Sets analysis step name as last one to be processed in the chain of steps.
 
void SetOutputEvent (TGo4EventElement *event)
 
void SetStatus (TGo4AnalysisStatus *state)
 Set step specific part of analysis status object to steplist.
 
void SetStepChecking (Bool_t on=kTRUE)
 
Bool_t SetStepStorage (const char *name, Bool_t on)
 Enables analysis step of name to write its output event into its event store.
 
Int_t Store (const char *name, TFolder *folder)
 Write folder into eventstore of the step specified by name.
 
Int_t Store (const char *name, TGo4Condition *con)
 Write condition con into eventstore of the step specified by name.
 
Int_t Store (const char *name, TGo4Fitter *fit)
 Write fitter fit into eventstore of the step specified by name.
 
Int_t Store (const char *name, TGo4Parameter *obj)
 Write object obj into eventstore of the step specified by name.
 
void UpdateStatus (TGo4AnalysisStatus *state)
 Update step specific part of analysis status object.
 

Private Attributes

Bool_t fbStepCheckingMode {kFALSE}
 True if chain of steps is checked for consistency of input and output events.
 
Int_t fiCurrentStepIndex {0}
 Index describing the current analysis step.
 
Int_t fiFirstStepIndex {0}
 Index describing the first analysis step from the steplist to be processed.
 
Int_t fiLastStepIndex {0}
 Index describing the last analysis step from the steplist to be processed.
 
TGo4AnalysisStepfxCurrentStep {nullptr}
 Points to the currently active analysis step.
 
TGo4EventElementfxOutputEvent {nullptr}
 Link to the last output event produced by the event analysis steps.
 
TIterator * fxStepIterator {nullptr}
 Iterator used for analysis step list.
 
TObjArray * fxStepList {nullptr}
 Array containing all analysis steps.
 

Detailed Description

This object is responsible for the organisation of analysis steps.

Keeps lists of steps. Is aggregate of TGo4Analysis.

Author
J. Adamczewski
Since
07-May-2002

Definition at line 40 of file TGo4AnalysisStepManager.h.

Constructor & Destructor Documentation

◆ TGo4AnalysisStepManager()

TGo4AnalysisStepManager::TGo4AnalysisStepManager ( const char * name)

◆ ~TGo4AnalysisStepManager()

TGo4AnalysisStepManager::~TGo4AnalysisStepManager ( )
virtual

Definition at line 40 of file TGo4AnalysisStepManager.cxx.

References fxStepIterator, and fxStepList.

Member Function Documentation

◆ AddAnalysisStep()

Bool_t TGo4AnalysisStepManager::AddAnalysisStep ( TGo4AnalysisStep * next)

Method for user analysis constructor to setup the list of analysis steps.

Each call of this method will add a new analysis step at the end of the list. Caution: user has to take care that output and input event types of subsequent steps are matching! Analysis steps cannot be removed, since the steplist is not intended to be dynamic. This is a pure creational method. Analysis steps are owned by the steplist once they have been added.

Definition at line 354 of file TGo4AnalysisStepManager.cxx.

References fiLastStepIndex, fxStepList, GO4TRACE, TGo4Analysis::Instance(), TGo4Analysis::Message(), and TGo4AnalysisStep::SetPreviousStep().

◆ AutoSave()

◆ CloseAnalysis()

void TGo4AnalysisStepManager::CloseAnalysis ( )

Finish the analysis run and close all event sources/storages.

The analysis instance and the setup of the analysis steps is not deleted.

Definition at line 46 of file TGo4AnalysisStepManager.cxx.

References TGo4AnalysisStep::Close(), TGo4Log::Debug(), fxStepIterator, and GO4TRACE.

◆ GetAnalysisStep()

TGo4AnalysisStep * TGo4AnalysisStepManager::GetAnalysisStep ( const char * name) const

Access to certain analysis step by name.

For analysis internal usage. if name == nullptr, first step is returned

Definition at line 400 of file TGo4AnalysisStepManager.cxx.

References fiFirstStepIndex, fxStepList, and GO4TRACE.

Referenced by GetInputEvent(), GetOutputEvent(), NewStepProcessor(), NewStepSource(), NewStepStore(), SetStepStorage(), Store(), Store(), Store(), and Store().

◆ GetAnalysisStepNum()

TGo4AnalysisStep * TGo4AnalysisStepManager::GetAnalysisStepNum ( Int_t number) const

Access to certain analysis step by number.

Definition at line 416 of file TGo4AnalysisStepManager.cxx.

References fxStepList, and GO4TRACE.

◆ GetInputEvent() [1/2]

TGo4EventElement * TGo4AnalysisStepManager::GetInputEvent ( const char * stepname) const

Returns the input event structure of analysis step.

Argument indicates the step by name. For internal usage in the user defined event function UserEventFunc, and is used by analysis steps to get result of previous steps.

Definition at line 298 of file TGo4AnalysisStepManager.cxx.

References GetAnalysisStep(), TGo4AnalysisStep::GetEventProcessor(), TGo4EventProcessor::GetInputEvent(), and GO4TRACE.

◆ GetInputEvent() [2/2]

TGo4EventElement * TGo4AnalysisStepManager::GetInputEvent ( Int_t stepindex) const

Returns the input event structure of analysis step.

Argument number indicates the step from 0 (first) to n (last) in subsequent order. For internal usage in the user defined event function UserEventFunc, and is used by analysis steps to access event sources of previous steps.

Definition at line 312 of file TGo4AnalysisStepManager.cxx.

References fxStepList, TGo4AnalysisStep::GetEventProcessor(), TGo4EventProcessor::GetInputEvent(), and GO4TRACE.

◆ GetNumberOfAnalysisSteps()

Int_t TGo4AnalysisStepManager::GetNumberOfAnalysisSteps ( ) const

Returns number of analysis steps.

Definition at line 411 of file TGo4AnalysisStepManager.cxx.

References fxStepList.

◆ GetOutputEvent() [1/3]

TGo4EventElement * TGo4AnalysisStepManager::GetOutputEvent ( ) const
inline

Returns the output event (detector) structure of analysis step.

Is set by SetOutputEvent method. For internal usage in the user defined event function UserEventFunc, and is used by analysis steps to get result of previous steps.

Definition at line 207 of file TGo4AnalysisStepManager.h.

References fxOutputEvent.

◆ GetOutputEvent() [2/3]

TGo4EventElement * TGo4AnalysisStepManager::GetOutputEvent ( const char * stepname) const

Returns the output event (detector) structure of analysis step.

Argument indicates the step by name. For internal usage in the user defined event function UserEventFunc, and is used by analysis steps to get result of previous steps.

Definition at line 327 of file TGo4AnalysisStepManager.cxx.

References GetAnalysisStep(), TGo4AnalysisStep::GetOutputEvent(), and GO4TRACE.

◆ GetOutputEvent() [3/3]

TGo4EventElement * TGo4AnalysisStepManager::GetOutputEvent ( Int_t stepindex) const

Returns the output event (detector) structure of analysis step.

Argument number indicates the step from 0 (first) to n (last) in subsequent order. Default is the output event of the currently processed step, which is set by SetEvent method. For internal usage in the user defined event function UserEventFunc, and is used by analysis steps to get result of previous steps.

Definition at line 340 of file TGo4AnalysisStepManager.cxx.

References fxStepList, TGo4AnalysisStep::GetOutputEvent(), and GO4TRACE.

◆ InitEventClasses()

Bool_t TGo4AnalysisStepManager::InitEventClasses ( )
virtual

Initialization of the event class plugins which are delivered from the user defined event factory.

The virtual standard base class method may be changed by overriding; normally, this is not necessary.

Definition at line 60 of file TGo4AnalysisStepManager.cxx.

References TGo4Log::Debug(), fiCurrentStepIndex, fiFirstStepIndex, fiLastStepIndex, fxStepIterator, GO4TRACE, TGo4AnalysisStep::InitEventClasses(), TGo4Analysis::Instance(), TGo4AnalysisStep::IsMatchingPrevious(), TGo4AnalysisStep::IsProcessEnabled(), IsStepChecking(), and TGo4Analysis::Message().

◆ IsErrorStopEnabled()

Int_t TGo4AnalysisStepManager::IsErrorStopEnabled ( ) const

Definition at line 521 of file TGo4AnalysisStepManager.cxx.

◆ IsStepChecking()

Bool_t TGo4AnalysisStepManager::IsStepChecking ( ) const
inline

Definition at line 215 of file TGo4AnalysisStepManager.h.

References fbStepCheckingMode.

Referenced by InitEventClasses(), and ProcessAnalysisSteps().

◆ NewStepProcessor()

Bool_t TGo4AnalysisStepManager::NewStepProcessor ( const char * name,
TGo4EventProcessorParameter * par )

Shuts down the old analysis step processor and creates a new one specified by parameter par.

To be used in online mode to switch event processing.

Definition at line 259 of file TGo4AnalysisStepManager.cxx.

References GetAnalysisStep(), GO4TRACE, and TGo4AnalysisStep::NewEventProcessor().

◆ NewStepSource()

Bool_t TGo4AnalysisStepManager::NewStepSource ( const char * name,
TGo4EventSourceParameter * par )

Shuts down the old analysis step event source and creates a new one specified by parameter par.

To be used in online mode to switch input.

Definition at line 236 of file TGo4AnalysisStepManager.cxx.

References fiFirstStepIndex, fxStepList, GetAnalysisStep(), GO4TRACE, and TGo4AnalysisStep::NewEventSource().

◆ NewStepStore()

Bool_t TGo4AnalysisStepManager::NewStepStore ( const char * name,
TGo4EventStoreParameter * par )

Shuts down the old analysis step storage and creates a new one specified by parameter par.

To be used in online mode to switch output files.

Definition at line 211 of file TGo4AnalysisStepManager.cxx.

References fiLastStepIndex, fxStepList, GetAnalysisStep(), GO4TRACE, and TGo4AnalysisStep::NewEventStore().

◆ ProcessAnalysisSteps()

Int_t TGo4AnalysisStepManager::ProcessAnalysisSteps ( )

Uses the chain of analysis steps to process the first input event into an output event which then is accessible at the output event member.

Returns number of steps run. For internal usage in the MainCycle and GetEvent methods; may also be called from UserEventFunc directly.

Definition at line 424 of file TGo4AnalysisStepManager.cxx.

References TGo4MainTree::Exists(), fiCurrentStepIndex, fiFirstStepIndex, fiLastStepIndex, fxCurrentStep, fxStepList, GO4TRACE, TGo4MainTree::Instance(), IsStepChecking(), SetOutputEvent(), and TGo4MainTree::Update().

◆ SetFirstStep()

Bool_t TGo4AnalysisStepManager::SetFirstStep ( const char * name)

Sets analysis step name as first one to be processed in the chain of steps.

First step will read input event from its event source. If name is nullptr, takes first step in steplist.

Definition at line 125 of file TGo4AnalysisStepManager.cxx.

References fiFirstStepIndex, fiLastStepIndex, fxStepList, GO4TRACE, TGo4Analysis::Instance(), and TGo4Analysis::Message().

◆ SetLastStep()

Bool_t TGo4AnalysisStepManager::SetLastStep ( const char * name)

Sets analysis step name as last one to be processed in the chain of steps.

Last step will write output event into its event store by default, its output event is accessible in the user analysis. If name is nullptr, takes last step in steplist.

Definition at line 156 of file TGo4AnalysisStepManager.cxx.

References fiFirstStepIndex, fiLastStepIndex, fxStepList, GO4TRACE, TGo4Analysis::Instance(), and TGo4Analysis::Message().

◆ SetOutputEvent()

void TGo4AnalysisStepManager::SetOutputEvent ( TGo4EventElement * event)
inline

Definition at line 209 of file TGo4AnalysisStepManager.h.

References fxOutputEvent.

Referenced by ProcessAnalysisSteps().

◆ SetStatus()

◆ SetStepChecking()

void TGo4AnalysisStepManager::SetStepChecking ( Bool_t on = kTRUE)
inline

Definition at line 213 of file TGo4AnalysisStepManager.h.

References fbStepCheckingMode.

◆ SetStepStorage()

Bool_t TGo4AnalysisStepManager::SetStepStorage ( const char * name,
Bool_t on )

Enables analysis step of name to write its output event into its event store.

By default only the last analysis step will keep the output event in the store, the intermediate steps will only pass the output to the subsequent step. This method lets also any intermediate step write the result to its store, which can later be used to process from this point of the analysis chain. However, you may also switch off the storage of the last analysis step output if you only want to use the histograms produced by the final user event function.

Definition at line 196 of file TGo4AnalysisStepManager.cxx.

References GetAnalysisStep(), GO4TRACE, and TGo4AnalysisStep::SetStoreEnabled().

◆ Store() [1/4]

Int_t TGo4AnalysisStepManager::Store ( const char * name,
TFolder * folder )

Write folder into eventstore of the step specified by name.

Current event number will be added to parameter name in the file. Returns -1 in case of not active eventstore. Returns +1 in case of unknown step.

Definition at line 292 of file TGo4AnalysisStepManager.cxx.

References GetAnalysisStep(), and TGo4AnalysisStep::Store().

◆ Store() [2/4]

Int_t TGo4AnalysisStepManager::Store ( const char * name,
TGo4Condition * con )

Write condition con into eventstore of the step specified by name.

Current event number will be added to parameter name in the file. Returns -1 in case of not active eventstore. Returns +1 in case of unknown step.

Definition at line 280 of file TGo4AnalysisStepManager.cxx.

References GetAnalysisStep(), and TGo4AnalysisStep::Store().

◆ Store() [3/4]

Int_t TGo4AnalysisStepManager::Store ( const char * name,
TGo4Fitter * fit )

Write fitter fit into eventstore of the step specified by name.

Current event number will be added to parameter name in the file. Returns -1 in case of not active eventstore. Returns +1 in case of unknown step.

Definition at line 286 of file TGo4AnalysisStepManager.cxx.

References GetAnalysisStep(), and TGo4AnalysisStep::Store().

◆ Store() [4/4]

Int_t TGo4AnalysisStepManager::Store ( const char * name,
TGo4Parameter * obj )

Write object obj into eventstore of the step specified by name.

Current event number will be added to object name in the file. Returns -1 in case of not active eventstore. Returns +1 in case of unknown step.

Definition at line 274 of file TGo4AnalysisStepManager.cxx.

References GetAnalysisStep(), and TGo4AnalysisStep::Store().

◆ UpdateStatus()

Field Documentation

◆ fbStepCheckingMode

Bool_t TGo4AnalysisStepManager::fbStepCheckingMode {kFALSE}
private

True if chain of steps is checked for consistency of input and output events.

Default is true. Can be disabled for steps working in non-subsequent manner. i.e. intermediate steps may be disabled, event structures of subsequent steps need not match.

Definition at line 245 of file TGo4AnalysisStepManager.h.

Referenced by TGo4AnalysisStepManager(), IsStepChecking(), SetStatus(), SetStepChecking(), and UpdateStatus().

◆ fiCurrentStepIndex

Int_t TGo4AnalysisStepManager::fiCurrentStepIndex {0}
private

Index describing the current analysis step.

Used to check the first and last step to be processed.

Definition at line 239 of file TGo4AnalysisStepManager.h.

Referenced by TGo4AnalysisStepManager(), InitEventClasses(), and ProcessAnalysisSteps().

◆ fiFirstStepIndex

Int_t TGo4AnalysisStepManager::fiFirstStepIndex {0}
private

Index describing the first analysis step from the steplist to be processed.

The first analysis step will use its own event source to get input events.

Definition at line 229 of file TGo4AnalysisStepManager.h.

Referenced by TGo4AnalysisStepManager(), GetAnalysisStep(), InitEventClasses(), NewStepSource(), ProcessAnalysisSteps(), SetFirstStep(), SetLastStep(), SetStatus(), and UpdateStatus().

◆ fiLastStepIndex

Int_t TGo4AnalysisStepManager::fiLastStepIndex {0}
private

Index describing the last analysis step from the steplist to be processed.

Output event of the last analysis step is accessible by GetEvent method and is used for user event function and dynamic list.

Definition at line 235 of file TGo4AnalysisStepManager.h.

Referenced by TGo4AnalysisStepManager(), AddAnalysisStep(), InitEventClasses(), NewStepStore(), ProcessAnalysisSteps(), SetFirstStep(), SetLastStep(), SetStatus(), and UpdateStatus().

◆ fxCurrentStep

TGo4AnalysisStep* TGo4AnalysisStepManager::fxCurrentStep {nullptr}
private

Points to the currently active analysis step.

1

Definition at line 249 of file TGo4AnalysisStepManager.h.

Referenced by TGo4AnalysisStepManager(), ProcessAnalysisSteps(), SetStatus(), and UpdateStatus().

◆ fxOutputEvent

TGo4EventElement* TGo4AnalysisStepManager::fxOutputEvent {nullptr}
private

Link to the last output event produced by the event analysis steps.

Can be processed further by user event function and dynamic list.

Definition at line 253 of file TGo4AnalysisStepManager.h.

Referenced by TGo4AnalysisStepManager(), GetOutputEvent(), and SetOutputEvent().

◆ fxStepIterator

TIterator* TGo4AnalysisStepManager::fxStepIterator {nullptr}
private

Iterator used for analysis step list.

Definition at line 224 of file TGo4AnalysisStepManager.h.

Referenced by TGo4AnalysisStepManager(), ~TGo4AnalysisStepManager(), AutoSave(), CloseAnalysis(), InitEventClasses(), SetStatus(), and UpdateStatus().

◆ fxStepList

TObjArray* TGo4AnalysisStepManager::fxStepList {nullptr}
private

Array containing all analysis steps.

The steplist is iterated by the maincycle from start to end index to process the active steps.

Definition at line 221 of file TGo4AnalysisStepManager.h.

Referenced by TGo4AnalysisStepManager(), ~TGo4AnalysisStepManager(), AddAnalysisStep(), GetAnalysisStep(), GetAnalysisStepNum(), GetInputEvent(), GetNumberOfAnalysisSteps(), GetOutputEvent(), NewStepSource(), NewStepStore(), ProcessAnalysisSteps(), SetFirstStep(), and SetLastStep().


The documentation for this class was generated from the following files: