|
Gaudi Framework, version v23r2 |
| Home | Generated: Thu Jun 28 2012 |
Helper structure for implementation of "getOrCreate"-functions for GaudiCommon<BASE> More...
#include <GetData.h>

Public Types | |
| typedef Getter::Type | Type |
| typedef Getter::return_type | return_type |
| the actual return type | |
Public Member Functions | |
| template<class COMMON > | |
| return_type | operator() (const COMMON &common, IDataProviderSvc *service, const std::string &location, const std::string &location2) const |
| the only one essential method | |
Private Types | |
| typedef GetData< TYPE > | Getter |
| the actual data getter | |
Helper structure for implementation of "getOrCreate"-functions for GaudiCommon<BASE>
Definition at line 380 of file GetData.h.
| typedef Getter::return_type Gaudi::Utils::GetOrCreateData< TYPE, TYPE2 >::return_type |
| typedef Getter::Type Gaudi::Utils::GetOrCreateData< TYPE, TYPE2 >::Type |
| return_type Gaudi::Utils::GetOrCreateData< TYPE, TYPE2 >::operator() | ( | const COMMON & | common, |
| IDataProviderSvc * | service, | ||
| const std::string & | location, | ||
| const std::string & | location2 | ||
| ) | const [inline] |
the only one essential method
| common | the actual "worker" |
| service | pointer to Data Provider Service |
| location | location of objects in TES |
check the data
Definition at line 403 of file GetData.h.
{
SmartDataPtr<TYPE> obj ( service , location ) ;
if ( !obj )
{
TYPE2* o = new TYPE2() ;
common.put ( service , o , location2 ) ;
if ( common.msgLevel ( MSG::DEBUG ) )
{ common.debug() << "The object of type '"
<< System::typeinfoName(typeid(*o))
<< "' has been created from TS at address '"
<< location2 << "'" << endmsg ; }
return_type _o = o ;
return _o ;
}
return_type ret = obj ;
common.Assert ( !(!ret) , "get():: No valid data at '" + location + "'" ) ;
if ( common.msgLevel ( MSG::DEBUG ) )
{ common.debug() << "The object of type '"
<< System::typeinfoName(typeid(*ret))
<< "' has been retrieved from TS at address '"
<< location << "'" << endmsg ; }
// return *VALID* data
return ret ;
// ====================================================================
}