Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

TGo4AnalysisStepManager Class Reference

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

#include <TGo4AnalysisStepManager.h>

List of all members.

Public Methods

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. More...

TGo4AnalysisStepGetAnalysisStep (const char *name)
 Access to certain analysis step by name. More...

Bool_t AddAnalysisStep (TGo4AnalysisStep *next)
 Method for user analysis constructor to setup the list of analyisis steps. More...

 ~TGo4AnalysisStepManager ()
 TGo4AnalysisStepManager ()
 TGo4AnalysisStepManager (const Text_t *name)
void CloseAnalysis ()
 Finish the analysis run and close all event sources/storages. More...

virtual Bool_t InitEventClasses ()
 Initialization of the event class plugins which are delivered from the user defined event factory. More...

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

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

void AutoSave ()
 Save step specific parts. More...

Bool_t SetFirstStep (const Text_t *name)
 Sets analysis step name as first one to be processed in the chain of steps. More...

Bool_t SetLastStep (const Text_t *name)
 Sets analysis step name as last one to be processed in the chain of steps. More...

Bool_t SetStepStorage (const Text_t *name, Bool_t on)
 Enables analysis step of name to write its output event into its event store. More...

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. More...

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. More...

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. More...

Int_t Store (const Text_t *name, TGo4Parameter *obj)
 Write object obj into eventstore of the step specified by name. More...

Int_t Store (const Text_t *name, TGo4Condition *con)
 Write condition con into eventstore of the step specified by name. More...

Int_t Store (const Text_t *name, TGo4Fitter *fit)
 Write fitter fit into eventstore of the step specified by name. More...

Int_t Store (const Text_t *name, TFolder *folder)
 Write folder into eventstore of the step specified by name. More...

TGo4EventElementGetInputEvent (const char *stepname)
 Returns the input event structure of analysis step. More...

TGo4EventElementGetInputEvent (Int_t stepindex)
 Returns the input event structure of analysis step. More...

TGo4EventElementGetOutputEvent (const char *stepname)
 Returns the output event (detector) structure of analysis step. More...

TGo4EventElementGetOutputEvent (Int_t stepindex)
 Returns the output event (detector) structure of analysis step. More...

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

void SetOutputEvent (TGo4EventElement *event)
Int_t IsErrorStopEnabled ()
void SetStepChecking (Bool_t on=kTRUE)
Bool_t IsStepChecking ()

Private Attributes

TObjArray * fxStepList
 Array containing all analysis steps. More...

TMutex * fxStepMutex
 Mutex protecting the analysis step list. More...

TIterator * fxStepIterator
 Iterator used for analysis step list. More...

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

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

Int_t fiCurrentStepIndex
 Index describing the current analysis step. More...

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

TGo4AnalysisStepfxCurrentStep
 Points to the currently active analysis step. More...

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


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 55 of file TGo4AnalysisStepManager.h.


Constructor & Destructor Documentation

TGo4AnalysisStepManager::~TGo4AnalysisStepManager  
 

Definition at line 53 of file TGo4AnalysisStepManager.cxx.

References fxStepIterator, fxStepList, and fxStepMutex.

TGo4AnalysisStepManager::TGo4AnalysisStepManager  
 

Definition at line 29 of file TGo4AnalysisStepManager.cxx.

References fxStepIterator, fxStepList, and fxStepMutex.

TGo4AnalysisStepManager::TGo4AnalysisStepManager const Text_t *    name
 

Definition at line 41 of file TGo4AnalysisStepManager.cxx.

References fxStepIterator, fxStepList, and fxStepMutex.


Member Function Documentation

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 504 of file TGo4AnalysisStepManager.cxx.

References TGo4MainTree::Exists(), fiCurrentStepIndex, fiFirstStepIndex, fiLastStepIndex, fxCurrentStep, fxStepList, TGo4MainTree::Instance(), TGo4AnalysisStep::IsSourceImplemented(), IsStepChecking(), TGo4AnalysisStep::Process(), SetOutputEvent(), TGo4AnalysisStep::SetSourceEnabled(), TGo4AnalysisStep::SetStatusMessage(), TRACE, and TGo4MainTree::Update().

Referenced by TGo4Analysis::ProcessAnalysisSteps().

TGo4AnalysisStep * TGo4AnalysisStepManager::GetAnalysisStep const char *    name
 

Access to certain analysis step by name.

For analysis internal usage.

Definition at line 493 of file TGo4AnalysisStepManager.cxx.

References fxStepList, and TRACE.

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

Bool_t TGo4AnalysisStepManager::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.

Definition at line 445 of file TGo4AnalysisStepManager.cxx.

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

Referenced by TGo4Analysis::AddAnalysisStep().

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 62 of file TGo4AnalysisStepManager.cxx.

References TGo4AnalysisStep::Close(), fxStepIterator, TGo4Analysis::Instance(), TGo4Analysis::Message(), and TRACE.

Referenced by TGo4Analysis::CloseAnalysis().

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 79 of file TGo4AnalysisStepManager.cxx.

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

Referenced by TGo4Analysis::InitEventClasses().

void TGo4AnalysisStepManager::UpdateStatus TGo4AnalysisStatus   state
 

Update step specific part of analysis status object.

Definition at line 542 of file TGo4AnalysisStepManager.cxx.

References TGo4AnalysisStatus::AddStepStatus(), TGo4AnalysisStep::CreateStatus(), fbStepCheckingMode, fiFirstStepIndex, fiLastStepIndex, fxCurrentStep, fxStepIterator, TGo4AnalysisStatus::SetFirstStepIndex(), TGo4AnalysisStatus::SetLastStepIndex(), TGo4AnalysisStatus::SetStepChecking(), and TRACE.

Referenced by TGo4Analysis::UpdateStatus().

void TGo4AnalysisStepManager::SetStatus TGo4AnalysisStatus   state
 

Set step specific part of analysis status object to steplist.

Definition at line 568 of file TGo4AnalysisStepManager.cxx.

References fbStepCheckingMode, fiFirstStepIndex, fiLastStepIndex, fxCurrentStep, fxStepIterator, TGo4AnalysisStatus::GetFirstStepIndex(), TGo4AnalysisStatus::GetLastStepIndex(), TGo4AnalysisStatus::GetStepStatus(), TGo4AnalysisStatus::IsStepChecking(), TGo4AnalysisStep::SetStatus(), and TRACE.

Referenced by TGo4Analysis::SetStatus().

void TGo4AnalysisStepManager::AutoSave  
 

Save step specific parts.

Definition at line 598 of file TGo4AnalysisStepManager.cxx.

References TGo4MainTree::Exists(), fxStepIterator, TGo4MainTree::Instance(), TGo4Analysis::Instance(), TGo4Analysis::Message(), TGo4AnalysisStep::StoreCalibration(), TRACE, and TGo4MainTree::Write().

Referenced by TGo4Analysis::AutoSave().

Bool_t TGo4AnalysisStepManager::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.

Definition at line 147 of file TGo4AnalysisStepManager.cxx.

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

Referenced by TGo4Analysis::SetFirstStep().

Bool_t TGo4AnalysisStepManager::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.

Definition at line 189 of file TGo4AnalysisStepManager.cxx.

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

Referenced by TGo4Analysis::SetLastStep().

Bool_t TGo4AnalysisStepManager::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.

Definition at line 238 of file TGo4AnalysisStepManager.cxx.

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

Referenced by TGo4Analysis::SetStepStorage().

Bool_t TGo4AnalysisStepManager::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.

Definition at line 256 of file TGo4AnalysisStepManager.cxx.

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

Referenced by TGo4Analysis::NewStepStore().

Bool_t TGo4AnalysisStepManager::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.

Definition at line 285 of file TGo4AnalysisStepManager.cxx.

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

Referenced by TGo4Analysis::NewStepSource().

Bool_t TGo4AnalysisStepManager::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.

Definition at line 317 of file TGo4AnalysisStepManager.cxx.

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

Referenced by TGo4Analysis::NewStepProcessor().

Int_t TGo4AnalysisStepManager::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.

Definition at line 336 of file TGo4AnalysisStepManager.cxx.

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

Referenced by TGo4Analysis::StoreCondition(), TGo4Analysis::StoreFitter(), TGo4Analysis::StoreFolder(), and TGo4Analysis::StoreParameter().

Int_t TGo4AnalysisStepManager::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.

Definition at line 345 of file TGo4AnalysisStepManager.cxx.

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

Int_t TGo4AnalysisStepManager::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.

Definition at line 354 of file TGo4AnalysisStepManager.cxx.

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

Int_t TGo4AnalysisStepManager::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.

Definition at line 363 of file TGo4AnalysisStepManager.cxx.

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

TGo4EventElement * TGo4AnalysisStepManager::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.

Definition at line 376 of file TGo4AnalysisStepManager.cxx.

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

Referenced by TGo4Analysis::GetInputEvent().

TGo4EventElement * TGo4AnalysisStepManager::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.

Definition at line 393 of file TGo4AnalysisStepManager.cxx.

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

TGo4EventElement * TGo4AnalysisStepManager::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.

Definition at line 413 of file TGo4AnalysisStepManager.cxx.

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

Referenced by TGo4Analysis::GetOutputEvent().

TGo4EventElement * TGo4AnalysisStepManager::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.

Definition at line 428 of file TGo4AnalysisStepManager.cxx.

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

TGo4EventElement* TGo4AnalysisStepManager::GetOutputEvent   [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 241 of file TGo4AnalysisStepManager.h.

References fxOutputEvent.

void TGo4AnalysisStepManager::SetOutputEvent TGo4EventElement   event [inline]
 

Definition at line 243 of file TGo4AnalysisStepManager.h.

References fxOutputEvent.

Referenced by ProcessAnalysisSteps(), and TGo4Analysis::SetOutputEvent().

Int_t TGo4AnalysisStepManager::IsErrorStopEnabled   [inline]
 

Definition at line 245 of file TGo4AnalysisStepManager.h.

References fxCurrentStep, and TGo4AnalysisStep::IsErrorStopEnabled().

Referenced by TGo4Analysis::IsErrorStopEnabled().

void TGo4AnalysisStepManager::SetStepChecking Bool_t    on = kTRUE [inline]
 

Definition at line 254 of file TGo4AnalysisStepManager.h.

References fbStepCheckingMode.

Referenced by TGo4Analysis::SetStepChecking().

Bool_t TGo4AnalysisStepManager::IsStepChecking   [inline]
 

Definition at line 256 of file TGo4AnalysisStepManager.h.

References fbStepCheckingMode.

Referenced by InitEventClasses(), and ProcessAnalysisSteps().


Member Data Documentation

TObjArray* TGo4AnalysisStepManager::fxStepList [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 264 of file TGo4AnalysisStepManager.h.

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

TMutex* TGo4AnalysisStepManager::fxStepMutex [private]
 

Mutex protecting the analysis step list.

Definition at line 269 of file TGo4AnalysisStepManager.h.

Referenced by TGo4AnalysisStepManager(), and ~TGo4AnalysisStepManager().

TIterator* TGo4AnalysisStepManager::fxStepIterator [private]
 

Iterator used for analysis step list.

Definition at line 274 of file TGo4AnalysisStepManager.h.

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

Int_t TGo4AnalysisStepManager::fiFirstStepIndex [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 281 of file TGo4AnalysisStepManager.h.

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

Int_t TGo4AnalysisStepManager::fiLastStepIndex [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 289 of file TGo4AnalysisStepManager.h.

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

Int_t TGo4AnalysisStepManager::fiCurrentStepIndex [private]
 

Index describing the current analysis step.

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

Definition at line 295 of file TGo4AnalysisStepManager.h.

Referenced by InitEventClasses(), and ProcessAnalysisSteps().

Bool_t TGo4AnalysisStepManager::fbStepCheckingMode [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 303 of file TGo4AnalysisStepManager.h.

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

TGo4AnalysisStep* TGo4AnalysisStepManager::fxCurrentStep [private]
 

Points to the currently active analysis step.

@supplierCardinality 1

Definition at line 307 of file TGo4AnalysisStepManager.h.

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

TGo4EventElement* TGo4AnalysisStepManager::fxOutputEvent [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 313 of file TGo4AnalysisStepManager.h.

Referenced by GetOutputEvent(), and SetOutputEvent().


The documentation for this class was generated from the following files:
Generated on Tue Nov 8 10:56:29 2005 for Go4-v2.10-5 by doxygen1.2.15