v2.10-0 (21000JUN2005)

Go4Analysis
Class TGo4AnalysisStepManager


class TGo4AnalysisStepManager
derived from TNamed

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

Field Summary
 private Bool_tfbStepCheckingMode
          True if chain of steps is checked for consistency of input and output events.
 private Int_tfiCurrentStepIndex
          Index describing the current analysis step.
 private Int_tfiFirstStepIndex
          Index describing the first analysis step from the steplist
to be processed.
 private Int_tfiLastStepIndex
          Index describing the last analysis step from the steplist
to be processed.
 private TGo4AnalysisStep*fxCurrentStep
          Points to the currently active analysis step.
 private TGo4EventElement*fxOutputEvent
          Link to the last output event produced by the event analysis steps.
 private TIterator*fxStepIterator
          Iterator used for analysis step list.
 private TObjArray*fxStepList
          Array containing all analysis steps.
 private TMutex*fxStepMutex
          Mutex protecting the analysis step list.

Fields inherited from class TNamed
fName, fTitle

Constructor Summary
TGo4AnalysisStepManager()
           
TGo4AnalysisStepManager(const Text_t* name)
           

Destructor Summary
~TGo4AnalysisStepManager()
           

Method Summary
 Bool_tAddAnalysisStep(TGo4AnalysisStep* next)
          Method for user analysis constructor to setup the list
of analyisis steps.
 voidAutoSave()
          Save step specific parts.
 voidCloseAnalysis()
          Finish the analysis run and close all event sources/storages.
 TGo4AnalysisStep*GetAnalysisStep(const char * name)
          Access to certain analysis step by name.
 TGo4EventElement*GetInputEvent(const char * stepname)
          Returns the input event structure of analysis step.
 TGo4EventElement*GetInputEvent(Int_t stepindex)
          Returns the input event structure of analysis step.
 TGo4EventElement*GetOutputEvent(const char * stepname)
          Returns the output event (detector) structure of analysis step.
 TGo4EventElement*GetOutputEvent(Int_t stepindex)
          Returns the output event (detector) structure of analysis step.
 TGo4EventElement*GetOutputEvent()
          Returns the output event (detector) structure of analysis step.
 virtual Bool_tInitEventClasses()
          Initialization of the event class plugins which are delivered from
the user defined event factory.
 Int_tIsErrorStopEnabled()
           
 Bool_tIsStepChecking()
           
 Bool_tNewStepProcessor(const Text_t* name, TGo4EventProcessorParameter* par)
          Shuts down the old analysis step processor and creates a new
one specified by parameter par.
 Bool_tNewStepSource(const Text_t* name, TGo4EventSourceParameter* par)
          Shuts down the old analysis step event source and creates a new
one specified by parameter par.
 Bool_tNewStepStore(const Text_t* name, TGo4EventStoreParameter* par)
          Shuts down the old analysis step storage and creates a new
one specified by parameter par.
 Int_tProcessAnalysisSteps()
          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_tSetFirstStep(const Text_t* name)
          Sets analysis step name as first one to be processed in
the chain of steps.
 Bool_tSetLastStep(const Text_t* name)
          Sets analysis step name as last one to be processed in
the chain of steps.
 voidSetOutputEvent(TGo4EventElement* event)
           
 voidSetStatus(TGo4AnalysisStatus* state)
          Set step specific part of analysis status object to steplist
 voidSetStepChecking(Bool_t on)
           
 Bool_tSetStepStorage(const Text_t* name, Bool_t on)
          Enables analysis step of name to write its output event into
its event store.
 Int_tStore(const Text_t* name, TGo4Parameter* obj)
          Write object obj into eventstore of the step specified by name.
 Int_tStore(const Text_t* name, TGo4Condition* con)
          Write condition con into eventstore of the step specified by name.
 Int_tStore(const Text_t* name, TGo4Fitter* fit)
          Write fitter fit into eventstore of the step specified by name.
 Int_tStore(const Text_t* name, TFolder* folder)
          Write folder into eventstore of the step specified by name.
 voidUpdateStatus(TGo4AnalysisStatus* state)
          Update step specific part of analysis status object

Methods inherited from class TNamed
operator=, Clear, Clone, Compare, Copy, FillBuffer, GetName, GetTitle, Hash, IsSortable, SetName, SetNameTitle, SetTitle, ls, Print, Sizeof, Class, Class_Name, Class_Version, Dictionary, IsA, ShowMembers, Streamer, StreamerNVirtual, DeclFileName, ImplFileLine, ImplFileName, DeclFileLine

Field Detail

fbStepCheckingMode

private Bool_t fbStepCheckingMode
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.

fiCurrentStepIndex

private Int_t fiCurrentStepIndex
Index describing the current analysis step.
Used to check the first and last step to be processed.

fiFirstStepIndex

private Int_t fiFirstStepIndex
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.

fiLastStepIndex

private Int_t fiLastStepIndex
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.

fxCurrentStep

private TGo4AnalysisStep* fxCurrentStep
Points to the currently active analysis step.
supplierCardinality 1

fxOutputEvent

private TGo4EventElement* fxOutputEvent
Link to the last output event produced by the event analysis steps.
Can be processed further by user event function and dynamic list.

fxStepIterator

private TIterator* fxStepIterator
Iterator used for analysis step list.

fxStepList

private TObjArray* fxStepList
Array containing all analysis steps. The steplist is iterated by
the maincycle from start to end index to process the active steps.

fxStepMutex

private TMutex* fxStepMutex
Mutex protecting the analysis step list.
Constructor Detail

TGo4AnalysisStepManager

public TGo4AnalysisStepManager()

TGo4AnalysisStepManager

public TGo4AnalysisStepManager(const Text_t* name)
Method Detail

~TGo4AnalysisStepManager

public synchronized ~TGo4AnalysisStepManager()
Method Detail

AddAnalysisStep

public Bool_t AddAnalysisStep(TGo4AnalysisStep* next)
Method for user analysis constructor to setup the list
of analyisis 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! Analyisis 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.

AutoSave

public void AutoSave()
Save step specific parts.

CloseAnalysis

public void CloseAnalysis()
Finish the analysis run and close all event sources/storages.
The analysis instance and the setup of the analysis steps is not
deleted.

GetAnalysisStep

public TGo4AnalysisStep* GetAnalysisStep(const char * name)
Access to certain analysis step by name. For analysis internal usage.

GetInputEvent

public TGo4EventElement* GetInputEvent(const char * stepname)
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.

GetInputEvent

public TGo4EventElement* GetInputEvent(Int_t stepindex)
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.

GetOutputEvent

public TGo4EventElement* GetOutputEvent(const char * stepname)
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.

GetOutputEvent

public TGo4EventElement* GetOutputEvent(Int_t stepindex)
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.

GetOutputEvent

public TGo4EventElement* GetOutputEvent()
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.

InitEventClasses

public virtual Bool_t InitEventClasses()
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.

IsErrorStopEnabled

public Int_t IsErrorStopEnabled()

IsStepChecking

public Bool_t IsStepChecking()

NewStepProcessor

public Bool_t NewStepProcessor(const Text_t* 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.

NewStepSource

public Bool_t NewStepSource(const Text_t* 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.

NewStepStore

public Bool_t NewStepStore(const Text_t* 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.

ProcessAnalysisSteps

public 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. Returns number of
steps run. For internal usage in the MainCycle and
GetEvent methods; may also be called from UserEventFunc
directly.

SetFirstStep

public Bool_t SetFirstStep(const Text_t* 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 nullpointer, takes first step in steplist.

SetLastStep

public Bool_t SetLastStep(const Text_t* 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 nullpointer, takes last step in steplist.

SetOutputEvent

public void SetOutputEvent(TGo4EventElement* event)

SetStatus

public void SetStatus(TGo4AnalysisStatus* state)
Set step specific part of analysis status object to steplist

SetStepChecking

public void SetStepChecking(Bool_t on)

SetStepStorage

public Bool_t SetStepStorage(const Text_t* 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.

Store

public Int_t Store(const Text_t* 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.

Store

public Int_t Store(const Text_t* 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.

Store

public Int_t Store(const Text_t* 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.

Store

public Int_t Store(const Text_t* 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.

UpdateStatus

public void UpdateStatus(TGo4AnalysisStatus* state)
Update step specific part of analysis status object

Association Links

to Class TObjArray

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

to Class TMutex

Mutex protecting the analysis step list.

to Class TIterator

Iterator used for analysis step list.

to Class TGo4AnalysisStep

Points to the currently active analysis step.

Supplier Cardinality 1

to Class TGo4EventElement

Link to the last output event produced by the event analysis steps.
Can be processed further by user event function and dynamic list.

J.Adamczewski, M.Al-Turany, D.Bertini, H.G.Essel, S.Linev

30-06-2005