GaudiPython::AlgDecorator Class Reference

#include </scratch/z5/marcocle/GaudiDocs/lhcb-release/825/GAUDI/GAUDI_v26r3/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 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<const StatEntity*> GaudiPython::AlgDecorator::Counters

the actual type of vector of counters

Definition at line 52 of file AlgDecorators.h.

Definition at line 54 of file AlgDecorators.h.

Definition at line 54 of file AlgDecorators.h.

Definition at line 53 of file AlgDecorators.h.

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.

159 {
160  if ( 0 == cmp ) { return 0 ; } // RETURN
161  return &( cmp -> counter ( name ) ) ; // RETURN
162 }
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 176 of file AlgDecorators.cpp.

177 {
178  if ( 0 == cmp ) { return 0 ; } // RETURN
179  return _counter_a_ ( dynamic_cast<const GaudiAlgorithm*>( cmp ) , name ) ;
180 }
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 167 of file AlgDecorators.cpp.

168 {
169  if ( 0 == cmp ) { return 0 ; } // RETURN
170  return &( cmp -> counter ( name ) ) ; // RETURN
171 }
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 185 of file AlgDecorators.cpp.

186 {
187  if ( 0 == cmp ) { return 0 ; } // RETURN
188  return _counter_t_ ( dynamic_cast<const GaudiTool*>( cmp ) , name ) ;
189 }
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 86 of file AlgDecorators.cpp.

89 {
90  typedef std::map<std::string,StatEntity> Stats ;
91  names.clear () ;
92  out.clear () ;
93  if ( 0 == alg ) { return 0 ; } // RETURN
94  //
95  const Stats& counters = alg->counters() ;
96  for ( Stats::const_iterator icnt = counters.begin() ;
97  counters.end() != icnt ; ++icnt )
98  {
99  names.push_back ( icnt->first ) ;
100  out .push_back ( &(icnt->second) ) ;
101  }
102  return out.size() ;
103 }
const Statistics & counters() const
accessor to all counters
Definition: GaudiCommon.h:507
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 130 of file AlgDecorators.cpp.

133 {
134  names.clear () ;
135  out.clear () ;
136  if ( 0 == alg ) { return 0 ; } // RETURN
137  //
138  return _counters_a_ ( dynamic_cast<const GaudiAlgorithm*>( alg ) , names , out ) ;
139 }
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 108 of file AlgDecorators.cpp.

111 {
112  typedef std::map<std::string,StatEntity> Stats ;
113  names.clear () ;
114  out.clear () ;
115  if ( 0 == alg ) { return 0 ; } // RETURN
116  //
117  const Stats& counters = alg->counters() ;
118  for ( Stats::const_iterator icnt = counters.begin() ;
119  counters.end() != icnt ; ++icnt )
120  {
121  names.push_back ( icnt->first ) ;
122  out .push_back ( &(icnt->second) ) ;
123  }
124  return out.size() ;
125 }
const Statistics & counters() const
accessor to all counters
Definition: GaudiCommon.h:507
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.

147 {
148  names.clear () ;
149  out.clear () ;
150  if ( 0 == alg ) { return 0 ; } // RETURN
151  //
152  return _counters_t_ ( dynamic_cast<const GaudiTool*>( alg ) , names , out ) ;
153 }
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 194 of file AlgDecorators.cpp.

195 {
196  tools.clear() ;
197  if ( 0 == cmp ) { return 0 ; } // REUTRN
198  tools = cmp->tools() ;
199  return tools.size() ; // RETURN
200 }
const AlgTools & tools() const
get the list of aquired tools
Definition: GaudiCommon.h:738
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 216 of file AlgDecorators.cpp.

217 {
218  tools.clear() ;
219  if ( 0 == cmp ) { return 0 ; } // RETURN
220  return _tools_a_ ( dynamic_cast<const GaudiAlgorithm*> ( cmp ) , tools ) ;
221 }
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 205 of file AlgDecorators.cpp.

206 {
207  tools.clear() ;
208  if ( 0 == cmp ) { return 0 ; } // REUTRN
209  tools = cmp->tools() ;
210  return tools.size() ; // RETURN
211 }
const AlgTools & tools() const
get the list of aquired tools
Definition: GaudiCommon.h:738
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 226 of file AlgDecorators.cpp.

227 {
228  tools.clear() ;
229  if ( 0 == cmp ) { return 0 ; } // RETURN
230  return _tools_t_ ( dynamic_cast<const GaudiTool*> ( cmp ) , tools ) ;
231 }
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 241 of file AlgDecorators.cpp.

244 {
245  if ( 0 == alg ) { return false ; } // RETURN
246  return alg -> exist<DataObject> ( alg->evtSvc() , location , useRootInTes ) ;
247 }
return false
Definition: Bootstrap.cpp:338
SmartIF< IDataProviderSvc > & evtSvc() const
shortcut for method eventSvc
Definition: Algorithm.h:260
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 257 of file AlgDecorators.cpp.

260 {
261  if ( 0 == alg ) { return 0 ; } // RETURN
262  return alg->get<DataObject> ( alg->evtSvc() , location , useRootInTes ) ;
263 }
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.
SmartIF< IDataProviderSvc > & evtSvc() const
shortcut for method eventSvc
Definition: Algorithm.h:260
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:31
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 75 of file AlgDecorators.cpp.

78 {
79  if ( 0 == alg ) { return 0 ; }
80  return alg -> svc<IInterface> ( name , create ) ;
81 }
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 39 of file AlgDecorators.cpp.

44 {
45  if ( 0 == alg ) { return 0 ; }
46  return alg -> tool<IAlgTool> ( type , name , parent , create ) ;
47 }
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 58 of file AlgDecorators.cpp.

62 {
63  if ( 0 == alg ) { return 0 ; }
64  return alg->tool<IAlgTool>( typeAndName , parent , create ) ;
65 }
The interface implemented by the AlgTool base class.
Definition: IAlgTool.h:23
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: