GaudiPython::AlgDecorator Class Reference

#include </scratch/z5/marcocle/GaudiDocs/lhcb-release/996/GAUDI/GAUDI_v26r4/InstallArea/x86_64-slc6-gcc48-opt/include/GaudiPython/AlgDecorators.h>

Public Types

typedef std::vector< const StatEntity * > Counters
 the actual type of vector of counters More...
 
typedef std::vector< IAlgTool * > Tools
 
typedef std::vector< IService * > Services
 
typedef std::vector< const StatEntity * > Counters
 the actual type of vector of counters More...
 
typedef std::vector< IAlgTool * > Tools
 
typedef std::vector< IService * > Services
 

Static Public Member Functions

static IAlgTooltool_ (const GaudiAlgorithm *alg, const std::string &type, const std::string &name, const IInterface *parent=0, const bool create=true)
 get the tool from GaudiAlgorithm More...
 
static IAlgTooltool_ (const GaudiAlgorithm *alg, const std::string &typeAndName, const IInterface *parent=0, const bool create=true)
 get the tool from GaudiAlgorithm More...
 
static IInterfacesvc_ (const GaudiAlgorithm *alg, const std::string &name, const bool create=false)
 get the service from GaudiAlgorithm More...
 
static DataObjectget_ (const GaudiAlgorithm *alg, const std::string &location, const bool useRootInTes)
 get the data from TES More...
 
static bool exist (const GaudiAlgorithm *alg, const std::string &location, const bool useRootInTes)
 get the data from TES More...
 
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)
 
static IAlgTooltool_ (const GaudiAlgorithm *alg, const std::string &type, const std::string &name, const IInterface *parent=0, const bool create=true)
 get the tool from GaudiAlgorithm More...
 
static IAlgTooltool_ (const GaudiAlgorithm *alg, const std::string &typeAndName, const IInterface *parent=0, const bool create=true)
 get the tool from GaudiAlgorithm More...
 
static IInterfacesvc_ (const GaudiAlgorithm *alg, const std::string &name, const bool create=false)
 get the service from GaudiAlgorithm More...
 
static DataObjectget_ (const GaudiAlgorithm *alg, const std::string &location, const bool useRootInTes)
 get the data from TES More...
 
static bool exist (const GaudiAlgorithm *alg, const std::string &location, const bool useRootInTes)
 get the data from TES More...
 
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 46 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 51 of file AlgDecorators.h.

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

the actual type of vector of counters

Definition at line 51 of file AlgDecorators.h.

Definition at line 53 of file AlgDecorators.h.

Definition at line 53 of file AlgDecorators.h.

Definition at line 52 of file AlgDecorators.h.

Definition at line 52 of file AlgDecorators.h.

Member Function Documentation

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

Definition at line 146 of file AlgDecorators.cpp.

147 {
148  return cmp ? &( cmp -> counter ( name ) ) : nullptr; // RETURN
149 }
static const StatEntity* GaudiPython::AlgDecorator::_counter_a_ ( const GaudiAlgorithm alg,
const std::string &  name 
)
static
const StatEntity * GaudiPython::AlgDecorator::_counter_a_ ( const IAlgorithm alg,
const std::string &  name 
)
static

Definition at line 162 of file AlgDecorators.cpp.

163 {
164  return cmp ? _counter_a_ ( dynamic_cast<const GaudiAlgorithm*>( cmp ) , name )
165  : nullptr;
166 }
static const StatEntity * _counter_a_(const GaudiAlgorithm *alg, const std::string &name)
static const StatEntity* GaudiPython::AlgDecorator::_counter_a_ ( const IAlgorithm alg,
const std::string &  name 
)
static
const StatEntity * GaudiPython::AlgDecorator::_counter_t_ ( const GaudiTool alg,
const std::string &  name 
)
static

Definition at line 154 of file AlgDecorators.cpp.

155 {
156  return cmp ? &( cmp -> counter ( name ) ) : nullptr; // RETURN
157 }
static const StatEntity* GaudiPython::AlgDecorator::_counter_t_ ( const GaudiTool alg,
const std::string &  name 
)
static
const StatEntity * GaudiPython::AlgDecorator::_counter_t_ ( const IAlgTool alg,
const std::string &  name 
)
static

Definition at line 171 of file AlgDecorators.cpp.

172 {
173  return cmp ? _counter_t_ ( dynamic_cast<const GaudiTool*>( cmp ) , name )
174  : nullptr;
175 }
static const StatEntity * _counter_t_(const GaudiTool *alg, const std::string &name)
static const StatEntity* GaudiPython::AlgDecorator::_counter_t_ ( const IAlgTool alg,
const std::string &  name 
)
static
size_t GaudiPython::AlgDecorator::_counters_a_ ( const GaudiAlgorithm alg,
std::vector< std::string > &  names,
Counters out 
)
static

Definition at line 82 of file AlgDecorators.cpp.

85 {
86  names.clear () ;
87  out.clear () ;
88  if ( !alg ) { return 0 ; } // RETURN
89  //
90  for ( const auto& cnt : alg->counters() )
91  {
92  names.push_back ( cnt.first ) ;
93  out .push_back ( &cnt.second ) ;
94  }
95  return out.size() ;
96 }
const Statistics & counters() const
accessor to all counters
Definition: GaudiCommon.h:492
static size_t GaudiPython::AlgDecorator::_counters_a_ ( const GaudiAlgorithm alg,
std::vector< std::string > &  names,
Counters out 
)
static
size_t GaudiPython::AlgDecorator::_counters_a_ ( const IAlgorithm alg,
std::vector< std::string > &  names,
Counters out 
)
static

Definition at line 120 of file AlgDecorators.cpp.

123 {
124  names.clear () ;
125  out.clear () ;
126  return alg ? _counters_a_ ( dynamic_cast<const GaudiAlgorithm*>( alg ) , names , out )
127  : 0;
128 }
static size_t _counters_a_(const GaudiAlgorithm *alg, std::vector< std::string > &names, Counters &out)
static size_t GaudiPython::AlgDecorator::_counters_a_ ( const IAlgorithm alg,
std::vector< std::string > &  names,
Counters out 
)
static
static size_t GaudiPython::AlgDecorator::_counters_t_ ( const GaudiTool alg,
std::vector< std::string > &  names,
Counters out 
)
static
size_t GaudiPython::AlgDecorator::_counters_t_ ( const GaudiTool alg,
std::vector< std::string > &  names,
Counters out 
)
static

Definition at line 101 of file AlgDecorators.cpp.

104 {
105  names.clear () ;
106  out.clear () ;
107  if ( !alg ) { return 0 ; } // RETURN
108  //
109  for ( const auto& cnt : alg->counters() )
110  {
111  names.push_back ( cnt.first ) ;
112  out .push_back ( &cnt.second ) ;
113  }
114  return out.size() ;
115 }
const Statistics & counters() const
accessor to all counters
Definition: GaudiCommon.h:492
size_t GaudiPython::AlgDecorator::_counters_t_ ( const IAlgTool alg,
std::vector< std::string > &  names,
Counters out 
)
static

Definition at line 133 of file AlgDecorators.cpp.

136 {
137  names.clear () ;
138  out.clear () ;
139  return alg ? _counters_t_ ( dynamic_cast<const GaudiTool*>( alg ) , names , out )
140  : 0;
141 }
static size_t _counters_t_(const GaudiTool *alg, std::vector< std::string > &names, Counters &out)
static size_t GaudiPython::AlgDecorator::_counters_t_ ( const IAlgTool alg,
std::vector< std::string > &  names,
Counters out 
)
static
size_t GaudiPython::AlgDecorator::_tools_a_ ( const GaudiAlgorithm cmp,
Tools tools 
)
static

Definition at line 180 of file AlgDecorators.cpp.

181 {
182  tools.clear() ;
183  if ( cmp ) tools = cmp->tools() ;
184  return tools.size() ; // RETURN
185 }
const AlgTools & tools() const
get the list of aquired tools
Definition: GaudiCommon.h:705
static size_t GaudiPython::AlgDecorator::_tools_a_ ( const GaudiAlgorithm ,
Tools tools 
)
static
size_t GaudiPython::AlgDecorator::_tools_a_ ( const IAlgorithm cmp,
Tools tools 
)
static

Definition at line 200 of file AlgDecorators.cpp.

201 {
202  tools.clear() ;
203  return cmp ? _tools_a_ ( dynamic_cast<const GaudiAlgorithm*> ( cmp ) , tools )
204  : 0;
205 }
static size_t _tools_a_(const GaudiAlgorithm *, Tools &tools)
static size_t GaudiPython::AlgDecorator::_tools_a_ ( const IAlgorithm ,
Tools tools 
)
static
size_t GaudiPython::AlgDecorator::_tools_t_ ( const GaudiTool cmp,
Tools tools 
)
static

Definition at line 190 of file AlgDecorators.cpp.

191 {
192  tools.clear() ;
193  if ( cmp ) tools = cmp->tools() ;
194  return tools.size() ; // RETURN
195 }
const AlgTools & tools() const
get the list of aquired tools
Definition: GaudiCommon.h:705
static size_t GaudiPython::AlgDecorator::_tools_t_ ( const GaudiTool ,
Tools tools 
)
static
size_t GaudiPython::AlgDecorator::_tools_t_ ( const IAlgTool cmp,
Tools tools 
)
static

Definition at line 210 of file AlgDecorators.cpp.

211 {
212  tools.clear() ;
213  return cmp ? _tools_t_ ( dynamic_cast<const GaudiTool*> ( cmp ) , tools ) : 0;
214 }
static size_t _tools_t_(const GaudiTool *, Tools &tools)
static size_t GaudiPython::AlgDecorator::_tools_t_ ( const IAlgTool ,
Tools tools 
)
static
bool GaudiPython::AlgDecorator::exist ( const GaudiAlgorithm alg,
const std::string &  location,
const bool  useRootInTes 
)
static

get the data from TES

Parameters
algGaudiAlgorithm
locationdata location in TES
useRoonInTesflag to respect RootInTes
Returns
the data

Definition at line 224 of file AlgDecorators.cpp.

227 {
228  return alg ? alg->exist<DataObject> ( alg->evtSvc() , location , useRootInTes )
229  : false;
230 }
bool exist(IDataProviderSvc *svc, const std::string &location, const bool useRootInTES=true) const
Check the existence of a data object or container in the Gaudi Transient Event Store.
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30
static bool GaudiPython::AlgDecorator::exist ( const GaudiAlgorithm alg,
const std::string &  location,
const bool  useRootInTes 
)
static

get the data from TES

Parameters
algGaudiAlgorithm
locationdata location in TES
useRoonInTesflag to respect RootInTes
Returns
the data
DataObject * GaudiPython::AlgDecorator::get_ ( const GaudiAlgorithm alg,
const std::string &  location,
const bool  useRootInTes 
)
static

get the data from TES

Parameters
algGaudiAlgorithm
locationdata location in TES
useRoonInTesflag to respect RootInTes
Returns
the data

Definition at line 240 of file AlgDecorators.cpp.

243 {
244  return alg ? alg->get<DataObject> ( alg->evtSvc() , location , useRootInTes )
245  : nullptr;
246 }
Gaudi::Utils::GetData< TYPE >::return_type get(IDataProviderSvc *svc, const std::string &location, const bool useRootInTES=true) const
Templated access to the data in Gaudi Transient Store.
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30
static DataObject* GaudiPython::AlgDecorator::get_ ( const GaudiAlgorithm alg,
const std::string &  location,
const bool  useRootInTes 
)
static

get the data from TES

Parameters
algGaudiAlgorithm
locationdata location in TES
useRoonInTesflag to respect RootInTes
Returns
the data
static IInterface* GaudiPython::AlgDecorator::svc_ ( const GaudiAlgorithm alg,
const std::string &  name,
const bool  create = false 
)
static

get the service from GaudiAlgorithm

Parameters
algGaudiAlgorithm
nameservice name
createflag to create
Returns
the tool
IInterface * GaudiPython::AlgDecorator::svc_ ( const GaudiAlgorithm alg,
const std::string &  name,
const bool  create = false 
)
static

get the service from GaudiAlgorithm

Parameters
algGaudiAlgorithm
nameservice name
createflag to create
Returns
the tool

Definition at line 72 of file AlgDecorators.cpp.

75 {
76  return alg ? alg -> svc<IInterface> ( name , create ) : nullptr;
77 }
static 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
algGaudiAlgorithm
typetool type
nametool name
parenttool parent
createflag to create
Returns
the tool
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
algGaudiAlgorithm
typetool type
nametool name
parenttool parent
createflag to create
Returns
the tool

Definition at line 38 of file AlgDecorators.cpp.

43 {
44  return alg ? alg -> tool<IAlgTool> ( type , name , parent , create ) : nullptr;
45 }
string type
Definition: gaudirun.py:151
static 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
algGaudiAlgorithm
typeAndNametool type/name
parenttool parent
createflag to create
Returns
the tool
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
algGaudiAlgorithm
typeAndNametool type/name
parenttool parent
createflag to create
Returns
the tool

Definition at line 56 of file AlgDecorators.cpp.

60 {
61  return alg ? alg->tool<IAlgTool>( typeAndName , parent , create ) : nullptr;
62 }
The interface implemented by the AlgTool base class.
Definition: IAlgTool.h:22
TOOL * tool(const std::string &type, const std::string &name, const IInterface *parent=0, bool create=true) const
Useful method for the easy location of tools.

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