Gaudi Framework, version v21r11

Home   Generated: 30 Sep 2010

Gaudi::Utils::GetData< Gaudi::Range_< std::vector< const TYPE * > > > Struct Template Reference

the template specialization for ranges More...

#include <GetData.h>

List of all members.

Public Types

typedef Gaudi::Range_
< std::vector< const TYPE * > > 
Type
 the actual return type
typedef _GetType< Type >
::return_type 
return_type

Public Member Functions

template<class COMMON>
return_type operator() (const COMMON &common, IDataProviderSvc *service, const std::string &location) const
 the only one essential method
return_type make_range (const typename TYPE::Container *cnt) const
return_type make_range (const typename TYPE::Selection *cnt) const
DataObjectgetData (IDataProviderSvc *service, const std::string &location) const
 get the data form transient store

Private Member Functions

template<class ITERATOR>
return_type make_range (ITERATOR first, ITERATOR last) const


Detailed Description

template<class TYPE>
struct Gaudi::Utils::GetData< Gaudi::Range_< std::vector< const TYPE * > > >

the template specialization for ranges

Definition at line 108 of file GetData.h.


Member Typedef Documentation

template<class TYPE>
typedef Gaudi::Range_<std::vector<const TYPE*> > Gaudi::Utils::GetData< Gaudi::Range_< std::vector< const TYPE * > > >::Type

the actual return type

Definition at line 113 of file GetData.h.

template<class TYPE>
typedef _GetType<Type>::return_type Gaudi::Utils::GetData< Gaudi::Range_< std::vector< const TYPE * > > >::return_type

Definition at line 114 of file GetData.h.


Member Function Documentation

template<class TYPE>
template<class COMMON>
return_type Gaudi::Utils::GetData< Gaudi::Range_< std::vector< const TYPE * > > >::operator() ( const COMMON &  common,
IDataProviderSvc service,
const std::string location 
) const [inline]

the only one essential method

Parameters:
common the actual "worker"
service pointer to Data Provider Service
location location of objects in TES
Returns:
the data

try to be efficient: 1. load object only once:

2. try to get the selection

3. try to get the container

Definition at line 126 of file GetData.h.

00129       {
00132         DataObject* object = this -> getData ( service , location ) ;
00133         if ( 0 != object ) 
00134         {
00136           typedef typename TYPE::Selection Selection_;
00137           const Selection_* sel = dynamic_cast<Selection_*> ( object ) ;
00138           if ( 0 != sel ) 
00139           {
00140             if ( common.msgLevel ( MSG::DEBUG ) )
00141             { common.debug() << "The object of type '"
00142                              << System::typeinfoName(typeid(*object))
00143                              << "' has been retrieved from TS at address '"
00144                              << location << "'" << endmsg ; }
00145             return make_range ( sel ) ;
00146           }
00148           typedef typename TYPE::Container  Container_ ;
00149           const Container_* cnt = dynamic_cast<Container_*> ( object ) ;
00150           if ( 0 != cnt ) 
00151           {
00152             if ( common.msgLevel ( MSG::DEBUG ) )
00153             { common.debug() << "The object of type '"
00154                              << System::typeinfoName(typeid(*object))
00155                              << "' has been retrieved from TS at address '"
00156                              << location << "'" << endmsg ; }
00157             return make_range ( cnt ) ;
00158           } 
00159           // no valid data
00160           common.Assert ( false , "get():: No valid data at '" + location + "'"  ) ;
00161         }
00162         // no valid data
00163         common.Assert ( false , "get():: No data at '" + location + "'"  ) ;
00164         // the fictive return
00165         return return_type () ;
00166       }

template<class TYPE>
return_type Gaudi::Utils::GetData< Gaudi::Range_< std::vector< const TYPE * > > >::make_range ( const typename TYPE::Container *  cnt  )  const [inline]

Definition at line 171 of file GetData.h.

00172       { return 0 == cnt ? return_type() : make_range  ( cnt->begin() , cnt->end() ) ; }

template<class TYPE>
return_type Gaudi::Utils::GetData< Gaudi::Range_< std::vector< const TYPE * > > >::make_range ( const typename TYPE::Selection *  cnt  )  const [inline]

Definition at line 174 of file GetData.h.

00175       { return 0 == cnt ? return_type() : return_type ( cnt->begin() , cnt->end() ) ; }

template<class TYPE>
DataObject* Gaudi::Utils::GetData< Gaudi::Range_< std::vector< const TYPE * > > >::getData ( IDataProviderSvc service,
const std::string location 
) const [inline]

get the data form transient store

Parameters:
service pointer to data provider service
location the location
Returns:
the object for TES

Try to be efficient

Definition at line 182 of file GetData.h.

00184       {
00186         SmartDataObjectPtr getter 
00187           ( SmartDataObjectPtr::ObjectLoader::access() , 
00188             service , 0 , location ) ;        
00189         return getter.accessData () ;
00190       }

template<class TYPE>
template<class ITERATOR>
return_type Gaudi::Utils::GetData< Gaudi::Range_< std::vector< const TYPE * > > >::make_range ( ITERATOR  first,
ITERATOR  last 
) const [inline, private]

Definition at line 196 of file GetData.h.

00198       {
00199         typename return_type::const_iterator* _begin = reinterpret_cast<typename return_type::const_iterator*>(&first);
00200         typename return_type::const_iterator* _end   = reinterpret_cast<typename return_type::const_iterator*>(&last);
00201         return return_type(*_begin, *_end);
00202       }


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

Generated at Thu Sep 30 09:58:56 2010 for Gaudi Framework, version v21r11 by Doxygen version 1.5.6 written by Dimitri van Heesch, © 1997-2004