| The Gaudi Framework v32r1 (f65d50dc)

Classes | Typedefs | Functions
details Namespace Reference

## Classes
struct | arg_helper
struct | arg_helper< Ret(T::*)(Arg) const >
class | GenericDataStoreAgent
struct | Payload_helper
struct | Payload_helper< Gaudi::Range_< T > >
struct | reverse_wrapper

## Typedefs
template<typename T >
using | Converter_t = T(*)(const DataObject *)
template<typename T >
using | Payload_t = typename Payload_helper< T >::type
template<typename lambda >
using | argument_t = typename arg_helper< lambda >::type

## Functions
template<typename T , typename... Args>
constexpr auto | size (const T &, Args &&...) noexcept
template<typename Range , typename StorageType >
Range | make_range (const DataObject *obj)
template<typename ValueType , typename Range = Gaudi::Range_<typename ValueType::ConstVector>>
Converter_t< Range > | select_range_converter (const DataObject *obj)
template<typename T >
bool | verifyType (const DataObject *dataObj)
template<typename Fun >
auto | add_deref (Fun f)
template<typename Proj , typename Cmp = std::greater<>>
auto | make_cmp (Proj p, Cmp cmp={})
template<class T >
std::remove_const_t< T > * | nonConst (T *p)
| Cast a pointer to a non const type. More...
template<typename T >
auto | begin (reverse_wrapper< T > &w)
template<typename T >
auto | end (reverse_wrapper< T > &w)

## Typedef Documentation

## ◆ argument_t

template<typename lambda >

using details::argument_t = typedef typename arg_helper<lambda>::type

Definition at line 33 of file EventIDBase.h.

## ◆ Converter_t

template<typename T >

using details::Converter_t = typedef T ( * )( const DataObject* )

Definition at line 18 of file DataObjectHandle.h.

## ◆ Payload_t

template<typename T >

using details::Payload_t = typedef typename Payload_helper<T>::type

Definition at line 72 of file DataObjectHandle.h.

## Function Documentation

## ◆ add_deref()

template<typename Fun >

auto details::add_deref | ( | Fun | f | ) |

Definition at line 36 of file EventIDBase.h.

36 {
37 return compose( f, [=]( auto*... p ) { return f( *p... ); } );
38 }
compose
auto compose(lambda_ts &&... lambdas)
Definition: compose.h:36

## ◆ begin()

template<typename T >

auto details::begin | ( | reverse_wrapper< T > & | w | ) |

Definition at line 37 of file reverse.h.

37 {
38 using std::rbegin;
39 return rbegin( w.iterable );
40 }

## ◆ end()

template<typename T >

auto details::end | ( | reverse_wrapper< T > & | w | ) |

Definition at line 42 of file reverse.h.

42 {
43 using std::rend;
44 return rend( w.iterable );
45 }

## ◆ make_cmp()

template<typename Proj , typename Cmp = std::greater<>>

auto details::make_cmp | ( | Proj | p,
|  | Cmp | cmp = `{}`
| ) |  |

Definition at line 41 of file EventIDBase.h.

41 {} ) {
42 static_assert( std::is_reference_v<argument_t<Proj>>, "must be a reference" );
43 static_assert( std::is_const_v<std::remove_reference_t<argument_t<Proj>>>, "must be const" );
44 return [=]( argument_t<Proj> lhs, argument_t<Proj> rhs ) { return cmp( p( lhs ), p( rhs ) ); };
45 }

## ◆ make_range()

template<typename Range , typename StorageType >

Range details::make_range | ( | const DataObject * | obj | ) |

Definition at line 21 of file DataObjectHandle.h.

21 {
22 auto c = static_cast<const StorageType*>( obj );
23 if ( UNLIKELY( !c ) ) return Range();
24 using std::begin;
25 using std::end;
26 auto first = begin( *c );
27 auto last = end( *c );
28 // return Range( first, last );
29 auto _first = reinterpret_cast<typename Range::const_iterator*>( &first );
30 auto _last = reinterpret_cast<typename Range::const_iterator*>( &last );
31 return Range( *_first, *_last );
32 }
UNLIKELY
#define UNLIKELY(x)
Definition: Kernel.h:96
gaudirun.c
c
Definition: gaudirun.py:487
std::end
T end(T... args)
IOTest.end
def end
Definition: IOTest.py:112
std::begin
T begin(T... args)
Gaudi::Utils::begin
AttribStringParser::Iterator begin(const AttribStringParser &parser)
Definition: AttribStringParser.h:120

## ◆ nonConst()

template<class T >

std::remove_const_t<T>* details::nonConst | ( | T * | p | ) |

Cast a pointer to a non const type.

Definition at line 20 of file GaudiHandle.h.

20 {
21 return const_cast<std::remove_const_t<T>*>( p );
22 }

## ◆ select_range_converter()

template<typename ValueType , typename Range = Gaudi::Range_<typename ValueType::ConstVector>>

Converter_t<Range> details::select_range_converter | ( | const DataObject * | obj | ) |

Definition at line 35 of file DataObjectHandle.h.

35 {
36 using Selection = typename ValueType::Selection;
37 auto sel = dynamic_cast<const Selection*>( obj );
38 if ( sel ) return &make_range<Range, typename ValueType::Selection>;
39 auto con = dynamic_cast<std::add_const_t<typename ValueType::Container>*>( obj );
40 if ( con ) return &make_range<Range, typename ValueType::Container>;
41 return nullptr;
42 }
IOTest.sel
sel
Definition: IOTest.py:93

## ◆ size()

template<typename T , typename... Args>

constexpr auto details::size | ( | const T & | ,
|  | Args && | ...
| ) |  |
| noexcept

Definition at line 14 of file AnyDataWrapper.h.

14 {
15 static_assert( sizeof...( Args ) == 0, "No extra args please" );
16 return std::nullopt;
17 }

## ◆ verifyType()

template<typename T >

bool details::verifyType | ( | const DataObject * | dataObj | ) |

Definition at line 45 of file DataObjectHandle.h.

45 {
46 using Type = std::add_const_t<T>;
47 assert( dataObj != nullptr );
48 auto obj = dynamic_cast<Type*>( dataObj );
49 bool ok = ( obj != nullptr );
50 if ( !ok ) {
51 const auto* registry = dataObj->registry();
52 throw GaudiException( "The type expected for " + registry->identifier() + " is " +
53 System::typeinfoName( typeid( Type ) ) +
54 " and is different from the one of the object in the store which is " +
55 System::typeinfoName( typeid( *dataObj ) ) + ".",
56 "Wrong DataObjectType", StatusCode::FAILURE );
57 }
58 assert( obj == static_cast<Type*>( dataObj ) );
59 return ok;
60 }
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:21
DataObject::registry
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:72
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:298
GaudiPluginService.cpluginsvc.registry
def registry()
Definition: cpluginsvc.py:71
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
Tuples::Type
Type
the list of available types for ntuples
Definition: TupleObj.h:79