SFrame 3.6
SToolBaseT< Type > Class Template Reference

Base class for tools that can be used during the analysis. More...

#include <plug-ins/include/SToolBase.h>

Collaboration diagram for SToolBaseT< Type >:

List of all members.

Public Types

typedef Type ParentType
 Declaration of the used type.

Public Member Functions

 SToolBaseT ()
 Defaul Constructor.
 SToolBaseT (ParentType *parent)
 Constructor specifying the parent of the tool.
virtual ~SToolBaseT ()
 Destructor (needed to make vtable happy)
ParentTypeGetParent () const
 Get a pointer to the parent cycle of this tool.
void SetParent (ParentType *parent)
 Get a pointer to the parent cycle of this tool.

Protected Member Functions

template<class T >
T * Book (const T &histo, const char *directory=0) throw ( SError )
 Function placing a ROOT object in the output file.
template<class T >
T * Retrieve (const char *name, const char *directory=0, Bool_t outputOnly=kFALSE) throw ( SError )
 Function searching for a ROOT object in the output file.
template<class T >
std::vector< T * > RetrieveAll (const char *name, const char *directory=0) throw ( SError )
 Function retrieving all ROOT objects of this name from the input file.
void WriteObj (const TObject &obj, const char *directory=0) throw ( SError )
 Function for persistifying a ROOT object to the output.
TH1 * Hist (const char *name, const char *dir=0)
 Function searching for 1-dimensional histograms in the output file.
template<typename T >
bool ConnectVariable (const char *treeName, const char *branchName, T &variable) throw ( SError )
 Connect an input variable.
template<typename T >
TBranch * DeclareVariable (T &obj, const char *name, const char *treeName=0) throw ( SError )
 Declare an output variable.
virtual TTree * GetMetadataTree (const char *name) const throw ( SError )
 Access one of the metadata trees.
virtual TTree * GetInputMetadataTree (const char *name) const throw ( SError )
 Access one of the input metadata trees.
virtual TTree * GetOutputMetadataTree (const char *name) const throw ( SError )
 Access one of the output metadata trees.
virtual TTree * GetInputTree (const char *treeName) const throw ( SError )
 Access one of the input trees.
virtual TTree * GetOutputTree (const char *treeName) const throw ( SError )
 Access one of the output trees.
template<typename T >
void DeclareProperty (const std::string &name, T &value)
 Declare a property.
void AddConfigObject (TObject *object)
 Add a configuration object that should be available on the PROOF nodes.
TObject * GetConfigObject (const char *name) const
 Get a configuration object on the PROOF nodes.
void SetLogName (const char *name)
 Set the name under which the tool's log messages should appear.

Protected Attributes

SLogger m_logger
 Logger object for the tool.

Friends

class SInputVariables< SToolBaseT< SCycleBase > >
 To enable the usage of the protected functions for SInputVariables.
class SOutputVariables< SToolBaseT< SCycleBase > >
 To enable the usage of the protected functions for SOutputVariables.
class SToolBaseT< SToolBaseT< SCycleBase > >
 To enable the instantiation of SToolBaseT< SToolBase > tools.

Detailed Description

template<class Type>
class SToolBaseT< Type >

Base class for tools that can be used during the analysis.

The idea is that people will probably want to make their analysis code modular by breaking it into many classes. To make it easy to do common "SFrame tasks" in these classes (which are not cycles themselves), one can use this base class. It provides much of the same convenience functionality that SCycleBase does.

Version:
Revision:
275

Definition at line 40 of file SToolBase.h.


Member Typedef Documentation

template<class Type>
typedef Type SToolBaseT< Type >::ParentType

Declaration of the used type.

Definition at line 51 of file SToolBase.h.


Constructor & Destructor Documentation

template<class Type >
SToolBaseT< Type >::SToolBaseT ( )

Defaul Constructor.

Definition at line 18 of file SToolBase.icc.

template<class Type >
SToolBaseT< Type >::SToolBaseT ( ParentType parent)

Constructor specifying the parent of the tool.

Definition at line 24 of file SToolBase.icc.

template<class Type>
virtual SToolBaseT< Type >::~SToolBaseT ( ) [inline, virtual]

Destructor (needed to make vtable happy)

Definition at line 58 of file SToolBase.h.


Member Function Documentation

template<class Type >
void SToolBaseT< Type >::AddConfigObject ( TObject *  object) [protected]

Add a configuration object that should be available on the PROOF nodes.

Definition at line 142 of file SToolBase.icc.

References SToolBaseT< Type >::GetParent().

template<class Type >
template<class T >
T * SToolBaseT< Type >::Book ( const T &  histo,
const char *  directory = 0 
) throw ( SError ) [protected]

Function placing a ROOT object in the output file.

Definition at line 51 of file SToolBase.icc.

References SToolBaseT< Type >::GetParent().

template<class Type >
template<typename T >
bool SToolBaseT< Type >::ConnectVariable ( const char *  treeName,
const char *  branchName,
T &  variable 
) throw ( SError ) [protected]

Connect an input variable.

Definition at line 89 of file SToolBase.icc.

References SToolBaseT< Type >::GetParent().

template<class Type >
template<typename T >
void SToolBaseT< Type >::DeclareProperty ( const std::string &  name,
T &  value 
) [protected]

Declare a property.

Definition at line 135 of file SToolBase.icc.

References SToolBaseT< Type >::GetParent().

template<class Type >
template<typename T >
TBranch * SToolBaseT< Type >::DeclareVariable ( T &  obj,
const char *  name,
const char *  treeName = 0 
) throw ( SError ) [protected]

Declare an output variable.

Definition at line 97 of file SToolBase.icc.

References SToolBaseT< Type >::GetParent().

template<class Type >
TObject * SToolBaseT< Type >::GetConfigObject ( const char *  name) const [protected]

Get a configuration object on the PROOF nodes.

Definition at line 149 of file SToolBase.icc.

References SToolBaseT< Type >::GetParent().

template<class Type >
TTree * SToolBaseT< Type >::GetInputMetadataTree ( const char *  name) const throw ( SError ) [protected, virtual]

Access one of the input metadata trees.

Definition at line 110 of file SToolBase.icc.

References SToolBaseT< Type >::GetParent().

template<class Type >
TTree * SToolBaseT< Type >::GetInputTree ( const char *  treeName) const throw ( SError ) [protected, virtual]

Access one of the input trees.

Definition at line 122 of file SToolBase.icc.

References SToolBaseT< Type >::GetParent().

template<class Type >
TTree * SToolBaseT< Type >::GetMetadataTree ( const char *  name) const throw ( SError ) [protected, virtual]

Access one of the metadata trees.

Definition at line 104 of file SToolBase.icc.

References SToolBaseT< Type >::GetParent().

template<class Type >
TTree * SToolBaseT< Type >::GetOutputMetadataTree ( const char *  name) const throw ( SError ) [protected, virtual]

Access one of the output metadata trees.

Definition at line 116 of file SToolBase.icc.

References SToolBaseT< Type >::GetParent().

template<class Type >
TTree * SToolBaseT< Type >::GetOutputTree ( const char *  treeName) const throw ( SError ) [protected, virtual]

Access one of the output trees.

Definition at line 128 of file SToolBase.icc.

References SToolBaseT< Type >::GetParent().

template<class Type >
TH1 * SToolBaseT< Type >::Hist ( const char *  name,
const char *  dir = 0 
) [protected]

Function searching for 1-dimensional histograms in the output file.

Definition at line 82 of file SToolBase.icc.

References SToolBaseT< Type >::GetParent().

template<class Type >
template<class T >
T * SToolBaseT< Type >::Retrieve ( const char *  name,
const char *  directory = 0,
Bool_t  outputOnly = kFALSE 
) throw ( SError ) [protected]

Function searching for a ROOT object in the output file.

Definition at line 58 of file SToolBase.icc.

References SToolBaseT< Type >::GetParent().

template<class Type >
template<class T >
std::vector< T * > SToolBaseT< Type >::RetrieveAll ( const char *  name,
const char *  directory = 0 
) throw ( SError ) [protected]

Function retrieving all ROOT objects of this name from the input file.

Definition at line 67 of file SToolBase.icc.

References SToolBaseT< Type >::GetParent().

template<class Type >
void SToolBaseT< Type >::SetLogName ( const char *  name) [protected]

Set the name under which the tool's log messages should appear.

Definition at line 155 of file SToolBase.icc.

References SToolBaseT< Type >::m_logger, and SLogger::SetSource().

template<class Type>
void SToolBaseT< Type >::SetParent ( ParentType parent)

Get a pointer to the parent cycle of this tool.

Definition at line 43 of file SToolBase.icc.

template<class Type >
void SToolBaseT< Type >::WriteObj ( const TObject &  obj,
const char *  directory = 0 
) throw ( SError ) [protected]

Function for persistifying a ROOT object to the output.

Definition at line 74 of file SToolBase.icc.

References SToolBaseT< Type >::GetParent().


Friends And Related Function Documentation

template<class Type>
friend class SInputVariables< SToolBaseT< SCycleBase > > [friend]

To enable the usage of the protected functions for SInputVariables.

Definition at line 43 of file SToolBase.h.

template<class Type>
friend class SOutputVariables< SToolBaseT< SCycleBase > > [friend]

To enable the usage of the protected functions for SOutputVariables.

Definition at line 45 of file SToolBase.h.

template<class Type>
friend class SToolBaseT< SToolBaseT< SCycleBase > > [friend]

To enable the instantiation of SToolBaseT< SToolBase > tools.

Definition at line 47 of file SToolBase.h.


Member Data Documentation

template<class Type>
SLogger SToolBaseT< Type >::m_logger [mutable, protected]

Logger object for the tool.

Definition at line 138 of file SToolBase.h.

Referenced by SToolBaseT< Type >::SetLogName().


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