Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v32r0 (3325bb39)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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

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

Definition at line 33 of file EventIDBase.h.

template<typename T >
using details::Converter_t = typedef T ( * )( const DataObject* )

Definition at line 18 of file DataObjectHandle.h.

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

Definition at line 72 of file DataObjectHandle.h.

Function Documentation

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  }
auto compose(lambda_ts &&...lambdas)
Definition: compose.h:36
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  }
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  }
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<argument_t<Proj>>::value, "must be a reference" );
43  static_assert( std::is_const<std::remove_reference_t<argument_t<Proj>>>::value, "must be const" );
44  return [=]( argument_t<Proj> lhs, argument_t<Proj> rhs ) { return cmp( p( lhs ), p( rhs ) ); };
45  }
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  }
#define UNLIKELY(x)
Definition: Kernel.h:89
T end(T...args)
T begin(T...args)
AttribStringParser::Iterator begin(const AttribStringParser &parser)
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  }
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  }
sel
Definition: IOTest.py:93
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 boost::none;
17  }
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  }
Define general base for Gaudi exception.
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:298
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:72
constexpr static const auto FAILURE
Definition: StatusCode.h:86
Type
the list of available types for ntuples
Definition: TupleObj.h:79