The Gaudi Framework  v38r0 (2143aa4c)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
AlgDecorators.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #pragma once
12 
14 #include <string>
15 
16 class IInterface;
17 class IProperty;
18 class IAlgTool;
19 class IAlgorithm;
20 class GaudiAlgorithm;
21 class GaudiTool;
22 class DataObject;
23 
24 // ============================================================================
32 // ============================================================================
33 namespace GaudiPython {
34  // ==========================================================================
41  public:
42  // ========================================================================
47  // ========================================================================
48  // the general functional methods
49  // ========================================================================
50  public:
59  static IAlgTool* tool_( const GaudiAlgorithm* alg, const std::string& type, const std::string& name,
60  const IInterface* parent = 0, const bool create = true );
68  static IAlgTool* tool_( const GaudiAlgorithm* alg, const std::string& typeAndName, const IInterface* parent = 0,
69  const bool create = true );
76  static IInterface* svc_( const GaudiAlgorithm* alg, const std::string& name, const bool create = false );
77  // ========================================================================
78  // get the data from TES
79  // ========================================================================
80  public:
87  static DataObject* get_( const GaudiAlgorithm* alg, const std::string& location, const bool useRootInTes );
88  // ========================================================================
89  public:
90  // ========================================================================
97  static bool exist( const GaudiAlgorithm* alg, const std::string& location, const bool useRootInTes );
98  // ========================================================================
99  public: // inspection: get all counters:
100  // ========================================================================
102  static size_t _counters_t_( const GaudiTool* alg, std::vector<std::string>& names, Counters& out );
103  static size_t _counters_a_( const IAlgorithm* alg, std::vector<std::string>& names, Counters& out );
104  static size_t _counters_t_( const IAlgTool* alg, std::vector<std::string>& names, Counters& out );
105  // ========================================================================
106  public: // inspection: get the counter
107  // ========================================================================
108  static StatEntity* _counter_a_( const GaudiAlgorithm* alg, const std::string& name );
109  static StatEntity* _counter_t_( const GaudiTool* alg, const std::string& name );
110  static StatEntity* _counter_a_( const IAlgorithm* alg, const std::string& name );
111  static StatEntity* _counter_t_( const IAlgTool* alg, const std::string& name );
112  // ========================================================================
113  public: // inspection: get all tools
114  // ========================================================================
115  static size_t _tools_a_( const GaudiAlgorithm*, Tools& tools );
116  static size_t _tools_t_( const GaudiTool*, Tools& tools );
117  static size_t _tools_a_( const IAlgorithm*, Tools& tools );
118  static size_t _tools_t_( const IAlgTool*, Tools& tools );
119  // ========================================================================
120  };
121  // ==========================================================================
122 } // namespace GaudiPython
GaudiPython::AlgDecorator::Tools
std::vector< IAlgTool * > Tools
Definition: AlgDecorators.h:45
std::string
STL class.
IAlgTool
Definition: IAlgTool.h:33
GaudiPython::AlgDecorator::_counters_a_
static size_t _counters_a_(const IAlgorithm *alg, std::vector< std::string > &names, Counters &out)
GaudiAlg.HistoUtils.location
location
Definition: HistoUtils.py:964
bug_34121.name
name
Definition: bug_34121.py:20
GaudiPython::AlgDecorator
simple class that allows to "decorate" the python algorithm with 'basic' functionality from class Gau...
Definition: AlgDecorators.h:40
std::vector
STL class.
StatEntity
backward compatible StatEntity class.
Definition: StatEntity.h:23
basic.alg
alg
Definition: basic.py:15
IProperty
Definition: IProperty.h:33
IAlgorithm
Definition: IAlgorithm.h:38
GaudiAlgorithm
Definition: GaudiAlgorithm.h:104
GaudiPython::AlgDecorator::Services
std::vector< IService * > Services
Definition: AlgDecorators.h:46
GaudiPython::AlgDecorator::_counters_a_
static size_t _counters_a_(const GaudiAlgorithm *alg, std::vector< std::string > &names, Counters &out)
GaudiPython::AlgDecorator::_counters_t_
static size_t _counters_t_(const IAlgTool *alg, std::vector< std::string > &names, Counters &out)
GaudiPython::AlgDecorator::Counters
std::vector< Gaudi::Accumulators::PrintableCounter * > Counters
the actual type of vector of counters
Definition: AlgDecorators.h:44
gaudirun.type
type
Definition: gaudirun.py:160
GaudiAlgorithm.h
GaudiPython
Namespace for all classes interfacing Gaudi to Python.
Definition: AlgDecorators.h:33
IInterface
Definition: IInterface.h:237
DataObject
Definition: DataObject.h:40
GaudiPython::AlgDecorator::_counters_t_
static size_t _counters_t_(const GaudiTool *alg, std::vector< std::string > &names, Counters &out)
GaudiTool
Definition: GaudiTool.h:110
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:81
PrepareBase.out
out
Definition: PrepareBase.py:20