The Gaudi Framework  v36r7 (7f57a304)
Gaudi::Utils::GetData Struct Reference

#include </builds/gaudi/Gaudi/GaudiAlg/include/GaudiAlg/GaudiCommon.h>

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, std::string_view location, const bool checkData=true) const
 the only one essential method More...
 

Detailed Description

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 57 of file GaudiCommon.h.

Member Typedef Documentation

◆ return_type

the actual return type

Definition at line 120 of file GetData.h.

◆ Type

Definition at line 118 of file GetData.h.

Member Function Documentation

◆ operator()()

template<class COMMON >
return_type Gaudi::Utils::GetData::operator() ( const COMMON &  common,
IDataProviderSvc service,
std::string_view  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 132 of file GetData.h.

133  {
134  // use Data Provider Service
135  return_type obj = getFromTS<Type>( service, location );
136  if ( checkData ) { // check the data
137  common.Assert( obj, std::string{ "get():: No valid data at '" }.append( location ).append( "'" ) );
138  }
139  // debug printout
140  if ( common.msgLevel( MSG::DEBUG ) ) {
141  common.debug() << "The object of type '" << System::typeinfoName( typeid( obj ) ) << "' "
142  << ( obj ? "has been" : "could not be" ) << " retrieved from TS at address '" << location
143  << "'" << endmsg;
144  }
145  // return located data
146  return obj;
147  // ======================================================================
148  }

The documentation for this struct was generated from the following files:
MSG::DEBUG
@ DEBUG
Definition: IMessageSvc.h:25
std::string
STL class.
GaudiPython.HistoUtils.location
location
Definition: HistoUtils.py:965
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:308
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:203
std::string::append
T append(T... args)
Gaudi::Utils::GetData::return_type
_GetType< Type >::return_type return_type
the actual return type
Definition: GetData.h:120