SFrame 3.6
SCycleConfig Class Reference

Class describing the entire configuration of a cycle. More...

#include <core/include/SCycleConfig.h>

Collaboration diagram for SCycleConfig:

List of all members.

Public Types

enum  RunMode { LOCAL, PROOF }
 Run mode enumeration. More...
typedef std::vector< std::pair
< std::string, std::string > > 
property_type
 Definition of the type of the properties.
typedef std::vector< SInputDataid_type
 Definition of the type of the input data.

Public Member Functions

 SCycleConfig (const char *name="SCycleConfig")
 Simple constructor with a name.
const TString & GetCycleName () const
 Get the name of the cycle holding this configuration.
void SetCycleName (const TString &name)
 Set the name of the cycle holding this configuration.
RunMode GetRunMode () const
 Get the configured running mode.
void SetRunMode (RunMode mode)
 Set the configured running mode.
const TString & GetProofServer () const
 Get the name of the PROOF server.
void SetProofServer (const TString &server)
 Set the name of the PROOF server.
const Int_t & GetProofNodes () const
 Get the number of parallel nodes.
void SetProofNodes (const Int_t nodes)
 Set the number of parallel nodes.
const TString & GetProofWorkDir () const
 Get the path to the PROOF working directory.
void SetProofWorkDir (const TString &workdir)
 Set the path to the PROOF working directory.
const property_typeGetProperties () const
 Get the user defined properties.
void SetProperty (const std::string &name, const std::string &value)
 Set one user defined property.
const id_typeGetInputData () const
 Get all input data objects.
void AddInputData (const SInputData &id)
 Add one input data object.
void SetTargetLumi (Double_t targetlumi)
 Set the target normalisation luminosity.
Double_t GetTargetLumi () const
 Get the target normalisation luminosity.
void SetOutputDirectory (const TString &outDir)
 Set the directory where the output file will be stored.
const TString & GetOutputDirectory () const
 Get the directory where the output file will be stored.
void SetPostFix (const TString &postFix)
 Set the post-fix that should be added to the output file name.
const TString & GetPostFix () const
 Get the post-fix that should be added to the output file name.
void SetMsgLevel (SMsgType level)
 Set the minimum printed message level.
SMsgType GetMsgLevel () const
 Get the minimum printed message level.
void SetUseTreeCache (Bool_t status=kTRUE)
 Set whether TTreeCache should be used.
Bool_t GetUseTreeCache () const
 Get whether TTreeCache should be used.
void SetCacheSize (Long64_t size)
 Set the memory size to be used by TTreeCache.
Long64_t GetCacheSize () const
 Gett the memory size to be used by TTreeCache.
void SetCacheLearnEntries (Int_t entries)
 Set how many events should be used to learn the access pattern.
Int_t GetCacheLearnEntries () const
 Get how many events should be used to learn the access pattern.
void SetProcessOnlyLocal (Bool_t flag)
 Set whether the PROOF nodes are allowed to read each other's files.
Bool_t GetProcessOnlyLocal () const
 Get whether the PROOF nodes are allowed to read each other's files.
void PrintConfig () const
 Print the configuration to the screen.
void ArrangeInputData () throw ( SError )
 Re-arrange the input data objects.
void ValidateInput ()
 Fill the input data objects with information from the files.
TString GetStringConfig (const SInputData *id=0) const
 Get the cycle configuration as a TString object.
void ClearConfig ()
 Clear the configuration.

Detailed Description

Class describing the entire configuration of a cycle.

In a PROOF analysis the analysis cycles exist in multiple instances. To make their (coherent) configuration easier, they all get their setup from a single object of this type. SCycleController makes sure that the configuration is passed correctly to all cycle instances.

Version:
Revision:
331

Definition at line 42 of file SCycleConfig.h.


Member Typedef Documentation

typedef std::vector< SInputData > SCycleConfig::id_type

Definition of the type of the input data.

Definition at line 66 of file SCycleConfig.h.

typedef std::vector< std::pair< std::string, std::string > > SCycleConfig::property_type

Definition of the type of the properties.

Definition at line 64 of file SCycleConfig.h.


Member Enumeration Documentation

Run mode enumeration.

This enumeration defines how the analysis cycle can be run. At the moment local running and running the cycle on a PROOF cluster are possible.

Enumerator:
LOCAL 

Run the analysis cycle locally.

PROOF 

Run the analysis cycle on a PROOF cluster.

Definition at line 59 of file SCycleConfig.h.


Constructor & Destructor Documentation

SCycleConfig::SCycleConfig ( const char *  name = "SCycleConfig")

Simple constructor with a name.

Definition at line 21 of file SCycleConfig.cxx.


Member Function Documentation

void SCycleConfig::AddInputData ( const SInputData id)

Add one input data object.

Definition at line 103 of file SCycleConfig.cxx.

void SCycleConfig::ArrangeInputData ( ) throw ( SError )

Re-arrange the input data objects.

After the re-arranging the objects with the same type will end up beside each other.

Definition at line 229 of file SCycleConfig.cxx.

References SLogger::endmsg(), SError::StopExecution, and WARNING.

Referenced by SCycleController::ExecuteNextCycle().

void SCycleConfig::ClearConfig ( )

Clear the configuration.

Definition at line 398 of file SCycleConfig.cxx.

References INFO, and LOCAL.

Int_t SCycleConfig::GetCacheLearnEntries ( ) const

Get how many events should be used to learn the access pattern.

Definition at line 170 of file SCycleConfig.cxx.

Referenced by SCycleBaseExec::Notify().

Long64_t SCycleConfig::GetCacheSize ( ) const

Gett the memory size to be used by TTreeCache.

Definition at line 159 of file SCycleConfig.cxx.

Referenced by SCycleController::ExecuteNextCycle().

const TString & SCycleConfig::GetCycleName ( ) const

Get the name of the cycle holding this configuration.

Definition at line 32 of file SCycleConfig.cxx.

const SCycleConfig::id_type & SCycleConfig::GetInputData ( ) const

Get all input data objects.

Definition at line 98 of file SCycleConfig.cxx.

Referenced by SCycleBaseNTuple::CalculateWeight(), and SCycleController::ExecuteNextCycle().

SMsgType SCycleConfig::GetMsgLevel ( ) const

Get the minimum printed message level.

Definition at line 137 of file SCycleConfig.cxx.

const TString & SCycleConfig::GetOutputDirectory ( ) const

Get the directory where the output file will be stored.

Definition at line 115 of file SCycleConfig.cxx.

Referenced by SCycleController::ExecuteNextCycle().

const TString & SCycleConfig::GetPostFix ( ) const

Get the post-fix that should be added to the output file name.

Definition at line 126 of file SCycleConfig.cxx.

Referenced by SCycleController::ExecuteNextCycle().

Bool_t SCycleConfig::GetProcessOnlyLocal ( ) const

Get whether the PROOF nodes are allowed to read each other's files.

Definition at line 181 of file SCycleConfig.cxx.

Referenced by SCycleController::ExecuteNextCycle().

const Int_t & SCycleConfig::GetProofNodes ( ) const

Get the number of parallel nodes.

Definition at line 65 of file SCycleConfig.cxx.

Referenced by SCycleController::ExecuteNextCycle().

const TString & SCycleConfig::GetProofServer ( ) const

Get the name of the PROOF server.

Definition at line 54 of file SCycleConfig.cxx.

Referenced by SCycleController::ExecuteNextCycle().

const TString & SCycleConfig::GetProofWorkDir ( ) const

Get the path to the PROOF working directory.

Definition at line 76 of file SCycleConfig.cxx.

Referenced by SCycleController::ExecuteNextCycle().

const SCycleConfig::property_type & SCycleConfig::GetProperties ( ) const

Get the user defined properties.

Definition at line 87 of file SCycleConfig.cxx.

Referenced by SCycleBaseConfig::SetConfig().

SCycleConfig::RunMode SCycleConfig::GetRunMode ( ) const

Get the configured running mode.

Definition at line 43 of file SCycleConfig.cxx.

Referenced by SCycleController::ExecuteNextCycle(), and SCycleBaseExec::Process().

TString SCycleConfig::GetStringConfig ( const SInputData id = 0) const

Get the cycle configuration as a TString object.

This function makes a nice string representation of the cycle's configuration. This makes it easy to archive the configuration into the output file of the cycle.

Parameters:
idIf specified only the configuration of this one ID is added to the string. If it's left as a null pointer, all IDs are added.
Returns:
The string that should be put into the output file of the cycle for future reference

Definition at line 299 of file SCycleConfig.cxx.

References SInputData::GetStringConfig(), LOCAL, and PROOF.

Referenced by SCycleController::ExecuteNextCycle().

Double_t SCycleConfig::GetTargetLumi ( ) const [inline]

Get the target normalisation luminosity.

See also:
SCycleBaseConfig::SetTargetLumi

Definition at line 113 of file SCycleConfig.h.

Referenced by SCycleBaseNTuple::CalculateWeight().

Bool_t SCycleConfig::GetUseTreeCache ( ) const

Get whether TTreeCache should be used.

Definition at line 148 of file SCycleConfig.cxx.

Referenced by SCycleController::ExecuteNextCycle().

void SCycleConfig::PrintConfig ( ) const

Print the configuration to the screen.

Definition at line 186 of file SCycleConfig.cxx.

References SLogger::endmsg(), INFO, LOCAL, and PROOF.

void SCycleConfig::SetCacheLearnEntries ( Int_t  entries)

Set how many events should be used to learn the access pattern.

Definition at line 164 of file SCycleConfig.cxx.

void SCycleConfig::SetCacheSize ( Long64_t  size)

Set the memory size to be used by TTreeCache.

Definition at line 153 of file SCycleConfig.cxx.

void SCycleConfig::SetCycleName ( const TString &  name)

Set the name of the cycle holding this configuration.

Definition at line 37 of file SCycleConfig.cxx.

Referenced by SCycleController::ExecuteNextCycle().

void SCycleConfig::SetMsgLevel ( SMsgType  level)

Set the minimum printed message level.

Definition at line 131 of file SCycleConfig.cxx.

Referenced by SCycleController::ExecuteNextCycle().

void SCycleConfig::SetOutputDirectory ( const TString &  outDir)

Set the directory where the output file will be stored.

Definition at line 109 of file SCycleConfig.cxx.

void SCycleConfig::SetPostFix ( const TString &  postFix)

Set the post-fix that should be added to the output file name.

Definition at line 120 of file SCycleConfig.cxx.

void SCycleConfig::SetProcessOnlyLocal ( Bool_t  flag)

Set whether the PROOF nodes are allowed to read each other's files.

Definition at line 175 of file SCycleConfig.cxx.

void SCycleConfig::SetProofNodes ( const Int_t  nodes)

Set the number of parallel nodes.

Definition at line 70 of file SCycleConfig.cxx.

void SCycleConfig::SetProofServer ( const TString &  server)

Set the name of the PROOF server.

Definition at line 59 of file SCycleConfig.cxx.

void SCycleConfig::SetProofWorkDir ( const TString &  workdir)

Set the path to the PROOF working directory.

Definition at line 81 of file SCycleConfig.cxx.

void SCycleConfig::SetProperty ( const std::string &  name,
const std::string &  value 
)

Set one user defined property.

Definition at line 92 of file SCycleConfig.cxx.

void SCycleConfig::SetRunMode ( SCycleConfig::RunMode  mode)

Set the configured running mode.

Definition at line 48 of file SCycleConfig.cxx.

void SCycleConfig::SetTargetLumi ( Double_t  targetlumi) [inline]

Set the target normalisation luminosity.

The total integrated luminosity to which all plots should be normalised is specified in the XML config file. But since this configuration is not accessible to the Initialize method directly, it has to be set by SCycleController using this function.

See also:
SCycleBaseConfig::GetTargetLumi

Definition at line 108 of file SCycleConfig.h.

void SCycleConfig::SetUseTreeCache ( Bool_t  status = kTRUE)

Set whether TTreeCache should be used.

Definition at line 142 of file SCycleConfig.cxx.

void SCycleConfig::ValidateInput ( )

Fill the input data objects with information from the files.

Some information about the input is gathered automatically from the input files, and not from the XML configuration. This information is needed for the correct event weight calculation. This function should be called by SCycleController...

Definition at line 280 of file SCycleConfig.cxx.

Referenced by SCycleController::ExecuteNextCycle().


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