| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 2014

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Static Public Member Functions | List of all members
GaudiPython::AlgDecorator Class Reference

`#include <AlgDecorators.h>`

## Public Types
typedef std::vector< const StatEntity * > | Counters
| the actual type of vector of counters
typedef std::vector< IAlgTool * > | Tools
typedef std::vector< IService * > | Services

## Static Public Member Functions
static IAlgTool * | tool_ (const GaudiAlgorithm *alg, const std::string &type, const std::string &name, const IInterface *parent=0, const bool create=true)
| get the tool from GaudiAlgorithm
static IAlgTool * | tool_ (const GaudiAlgorithm *alg, const std::string &typeAndName, const IInterface *parent=0, const bool create=true)
| get the tool from GaudiAlgorithm
static IInterface * | svc_ (const GaudiAlgorithm *alg, const std::string &name, const bool create=false)
| get the service from GaudiAlgorithm
static DataObject * | get_ (const GaudiAlgorithm *alg, const std::string &location, const bool useRootInTes)
| get the data from TES
static bool | exist (const GaudiAlgorithm *alg, const std::string &location, const bool useRootInTes)
| get the data from TES
static size_t | _counters_a_ (const GaudiAlgorithm *alg, std::vector< std::string > &names, Counters &out)
static size_t | _counters_t_ (const GaudiTool *alg, std::vector< std::string > &names, Counters &out)
static size_t | _counters_a_ (const IAlgorithm *alg, std::vector< std::string > &names, Counters &out)
static size_t | _counters_t_ (const IAlgTool *alg, std::vector< std::string > &names, Counters &out)
static const StatEntity * | _counter_a_ (const GaudiAlgorithm *alg, const std::string &name)
static const StatEntity * | _counter_t_ (const GaudiTool *alg, const std::string &name)
static const StatEntity * | _counter_a_ (const IAlgorithm *alg, const std::string &name)
static const StatEntity * | _counter_t_ (const IAlgTool *alg, const std::string &name)
static size_t | _tools_a_ (const GaudiAlgorithm *, Tools &tools)
static size_t | _tools_t_ (const GaudiTool *, Tools &tools)
static size_t | _tools_a_ (const IAlgorithm *, Tools &tools)
static size_t | _tools_t_ (const IAlgTool *, Tools &tools)

## Detailed Description

Definition at line 47 of file AlgDecorators.h.

## Member Typedef Documentation

typedef std::vector<const StatEntity*> GaudiPython::AlgDecorator::Counters

the actual type of vector of counters

Definition at line 52 of file AlgDecorators.h.

typedef std::vector<IService*> GaudiPython::AlgDecorator::Services

Definition at line 54 of file AlgDecorators.h.

typedef std::vector<IAlgTool*> GaudiPython::AlgDecorator::Tools

Definition at line 53 of file AlgDecorators.h.

## Member Function Documentation

const StatEntity * GaudiPython::AlgDecorator::_counter_a_ | ( | const GaudiAlgorithm * | alg,
|  | const std::string & | name
| ) |  |
| static

Definition at line 158 of file AlgDecorators.cpp.

{
if ( 0 == cmp ) { return 0 ; } // RETURN
return &( cmp -> counter ( name ) ) ; // RETURN
}

const StatEntity * GaudiPython::AlgDecorator::_counter_a_ | ( | const IAlgorithm * | alg,
|  | const std::string & | name
| ) |  |
| static

Definition at line 176 of file AlgDecorators.cpp.

{
if ( 0 == cmp ) { return 0 ; } // RETURN
return _counter_a_ ( dynamic_cast<const GaudiAlgorithm*>( cmp ) , name ) ;
}

const StatEntity * GaudiPython::AlgDecorator::_counter_t_ | ( | const GaudiTool * | alg,
|  | const std::string & | name
| ) |  |
| static

Definition at line 167 of file AlgDecorators.cpp.

{
if ( 0 == cmp ) { return 0 ; } // RETURN
return &( cmp -> counter ( name ) ) ; // RETURN
}

const StatEntity * GaudiPython::AlgDecorator::_counter_t_ | ( | const IAlgTool * | alg,
|  | const std::string & | name
| ) |  |
| static

Definition at line 185 of file AlgDecorators.cpp.

{
if ( 0 == cmp ) { return 0 ; } // RETURN
return _counter_t_ ( dynamic_cast<const GaudiTool*>( cmp ) , name ) ;
}

size_t GaudiPython::AlgDecorator::_counters_a_ | ( | const GaudiAlgorithm * | alg,
|  | std::vector< std::string > & | names,
|  | Counters & | out
| ) |  |
| static

Definition at line 86 of file AlgDecorators.cpp.

{
typedef std::map<std::string,StatEntity> Stats ;
names.clear () ;
out.clear () ;
if ( 0 == alg ) { return 0 ; } // RETURN
//
const Stats& counters = alg->counters() ;
for ( Stats::const_iterator icnt = counters.begin() ;
counters.end() != icnt ; ++icnt )
{
names.push_back ( icnt->first ) ;
out .push_back ( &(icnt->second) ) ;
}
return out.size() ;
}

size_t GaudiPython::AlgDecorator::_counters_a_ | ( | const IAlgorithm * | alg,
|  | std::vector< std::string > & | names,
|  | Counters & | out
| ) |  |
| static

Definition at line 130 of file AlgDecorators.cpp.

{
names.clear () ;
out.clear () ;
if ( 0 == alg ) { return 0 ; } // RETURN
//
return _counters_a_ ( dynamic_cast<const GaudiAlgorithm*>( alg ) , names , out ) ;
}

size_t GaudiPython::AlgDecorator::_counters_t_ | ( | const GaudiTool * | alg,
|  | std::vector< std::string > & | names,
|  | Counters & | out
| ) |  |
| static

Definition at line 108 of file AlgDecorators.cpp.

{
typedef std::map<std::string,StatEntity> Stats ;
names.clear () ;
out.clear () ;
if ( 0 == alg ) { return 0 ; } // RETURN
//
const Stats& counters = alg->counters() ;
for ( Stats::const_iterator icnt = counters.begin() ;
counters.end() != icnt ; ++icnt )
{
names.push_back ( icnt->first ) ;
out .push_back ( &(icnt->second) ) ;
}
return out.size() ;
}

size_t GaudiPython::AlgDecorator::_counters_t_ | ( | const IAlgTool * | alg,
|  | std::vector< std::string > & | names,
|  | Counters & | out
| ) |  |
| static

Definition at line 144 of file AlgDecorators.cpp.

{
names.clear () ;
out.clear () ;
if ( 0 == alg ) { return 0 ; } // RETURN
//
return _counters_t_ ( dynamic_cast<const GaudiTool*>( alg ) , names , out ) ;
}

size_t GaudiPython::AlgDecorator::_tools_a_ | ( | const GaudiAlgorithm * | cmp,
|  | Tools & | tools
| ) |  |
| static

Definition at line 194 of file AlgDecorators.cpp.

{
tools.clear() ;
if ( 0 == cmp ) { return 0 ; } // REUTRN
tools = cmp->tools() ;
return tools.size() ; // RETURN
}

size_t GaudiPython::AlgDecorator::_tools_a_ | ( | const IAlgorithm * | cmp,
|  | Tools & | tools
| ) |  |
| static

Definition at line 216 of file AlgDecorators.cpp.

{
tools.clear() ;
if ( 0 == cmp ) { return 0 ; } // RETURN
return _tools_a_ ( dynamic_cast<const GaudiAlgorithm*> ( cmp ) , tools ) ;
}

size_t GaudiPython::AlgDecorator::_tools_t_ | ( | const GaudiTool * | cmp,
|  | Tools & | tools
| ) |  |
| static

Definition at line 205 of file AlgDecorators.cpp.

{
tools.clear() ;
if ( 0 == cmp ) { return 0 ; } // REUTRN
tools = cmp->tools() ;
return tools.size() ; // RETURN
}

size_t GaudiPython::AlgDecorator::_tools_t_ | ( | const IAlgTool * | cmp,
|  | Tools & | tools
| ) |  |
| static

Definition at line 226 of file AlgDecorators.cpp.

{
tools.clear() ;
if ( 0 == cmp ) { return 0 ; } // RETURN
return _tools_t_ ( dynamic_cast<const GaudiTool*> ( cmp ) , tools ) ;
}

bool GaudiPython::AlgDecorator::exist | ( | const GaudiAlgorithm * | alg,
|  | const std::string & | location,
|  | const bool | useRootInTes
| ) |  |
| static

get the data from TES

Parameters

  alg | GaudiAlgorithm
  location | data location in TES
  useRoonInTes | flag to respect RootInTes

Returns
  the data

Definition at line 241 of file AlgDecorators.cpp.

{
if ( 0 == alg ) { return false ; } // RETURN
return alg -> exist<DataObject> ( alg->evtSvc() , location , useRootInTes ) ;
}

DataObject * GaudiPython::AlgDecorator::get_ | ( | const GaudiAlgorithm * | alg,
|  | const std::string & | location,
|  | const bool | useRootInTes
| ) |  |
| static

get the data from TES

Parameters

  alg | GaudiAlgorithm
  location | data location in TES
  useRoonInTes | flag to respect RootInTes

Returns
  the data

Definition at line 257 of file AlgDecorators.cpp.

{
if ( 0 == alg ) { return 0 ; } // RETURN
return alg->get<DataObject> ( alg->evtSvc() , location , useRootInTes ) ;
}

IInterface * GaudiPython::AlgDecorator::svc_ | ( | const GaudiAlgorithm * | alg,
|  | const std::string & | name,
|  | const bool | create = `false`
| ) |  |
| static

get the service from GaudiAlgorithm

Parameters

  alg | GaudiAlgorithm
  name | service name
  create | flag to create

Returns
  the tool

Definition at line 75 of file AlgDecorators.cpp.

{
if ( 0 == alg ) { return 0 ; }
return alg -> svc<IInterface> ( name , create ) ;
}

IAlgTool * GaudiPython::AlgDecorator::tool_ | ( | const GaudiAlgorithm * | alg,
|  | const std::string & | type,
|  | const std::string & | name,
|  | const IInterface * | parent = `0`,
|  | const bool | create = `true`
| ) |  |
| static

get the tool from GaudiAlgorithm

Parameters

  alg | GaudiAlgorithm
  type | tool type
  name | tool name
  parent | tool parent
  create | flag to create

Returns
  the tool

Definition at line 39 of file AlgDecorators.cpp.

{
if ( 0 == alg ) { return 0 ; }
return alg -> tool<IAlgTool> ( type , name , parent , create ) ;
}

IAlgTool * GaudiPython::AlgDecorator::tool_ | ( | const GaudiAlgorithm * | alg,
|  | const std::string & | typeAndName,
|  | const IInterface * | parent = `0`,
|  | const bool | create = `true`
| ) |  |
| static

get the tool from GaudiAlgorithm

Parameters

  alg | GaudiAlgorithm
  typeAndName | tool type/name
  parent | tool parent
  create | flag to create

Returns
  the tool

Definition at line 58 of file AlgDecorators.cpp.

{
if ( 0 == alg ) { return 0 ; }
return alg->tool<IAlgTool>( typeAndName , parent , create ) ;
}

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v25r0/GaudiPython/GaudiPython/AlgDecorators.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v25r0/GaudiPython/src/Lib/AlgDecorators.cpp