v2.10-0 (21000JUN2005)

Go4Analysis
Class TGo4AnalysisStep


class TGo4AnalysisStep
derived from TNamed

Contains a single step of the analysis. Each analysis step
has an event source, an input event structure,
an output event structure (both from event element class),
and an event store. Input event is converted to output event using
an event processor instance which is referenced by the output event
class, but not stored with the resulting data. Analysis steps are
held in an analysis step list which is processed iteratively; output
event of an analysis step is input event of the subsequent analysis step,
etc. The first analysis step takes its input event from an
external event source, e.g. a file; the last step writes the
output event into its external event store. Starting and ending
point within the chain of analysis steps may be changed on the fly.

Author:
J. Adamczewski
Since: 11-Jan-2001

Field Summary
 private Bool_tfbErrorStopEnabled
          Operation mode switch.
 private Bool_tfbErrorStopped
          True if the analysis step has been stopped after input error.
 private Bool_tfbProcessEnabled
          Enables processing of the input event.
 private Bool_tfbSourceEnabled
          Enables event source.If true,
the event source is used to get the input event; otherwise
we use the output of the previous step.
 private Bool_tfbSourceImplemented
          Flag for the previous analysis step.
 private Bool_tfbStoreEnabled
          Enables event store.
 private Bool_tfbStoreImplemented
          Flag for the subsequent analysis step.
 private TStringfcBuffer
          Buffer string for text output
 private TStringfcStatusMessage
          Most recent status message.
 private Int_tfiProcessStatus
          Contains current analysis step status value.
 private TGo4EventFactory*fxEventFactory
          The abstract factory implementation which provides the event classes.
 private TGo4EventProcessor*fxEventProcessor
          The processing class which works on the input event and
fills the output event.
 private TGo4EventSource*fxEventSource
          The source of the input events.
 private TGo4EventStore*fxEventStore
          The storage instance for the unpacked events (detector) structures.
 private TGo4EventElement*fxInputEvent
          points to the last input event delivered from the event source
 private TGo4EventElement*fxOutputEvent
          The unpacked event (detector) structure that has been filled by the
analysis step .
 private TGo4Analysis*fxOwner
          Points back to the analysis wich keeps this step.
 private TGo4AnalysisStep*fxPrevious
          Points to the previous analysis step.
 private TGo4EventProcessorParameter*fxProcessorType
          Parameter object of next event processor to be activated.
 private TGo4EventSourceParameter*fxSourceType
          Parameter object of next event source to be activated.
 private TGo4EventStoreParameter*fxStoreType
          Parameter object of next event storage to be activated.

Fields inherited from class TNamed
fName, fTitle

Constructor Summary
TGo4AnalysisStep(const char * name, TGo4EventFactory* eventfactory, TGo4EventSourceParameter* sourcetype, TGo4EventStoreParameter* storetype, TGo4EventProcessorParameter* processortype)
          Normal ctor.
TGo4AnalysisStep()
          default ctor for streamer.

Destructor Summary
 virtual synchronized ~TGo4AnalysisStep()
           

Method Summary
 voidClose()
          Closes the analysis step.
 voidCloseEventProcessor()
          Unregister and close eventprocessor, if existing.
 voidCloseEventSource()
          Unregister and close eventsource, if existing.
 voidCloseEventStore()
          Unregister and close eventstore, if existing.
 TGo4AnalysisStepStatus*CreateStatus()
          Create a copy of the analysis step internal state.
 voidDeleteInputEvent()
          Delete input event object
 voidDeleteOutputEvent()
          Delete input event object
 TGo4EventProcessor*GetEventProcessor()
          Access to the event processor.
 const const char *GetEventStoreName()
          Access to name of currently active event store.
 TGo4EventElement*GetInputEvent()
          Access to the input event of this step.
 TGo4EventElement*GetOutputEvent()
          Access to the output event which has been filled last.
 TGo4AnalysisStep*GetPreviousStep()
          Get previous analysis step.
 Int_tGetProcessStatus()
          Status of the last event.
 const const char *GetStatusMessage()
          Status message of last Process() call.
 virtual voidInitEventClasses()
          Initialization of the event class plugins which are delivered from
the user defined event factory.
 Bool_tIsErrorStopEnabled()
          True if analsis step allows stop on error.
 Bool_tIsErrorStopped()
          True if analsis step has been stopped on error.
 Bool_tIsMatchingPrevious()
          Check if an analysis step is matching as a previous step to this
step.
 Bool_tIsProcessEnabled()
           
 Bool_tIsSourceEnabled()
           
 Bool_tIsSourceImplemented()
           
 Bool_tIsStoreEnabled()
           
 Bool_tIsStoreImplemented()
           
 voidNewEventProcessor(TGo4EventProcessorParameter* kind)
          For lazy initialization of event processor.
 voidNewEventSource(TGo4EventSourceParameter* kind)
          For lazy initialization of event source.
 voidNewEventStore(TGo4EventStoreParameter* kind)
          For lazy initialization of event store.
 voidNewInputEvent()
          create input event object
 voidNewOutputEvent()
          create input event object
 voidProcess()
          The main analysis action which is invoked by the external
go4 analysis.
 voidResetErrorStop()
          Reset the stopped-after-error state of this
analysis step object.
 voidSetErrorStopEnabled(Bool_t on)
          Enables or disables the stop-on-error mode.
 voidSetEventProcessor(TGo4EventProcessorParameter* kind)
          Sets the event processor parameter which is used on intitialization
of this step.
 voidSetEventSource(TGo4EventSourceParameter* kind)
          Sets the event source parameter which is used on intitialization
of this step.
 voidSetEventStore(TGo4EventStoreParameter* kind)
          Sets the event storee parameter which is used on intitialization
of this step.
 voidSetInputEvent(TGo4EventElement* in)
          Sets reference to external input event.
 voidSetPreviousStep(TGo4AnalysisStep* pre)
          Sets reference to previous analysis step.
 voidSetProcessEnabled(Bool_t on)
          Enables or disables the event processing.
 voidSetSourceEnabled(Bool_t on)
          Enables or disables the event source.
 voidSetStatus(TGo4AnalysisStepStatus* state)
          Set all analysis step parameters to that of given status object.
 voidSetStatusMessage(const char * txt)
          Set Status message of last Process() call.
 voidSetStoreEnabled(Bool_t on)
          Enables or disables the event store.
 Int_tStore(TGo4Parameter* cali)
          Saves a parameter correllated with the current event into the storage.
 Int_tStore(TGo4Condition* conny)
          Saves a condition correllated with the current event into the storage.
 Int_tStore(TGo4Fitter* fitter)
          Saves a fitter correllated with the current event into the storage.
 Int_tStore(TFolder* fold)
          Saves a folder correllated with the current event into the storage.
 voidStoreCalibration()
          Store the current calibration object of the
event processor into the event store instance.

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

fbErrorStopEnabled

private Bool_t fbErrorStopEnabled
Operation mode switch. If true, the analysis
step process method will stop the analysis
if the event source returns an error code.
Otherwise, the event source may be reset then
and the analysis continues from start.

fbErrorStopped

private Bool_t fbErrorStopped
True if the analysis step has been stopped after input error.

fbProcessEnabled

private Bool_t fbProcessEnabled
Enables processing of the input event. If true,
Process method produces an output event from the input; otherwise
we do not fill the output. Useful if event source of this step shall be
used to pass the input event to another analysis step. If process is
disabled, also the eventstore is disabled.

fbSourceEnabled

private Bool_t fbSourceEnabled
Enables event source.If true,
the event source is used to get the input event; otherwise
we use the output of the previous step.

fbSourceImplemented

private Bool_t fbSourceImplemented
Flag for the previous analysis step. If true, the event source instance exists, i.e. a file may be
open. Usage is optional so far.

fbStoreEnabled

private Bool_t fbStoreEnabled
Enables event store. If true,
the event store is used as output; otherwise
we pass the output to the next step.

fbStoreImplemented

private Bool_t fbStoreImplemented
Flag for the subsequent analysis step.
If true, the event store instance exists, i.e. a file may be open.

fcBuffer

private TString fcBuffer
Buffer string for text output

fcStatusMessage

private TString fcStatusMessage
Most recent status message. May be delivered by eventsource or eventstore.

fiProcessStatus

private Int_t fiProcessStatus
Contains current analysis step status value. To be checked by framework after Process().

fxEventFactory

private TGo4EventFactory* fxEventFactory
The abstract factory implementation which provides the event classes.
supplierCardinality 1
link aggregationByValue

fxEventProcessor

private TGo4EventProcessor* fxEventProcessor
The processing class which works on the input event and
fills the output event.
supplierCardinality 1
link aggregation

fxEventSource

private TGo4EventSource* fxEventSource
The source of the input events. Can be a remote event server, or
a root file, or anything else.
supplierCardinality 1
link aggregation

fxEventStore

private TGo4EventStore* fxEventStore
The storage instance for the unpacked events (detector) structures.
supplierCardinality 1
link aggregation

fxInputEvent

private TGo4EventElement* fxInputEvent
points to the last input event delivered from the event source
supplierCardinality 1
link aggregation

fxOutputEvent

private TGo4EventElement* fxOutputEvent
The unpacked event (detector) structure that has been filled by the
analysis step .
supplierCardinality 1
link aggregation

fxOwner

private TGo4Analysis* fxOwner
Points back to the analysis wich keeps this step.

fxPrevious

private TGo4AnalysisStep* fxPrevious
Points to the previous analysis step. Useful to check
the corresponding input and output event types, and the event source state.

fxProcessorType

private TGo4EventProcessorParameter* fxProcessorType
Parameter object of next event processor to be activated. Is used by
eventfactory as parameter for factory method. Meaning
is defined in actual user event factory.
link aggregation

fxSourceType

private TGo4EventSourceParameter* fxSourceType
Parameter object of next event source to be activated. Is used by
eventfactory as parameter for factory method. Meaning
is defined in actual user event factory.
link aggregation

fxStoreType

private TGo4EventStoreParameter* fxStoreType
Parameter object of next event storage to be activated. Is used by
eventfactory as parameter for factory method. Meaning
is defined in actual user event factory.
link aggregation
Constructor Detail

TGo4AnalysisStep

public TGo4AnalysisStep(const char * name, TGo4EventFactory* eventfactory, TGo4EventSourceParameter* sourcetype, TGo4EventStoreParameter* storetype, TGo4EventProcessorParameter* processortype)
Normal ctor. Note: factory and parameter objects are adopted by analysis step,
i.e. they are deleted by dtor.

TGo4AnalysisStep

public TGo4AnalysisStep()
default ctor for streamer.
Method Detail

~TGo4AnalysisStep

public virtual synchronized ~TGo4AnalysisStep()
Method Detail

Close

public void Close()
Closes the analysis step. Closes all files and connections
and frees memory.

CloseEventProcessor

public void CloseEventProcessor()
Unregister and close eventprocessor, if existing.

CloseEventSource

public void CloseEventSource()
Unregister and close eventsource, if existing.

CloseEventStore

public void CloseEventStore()
Unregister and close eventstore, if existing.

CreateStatus

public TGo4AnalysisStepStatus* CreateStatus()
Create a copy of the analysis step internal state. To be sent to the Display.

DeleteInputEvent

public void DeleteInputEvent()
Delete input event object

DeleteOutputEvent

public void DeleteOutputEvent()
Delete input event object

GetEventProcessor

public TGo4EventProcessor* GetEventProcessor()
Access to the event processor.
Useful if processor has own data to be displayed, e.g. histograms.

GetEventStoreName

public const const char * GetEventStoreName()
Access to name of currently active event store. Used to avoid collisions between
store and source (files) of subsequent steps. Returns 0 pointer if there is no store implemented.

GetInputEvent

public TGo4EventElement* GetInputEvent()
Access to the input event of this step. Useful to
pass incoming event from event source to a
subsequent step or to user event function,
without processing it.

GetOutputEvent

public TGo4EventElement* GetOutputEvent()
Access to the output event which has been filled last. Is used to
pass the output to the next analysis step, or to the main analysis
user event function.

GetPreviousStep

public TGo4AnalysisStep* GetPreviousStep()
Get previous analysis step. Returns 0 if there is none.

GetProcessStatus

public Int_t GetProcessStatus()
Status of the last event.

GetStatusMessage

public const const char * GetStatusMessage()
Status message of last Process() call.

InitEventClasses

public virtual void InitEventClasses()
Initialization of the event class plugins which are delivered from
the user defined event factory. Parameters are ids for the implementation kind

IsErrorStopEnabled

public Bool_t IsErrorStopEnabled()
True if analsis step allows stop on error.

IsErrorStopped

public Bool_t IsErrorStopped()
True if analsis step has been stopped on error.

IsMatchingPrevious

public Bool_t IsMatchingPrevious()
Check if an analysis step is matching as a previous step to this
step. Will compare by the classnames of input and output events
as created by the event factory. To be used at the end of
InitEventClasses method of analysis to ensure that chain of
analysis steps would be working.

IsProcessEnabled

public Bool_t IsProcessEnabled()

IsSourceEnabled

public Bool_t IsSourceEnabled()

IsSourceImplemented

public Bool_t IsSourceImplemented()

IsStoreEnabled

public Bool_t IsStoreEnabled()

IsStoreImplemented

public Bool_t IsStoreImplemented()

NewEventProcessor

public void NewEventProcessor(TGo4EventProcessorParameter* kind)
For lazy initialization of event processor. Uses
the CreateEventProcessor method of the specialized event factory.
Is called from initeventclasses in the timer initialization of
the analysis, or may called on the fly to switch the
processing algorithm. Parameter is passed to
factory method for user specification of processor.

NewEventSource

public void NewEventSource(TGo4EventSourceParameter* kind)
For lazy initialization of event source. Uses
the CreateEventSource method of the specialized event factory.
Is called from init eventclasse in the timer initialization of
the analysis, or may called on the fly to switch the
source from event server to file. Parameter is passed to
factory method for user specification of source.

NewEventStore

public void NewEventStore(TGo4EventStoreParameter* kind)
For lazy initialization of event store. Uses
the CreateEventStore method of the specialized event factory.
Is called from initeventclasses in the timer initialization of
the analysis, or may called on the fly to switch the
store. Parameter is passed to
factory method for user specification of store.

NewInputEvent

public void NewInputEvent()
create input event object

NewOutputEvent

public void NewOutputEvent()
create input event object

Process

public void Process()
The main analysis action which is invoked by the external
go4 analysis. Reads input event from source (if first step),
fills the output event by means of the event processor, and
stores the output event (if last step).

ResetErrorStop

public void ResetErrorStop()
Reset the stopped-after-error state of this
analysis step object. May be used to restart
analysis after clearing the situation.

SetErrorStopEnabled

public void SetErrorStopEnabled(Bool_t on)
Enables or disables the stop-on-error mode.

SetEventProcessor

public void SetEventProcessor(TGo4EventProcessorParameter* kind)
Sets the event processor parameter which is used on intitialization
of this step. The event processor will not yet be created;
Creation is done by InitEventClasses() method, or by calling
the NewEventProcessor() method on the fly.

SetEventSource

public void SetEventSource(TGo4EventSourceParameter* kind)
Sets the event source parameter which is used on intitialization
of this step. The event source will not yet be created;
Creation is done by InitEventClasses() method, or by calling
the NewEventSource() method on the fly.

SetEventStore

public void SetEventStore(TGo4EventStoreParameter* kind)
Sets the event storee parameter which is used on intitialization
of this step. The event store will not yet be created;
Creation is done by InitEventClasses() method, or by calling
the NewEventStore() method on the fly.

SetInputEvent

public void SetInputEvent(TGo4EventElement* in)
Sets reference to external input event. The processor will use
this input event at the next call of process. I this analysis
step is the first in the chain, the input event will be taken from
the event source of this step.

SetPreviousStep

public void SetPreviousStep(TGo4AnalysisStep* pre)
Sets reference to previous analysis step.

SetProcessEnabled

public void SetProcessEnabled(Bool_t on)
Enables or disables the event processing.

SetSourceEnabled

public void SetSourceEnabled(Bool_t on)
Enables or disables the event source.

SetStatus

public void SetStatus(TGo4AnalysisStepStatus* state)
Set all analysis step parameters to that of given status object.

SetStatusMessage

public void SetStatusMessage(const char * txt)
Set Status message of last Process() call.

SetStoreEnabled

public void SetStoreEnabled(Bool_t on)
Enables or disables the event store.

Store

public Int_t Store(TGo4Parameter* cali)
Saves a parameter correllated with the current event into the storage.

Store

public Int_t Store(TGo4Condition* conny)
Saves a condition correllated with the current event into the storage.

Store

public Int_t Store(TGo4Fitter* fitter)
Saves a fitter correllated with the current event into the storage.

Store

public Int_t Store(TFolder* fold)
Saves a folder correllated with the current event into the storage.

StoreCalibration

public void StoreCalibration()
Store the current calibration object of the
event processor into the event store instance.

Association Links

to Class TGo4Analysis

Points back to the analysis wich keeps this step.

to Class TGo4AnalysisStep

Points to the previous analysis step. Useful to check
the corresponding input and output event types, and the event source state.

to Class TGo4EventFactory

The abstract factory implementation which provides the event classes.

Supplier Cardinality 1
Type aggregationByValue

to Class TGo4EventStore

The storage instance for the unpacked events (detector) structures.

Supplier Cardinality 1
Type aggregation

to Class TGo4EventSource

The source of the input events. Can be a remote event server, or
a root file, or anything else.

Supplier Cardinality 1
Type aggregation

to Class TGo4EventProcessor

The processing class which works on the input event and
fills the output event.

Supplier Cardinality 1
Type aggregation

to Class TGo4EventElement

points to the last input event delivered from the event source

Supplier Cardinality 1
Type aggregation

to Class TGo4EventElement

The unpacked event (detector) structure that has been filled by the
analysis step .

Supplier Cardinality 1
Type aggregation

to Class TGo4EventSourceParameter

Parameter object of next event source to be activated. Is used by
eventfactory as parameter for factory method. Meaning
is defined in actual user event factory.

Type aggregation

to Class TGo4EventStoreParameter

Parameter object of next event storage to be activated. Is used by
eventfactory as parameter for factory method. Meaning
is defined in actual user event factory.

Type aggregation

to Class TGo4EventProcessorParameter

Parameter object of next event processor to be activated. Is used by
eventfactory as parameter for factory method. Meaning
is defined in actual user event factory.

Type aggregation

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

30-06-2005