| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 2014

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

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

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Public Member Functions | Private Member Functions | List of all members
Gaudi::Utils::GetData< Gaudi::Range_< std::vector< const TYPE * > > > Struct Template Reference

the template specialization for ranges More...

`#include <GetData.h>`

## 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 bool checkData=true) 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
DataObject * | getData (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 127 of file GetData.h.

## Member Typedef Documentation

template<class TYPE >

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

Definition at line 133 of file GetData.h.

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

## Member Function Documentation

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

{
SmartDataObjectPtr getter
( SmartDataObjectPtr::ObjectLoader::access() ,
service , 0 , location ) ;
return getter.accessData () ;
}
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 194 of file GetData.h.

{ 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 197 of file GetData.h.

{ return 0 == cnt ? return_type() : return_type ( cnt->begin() , cnt->end() ) ; }
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 219 of file GetData.h.

{
typename return_type::const_iterator* _begin = reinterpret_cast<typename return_type::const_iterator*>(&first);
typename return_type::const_iterator* _end = reinterpret_cast<typename return_type::const_iterator*>(&last);
return return_type(*_begin, *_end);
}
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 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

try to be efficient:

1. load object only once:

1. try to get the selection

1. try to get the container

Definition at line 146 of file GetData.h.

{
DataObject* object = this -> getData ( service , location ) ;
if ( 0 != object )
{
typedef typename TYPE::Selection Selection_;
const Selection_* sel = dynamic_cast<Selection_*> ( object ) ;
if ( 0 != sel )
{
if ( common.msgLevel ( MSG::DEBUG ) )
{ common.debug() << "The object of type '"
<< System::typeinfoName(typeid(*object))
<< "' has been retrieved from TS at address '"
<< location << "'" << endmsg ; }
return make_range ( sel ) ;
}
typedef typename TYPE::Container Container_ ;
const Container_* cnt = dynamic_cast<Container_*> ( object ) ;
if ( 0 != cnt )
{
if ( common.msgLevel ( MSG::DEBUG ) )
{ common.debug() << "The object of type '"
<< System::typeinfoName(typeid(*object))
<< "' has been retrieved from TS at address '"
<< location << "'" << endmsg ; }
return make_range ( cnt ) ;
}
// no valid data
if (checkData)
common.Assert ( false , "get():: No valid data at '" + location + "'" ) ;
}
// no valid data
if (checkData)
common.Assert ( false , "get():: No data at '" + location + "'" ) ;
// the fictive return
return return_type () ;
}

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v25r0/GaudiAlg/GaudiAlg/GetData.h