All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 >:

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 36 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 87 of file GetData.h.

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

Definition at line 85 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
commonthe actual "worker"
servicepointer to Data Provider Service
locationlocation of objects in TES
checkDatawhether to check if the pointer is valid before returning it
Returns
the data

Definition at line 100 of file GetData.h.

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

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