| The Gaudi Framework v28r2p1 (f1a77ff4)

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

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

Public Types | Public Member Functions | List of all members
Gaudi::Utils::GetData< TYPE > Struct Template Reference

Helper structure for implementation of "get"-functions for GaudiCommon<BASE> More...

`#include <GaudiAlg/GaudiCommon.h>`

Inheritance diagram for Gaudi::Utils::GetData< TYPE >:
[legend]

## Public Types
typedef TYPE | Type
typedef _GetType< Type >::return_type | return_type
| the actual return type More...

## Public Member Functions
template<class COMMON >
return_type | operator() (const COMMON &common, IDataProviderSvc *service, const std::string &location, const bool checkData=true) const
| the only one essential method More...

## Detailed Description

### template<class TYPE>
struct Gaudi::Utils::GetData< TYPE >

Helper structure for implementation of "get"-functions for GaudiCommon<BASE>

Author
  Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl

Date
  2008-07-22

Definition at line 41 of file GaudiCommon.h.

## Member Typedef Documentation

template<class TYPE>

typedef _GetType<Type>::return_type Gaudi::Utils::GetData< TYPE >::return_type

the actual return type

Definition at line 85 of file GetData.h.

template<class TYPE>

typedef TYPE Gaudi::Utils::GetData< TYPE >::Type

Definition at line 83 of file GetData.h.

## Member Function Documentation

template<class TYPE>
template<class COMMON >

return_type Gaudi::Utils::GetData< TYPE >::operator() | ( | const COMMON & | common,
|  | IDataProviderSvc * | service,
|  | const std::string & | location,
|  | const bool | checkData = `true`
| ) |  | const
| inline

the only one essential method

Parameters

  common | the actual "worker"
  service | pointer to Data Provider Service
  location | location of objects in TES
  checkData | whether to check if the pointer is valid before returning it

Returns
  the data

Definition at line 98 of file GetData.h.

102 {
103 // use Data Provider Service
104 return_type obj = getFromTS<Type>(service, location);
105 if (checkData) { // check the data
106 common.Assert(obj, "get():: No valid data at '" + location + "'");
107 }
108 // debug printout
109 if ( common.msgLevel ( MSG::DEBUG ) ) {
110 common.debug() << "The object of type '"
111 << System::typeinfoName(typeid(obj))
112 << "' "
113 << (obj ? "has been" : "could not be")
114 << " retrieved from TS at address '"
115 << location << "'" << endmsg ;
116 }
117 // return located data
118 return obj ;
119 // ======================================================================
120 }
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:299
GaudiPython.HistoUtils.location
location
Definition: HistoUtils.py:774
MSG::DEBUG
Definition: IMessageSvc.h:18
Gaudi::Utils::GetData::return_type
_GetType< Type >::return_type return_type
the actual return type
Definition: GetData.h:85
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244

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

- GaudiAlg/GaudiAlg/GaudiCommon.h
- GaudiAlg/GaudiAlg/GetData.h