SFrame 3.6
SCycleController Class Reference

Class controlling SFrame analyses. More...

#include <core/include/SCycleController.h>

Collaboration diagram for SCycleController:

List of all members.

Public Member Functions

 SCycleController (const TString &xmlConfigFile)
 Constructor specifying the configuration file.
virtual ~SCycleController ()
 Default destructor.
virtual void Initialize () throw ( SError )
 Initialise the analysis from the configuration file.
virtual void ExecuteAllCycles () throw ( SError )
 Execute the analysis loop for all configured cycles.
virtual void ExecuteNextCycle () throw ( SError )
 Execute the analysis loop for the cycle next in line.
virtual void SetConfig (const TString &xmlConfigFile)
 Set the name of the configuration file.
void AddAnalysisCycle (ISCycleBase *cycleAlg)
 Add one analysis cycle to the end of all existing cycles.
UInt_t GetCurCycle ()
 Get the index of the current cycle.

Detailed Description

Class controlling SFrame analyses.

This is the main class that should be instantiated by the user in an analysis. It takes care of reading the analysis's configuration from an XML file, creating, configuring and running all the analysis "cycles".

It is instantiated and configured correctly in the sframe_main executable, so the user should probably not care about it too much.

Version:
Revision:
331

Definition at line 45 of file SCycleController.h.


Constructor & Destructor Documentation

SCycleController::SCycleController ( const TString &  xmlConfigFile)

Constructor specifying the configuration file.

The user has to specify a configuration file already at the construction of the object. This configuration file will be used later in SCycleController::Initialize to perform the configuration of the analysis job.

Parameters:
xmlConfigFileThe name of the configuration file

Definition at line 62 of file SCycleController.cxx.

SCycleController::~SCycleController ( ) [virtual]

Default destructor.

This destructor actually does something. (Yay!) It deletes all the analysis cycles that have been created from the configuration in the XML file, and closes the connection to the PROOF server.

Definition at line 74 of file SCycleController.cxx.


Member Function Documentation

void SCycleController::AddAnalysisCycle ( ISCycleBase cycleAlg)

Add one analysis cycle to the end of all existing cycles.

This function could be used to add a cycle created in the main executable by hand, but it's not being used. Instead all the cycles are created by this class internally according to the configuration in the XML file.

Parameters:
cycleAlgThe cycle that should be added

Definition at line 816 of file SCycleController.cxx.

Referenced by Initialize().

void SCycleController::ExecuteAllCycles ( ) throw ( SError ) [virtual]

Execute the analysis loop for all configured cycles.

This function runs all the analysis cycles that were configured one after another. The main program should call this after SCycleController::Initialize.

It actually uses SCycleController::ExecuteNextCycle to execute each of the cycles.

See also:
SCycleController::ExecuteNextCycle

Definition at line 319 of file SCycleController.cxx.

References SLogger::endmsg(), ExecuteNextCycle(), INFO, and SError::StopExecution.

Here is the call graph for this function:

void SCycleController::ExecuteNextCycle ( ) throw ( SError ) [virtual]

Execute the analysis loop for the cycle next in line.

This function is responsible for calling the functions of the current cycle in line to execute its analysis. It also measures the time needed to execute the cycles, and prints it as an info message after the analysis has finished.

Definition at line 344 of file SCycleController.cxx.

References SCycleConfig::ArrangeInputData(), SCycleBaseExec::BeginCycle(), SFrame::CurrentInputDataName, SFrame::CycleConfigName, SCycleBaseExec::EndCycle(), SLogger::endmsg(), STree::EVENT_TREE, SCycleConfig::GetCacheSize(), ISCycleBaseConfig::GetConfig(), ISCycleBaseConfig::GetConfigurationObjects(), SInputData::GetEventsTotal(), SCycleConfig::GetInputData(), SCycleConfig::GetOutputDirectory(), SCycleConfig::GetPostFix(), SCycleStatistics::GetProcessedEvents(), SCycleConfig::GetProcessOnlyLocal(), SCycleConfig::GetProofNodes(), SCycleConfig::GetProofServer(), SCycleConfig::GetProofWorkDir(), SCycleConfig::GetRunMode(), SCycleStatistics::GetSkippedEvents(), SCycleConfig::GetStringConfig(), SInputData::GetType(), SCycleConfig::GetUseTreeCache(), SInputData::GetVersion(), INFO, STree::INPUT_TREE, SProofManager::Instance(), SLogWriter::Instance(), SProofManager::IsConfigured(), SCycleConfig::LOCAL, SParLocator::Locate(), SCycleBaseExec::Process(), SCycleConfig::PROOF, SFrame::ProofOutputName, REPORT_ERROR, REPORT_VERBOSE, SFrame::RunStatisticsName, ISCycleBaseConfig::SetConfig(), SProofManager::SetConfigured(), SCycleConfig::SetCycleName(), SCycleConfig::SetMsgLevel(), SError::SkipCycle, SError::StopExecution, SCycleConfig::ValidateInput(), and WARNING.

Referenced by ExecuteAllCycles().

Here is the call graph for this function:

UInt_t SCycleController::GetCurCycle ( ) [inline]

Get the index of the current cycle.

Definition at line 71 of file SCycleController.h.

void SCycleController::Initialize ( ) throw ( SError ) [virtual]

Initialise the analysis from the configuration file.

This is the first function that should be called for the object after it is created. It reads in the configuration of the analysis from the configuration file specified earlier, creates and configures all the analysis cycles defined in the configuration.

Definition at line 92 of file SCycleController.cxx.

References AddAnalysisCycle(), ALWAYS, DEBUG, SLogger::endmsg(), ERROR, FATAL, INFO, ISCycleBaseConfig::Initialize(), SLogWriter::Instance(), REPORT_ERROR, REPORT_VERBOSE, SError::request(), SLogWriter::SetMinType(), SError::SkipCycle, SError::StopExecution, VERBOSE, WARNING, and SError::what().

Here is the call graph for this function:

virtual void SCycleController::SetConfig ( const TString &  xmlConfigFile) [inline, virtual]

Set the name of the configuration file.

All configuration of the analysis is done in a single XML file. The file name from which this configuration should be read is specified with this function.

Definition at line 65 of file SCycleController.h.


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