The Gaudi Framework  master (37c0b60a)
DataObjectHandle.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #pragma once
12 
17 #include <GaudiKernel/IProperty.h>
18 #include <GaudiKernel/IRegistry.h>
19 #include <GaudiKernel/NamedRange.h>
20 #include <boost/algorithm/string/replace.hpp>
21 #include <type_traits>
22 
23 //---------------------------------------------------------------------------
24 //
25 namespace details {
26  template <typename T>
27  using Converter_t = T ( * )( const DataObject* );
28 
29  template <typename Range, typename StorageType>
30  Range make_range( const DataObject* obj ) {
31  auto c = static_cast<const StorageType*>( obj );
32  if ( !c ) return Range();
33  using std::begin;
34  using std::end;
35  auto first = begin( *c );
36  auto last = end( *c );
37  auto _first = reinterpret_cast<typename Range::const_iterator*>( &first );
38  auto _last = reinterpret_cast<typename Range::const_iterator*>( &last );
39  return Range( *_first, *_last );
40  }
41 
42  template <typename ValueType, typename Range = Gaudi::Range_<typename ValueType::ConstVector>>
44  using Selection = typename ValueType::Selection;
45  auto sel = dynamic_cast<const Selection*>( obj );
46  if ( sel ) return &make_range<Range, typename ValueType::Selection>;
47  auto con = dynamic_cast<std::add_const_t<typename ValueType::Container>*>( obj );
48  if ( con ) return &make_range<Range, typename ValueType::Container>;
49  return nullptr;
50  }
51 
52  template <typename T>
53  bool verifyType( const DataObject* dataObj ) {
54  using Type = std::add_const_t<T>;
55  assert( dataObj != nullptr );
56  auto obj = dynamic_cast<Type*>( dataObj );
57  bool ok = ( obj != nullptr );
58  if ( !ok ) {
59  const auto* registry = dataObj->registry();
60  throw GaudiException( "The type expected for " + registry->identifier() + " is " +
61  System::typeinfoName( typeid( Type ) ) +
62  " and is different from the one of the object in the store which is " +
63  System::typeinfoName( typeid( *dataObj ) ) + ".",
64  "Wrong DataObjectType", StatusCode::FAILURE );
65  }
66  assert( obj == static_cast<Type*>( dataObj ) );
67  return ok;
68  }
69 
70  template <Gaudi::DataHandle::Mode, typename T, typename U>
71  struct Payload_helper {
72  using type =
73  std::conditional_t<std::is_base_of_v<DataObject, T> && std::is_same_v<T, U>, T,
74  std::conditional_t<std::is_same_v<T, U>, AnyDataWrapper<std::remove_const_t<T>>,
75  AnyDataWithViewWrapper<std::remove_const_t<T>, std::remove_const_t<U>>>>;
76  };
77  template <typename T, typename U>
80  };
81  template <typename T, typename U>
84  };
85  template <typename T, typename U>
86  struct Payload_helper<Gaudi::DataHandle::Reader, std::optional<Gaudi::NamedRange_<T>>, U> {
87  using type = std::optional<Gaudi::NamedRange_<T>>;
88  };
89 
90  template <Gaudi::DataHandle::Mode mode, typename T, typename U = T>
92 
93 } // namespace details
94 
95 //---------------------------------------------------------------------------
96 
107 //---------------------------------------------------------------------------
108 
109 template <typename T>
110 class DataObjectHandle : public DataObjectHandleBase {
111 public:
113 
117  T* get() const { return get( true ); }
118 
123  T* getIfExists() const { return get( false ); }
124 
128  bool exist() const { return get( false ) != nullptr; }
129 
133  T* getOrCreate() const;
134 
138  T* put( std::unique_ptr<T> object ) const;
139 
140  [[deprecated( "please pass a std::unique_ptr instead of a raw pointer" )]] T* put( T* object ) const {
141  return put( std::unique_ptr<T>( object ) );
142  }
143 
144  std::string pythonRepr() const override {
145  auto repr = DataObjectHandleBase::pythonRepr();
146  boost::replace_all( repr, default_type, System::typeinfoName( typeid( T ) ) );
147  return repr;
148  }
149 
150 private:
151  T* get( bool mustExist ) const;
152  mutable bool m_goodType = false;
153 };
154 
155 //---------------------------------------------------------------------------
156 //
164 template <typename T>
165 T* DataObjectHandle<T>::get( bool mustExist ) const {
166  auto dataObj = fetch();
167  if ( !dataObj ) {
168  if ( mustExist ) { // Problems in getting from the store
169  throw GaudiException( "Cannot retrieve \'" + objKey() + "\' from transient store.",
170  m_owner ? owner()->name() : "no owner", StatusCode::FAILURE );
171  }
172  return nullptr;
173  }
174  if ( !m_goodType ) m_goodType = ::details::verifyType<T>( dataObj );
175  return static_cast<T*>( dataObj );
176 }
177 
178 //---------------------------------------------------------------------------
179 template <typename T>
181  assert( m_init );
182  StatusCode sc = m_EDS->registerObject( objKey(), objectp.get() );
183  if ( !sc.isSuccess() ) { throw GaudiException( "Error in put of " + objKey(), "DataObjectHandle<T>::put", sc ); }
184  return objectp.release();
185 }
186 
187 //---------------------------------------------------------------------------
188 template <typename T>
190  T* obj = get( false );
191  return obj ? obj : put( std::make_unique<T>() );
192 }
193 
194 //---------------------------------------------------------------------------
196 
197 template <typename T>
198 class DataObjectHandle<Gaudi::Range_<T>> : public DataObjectHandleBase {
199 public:
200  using ValueType = std::remove_cv_t<std::remove_pointer_t<typename T::value_type>>;
202 
204 
208  Range get() const;
209 
210  std::string pythonRepr() const override {
211  auto repr = DataObjectHandleBase::pythonRepr();
212  boost::replace_all( repr, default_type, System::typeinfoName( typeid( Gaudi::Range_<T> ) ) );
213  return repr;
214  }
215 
216 private:
217  mutable ::details::Converter_t<Range> m_converter = nullptr;
218 };
219 
220 template <typename ValueType>
221 auto DataObjectHandle<Gaudi::Range_<ValueType>>::get() const -> Range {
222  auto dataObj = fetch();
223  if ( !dataObj ) {
224  throw GaudiException( "Cannot retrieve \'" + objKey() + "\' from transient store.",
225  m_owner ? owner()->name() : "no owner", StatusCode::FAILURE );
226  }
227  if ( !m_converter ) {
228  m_converter = ::details::select_range_converter<ValueType>( dataObj );
229  if ( !m_converter ) {
230  throw GaudiException( "The type requested for " + objKey() + " (" + System::typeinfoName( typeid( ValueType ) ) +
231  ")" + " cannot be obtained from object in event store" + " (" +
232  System::typeinfoName( typeid( *dataObj ) ) + ").",
233  "Wrong DataObjectType", StatusCode::FAILURE );
234  }
235  }
236  return ( *m_converter )( dataObj );
237 }
238 
239 //---------------------------------------------------------------------------
241 
242 template <typename T>
243 class DataObjectHandle<Gaudi::NamedRange_<T>> : public DataObjectHandleBase {
244 public:
245  using ValueType = std::remove_cv_t<std::remove_pointer_t<typename T::value_type>>;
247 
249 
253  Range get() const;
254 
255  std::string pythonRepr() const override {
256  auto repr = DataObjectHandleBase::pythonRepr();
257  boost::replace_all( repr, default_type, System::typeinfoName( typeid( Gaudi::NamedRange_<T> ) ) );
258  return repr;
259  }
260 
261 private:
262  mutable ::details::Converter_t<Range> m_converter = nullptr;
263 };
264 
265 template <typename ValueType>
267  auto dataObj = fetch();
268  if ( !dataObj ) {
269  throw GaudiException( "Cannot retrieve \'" + objKey() + "\' from transient store.",
270  m_owner ? owner()->name() : "no owner", StatusCode::FAILURE );
271  }
272  if ( !m_converter ) {
273  m_converter = ::details::select_range_converter<ValueType, Range>( dataObj );
274  if ( !m_converter ) {
275  throw GaudiException( "The type requested for " + objKey() + " (" + System::typeinfoName( typeid( ValueType ) ) +
276  ")" + " cannot be obtained from object in event store" + " (" +
277  System::typeinfoName( typeid( *dataObj ) ) + ").",
278  "Wrong DataObjectType", StatusCode::FAILURE );
279  }
280  }
281  return ( *m_converter )( dataObj );
282 }
283 
284 //
285 //---------------------------------------------------------------------------
287 
288 template <typename T>
289 class DataObjectHandle<std::optional<Gaudi::NamedRange_<T>>> : public DataObjectHandleBase {
290 public:
291  using ValueType = std::remove_cv_t<std::remove_pointer_t<typename T::value_type>>;
293 
295 
299  std::optional<Range> get() const;
300 
301  std::string pythonRepr() const override {
302  auto repr = DataObjectHandleBase::pythonRepr();
303  boost::replace_all( repr, default_type, System::typeinfoName( typeid( std::optional<Gaudi::NamedRange_<T>> ) ) );
304  return repr;
305  }
306 
307 private:
308  mutable ::details::Converter_t<Range> m_converter = nullptr;
309 };
310 
311 template <typename ValueType>
313  auto dataObj = fetch();
314  if ( !dataObj ) return std::nullopt;
315  if ( !m_converter ) {
316  m_converter = ::details::select_range_converter<ValueType, Range>( dataObj );
317  if ( !m_converter ) {
318  throw GaudiException( "The type requested for " + objKey() + " (" + System::typeinfoName( typeid( ValueType ) ) +
319  ")" + " cannot be obtained from object in event store" + " (" +
320  System::typeinfoName( typeid( *dataObj ) ) + ").",
321  "Wrong DataObjectType", StatusCode::FAILURE );
322  }
323  }
324  return ( *m_converter )( dataObj );
325 }
326 
327 //---------------------------------------------------------------------------
329 template <typename T>
331 public:
333 
337  T* get() const { return &_get( true )->getData(); }
338  T* getIfExists() const {
339  auto data = _get( false );
340  return data ? &data->getData() : nullptr;
341  }
342 
346  const T* put( T&& obj ) const {
347  assert( m_init );
348  auto objectp = std::make_unique<AnyDataWrapper<T>>( std::move( obj ) );
349  if ( auto sc = m_EDS->registerObject( objKey(), objectp.get() ); sc.isFailure() ) {
350  throw GaudiException( "Error in put of " + objKey(), "DataObjectHandle<AnyDataWrapper<T>>::put", sc );
351  }
352  return &objectp.release()->getData();
353  }
354 
358  std::optional<std::size_t> size() const { return _get()->size(); }
359 
360  std::string pythonRepr() const override {
361  auto repr = DataObjectHandleBase::pythonRepr();
362  boost::replace_all( repr, default_type, System::typeinfoName( typeid( T ) ) );
363  return repr;
364  }
365 
366 private:
367  AnyDataWrapper<T>* _get( bool mustExist ) const {
368  auto obj = fetch();
369  if ( !obj ) {
370  if ( mustExist ) {
371  throw GaudiException( "Cannot retrieve \'" + objKey() + "\' from transient store.",
372  m_owner ? owner()->name() : "no owner", StatusCode::FAILURE );
373 
374  } else {
375  return nullptr;
376  }
377  }
378  if ( !m_goodType ) m_goodType = ::details::verifyType<AnyDataWrapper<T>>( obj );
379  return static_cast<AnyDataWrapper<T>*>( obj );
380  }
381  mutable bool m_goodType = false;
382 };
383 
384 //---------------------------------------------------------------------------
386 template <typename View, typename Owned>
388 public:
390 
394  View* get() const { return &_get( true )->getData(); }
395  View* getIfExists() const {
396  auto data = _get( false );
397  return data ? &data->getData() : nullptr;
398  }
399 
404  assert( m_init );
405  if ( auto sc = m_EDS->registerObject( objKey(), objectp.get() ); sc.isFailure() ) {
406  throw GaudiException( "Error in put of " + objKey(), "DataObjectHandle<AnyDataWithViewWrapper<T>::put", sc );
407  }
408  return &objectp.release()->getData();
409  }
410  const View* put( Owned&& obj ) const {
411  return put( std::make_unique<AnyDataWithViewWrapper<View, Owned>>( std::move( obj ) ) );
412  }
413 
417  std::optional<std::size_t> size() const { return _get()->size(); }
418 
419  std::string pythonRepr() const override {
420  auto repr = DataObjectHandleBase::pythonRepr();
421  boost::replace_all( repr, default_type, System::typeinfoName( typeid( View ) ) );
422  return repr;
423  }
424 
425 private:
426  AnyDataWithViewWrapper<View, Owned>* _get( bool mustExist ) const {
427  auto obj = fetch();
428  if ( !obj ) {
429  if ( mustExist ) {
430  throw GaudiException( "Cannot retrieve \'" + objKey() + "\' from transient store.",
431  m_owner ? owner()->name() : "no owner", StatusCode::FAILURE );
432 
433  } else {
434  return nullptr;
435  }
436  }
437  if ( !m_goodType ) m_goodType = ::details::verifyType<AnyDataWithViewWrapper<View, Owned>>( obj );
438  return static_cast<AnyDataWithViewWrapper<View, Owned>*>( obj );
439  }
440  mutable bool m_goodType = false;
441 };
442 
443 //---------------------------- user-facing interface ----------
444 namespace details {
445  template <typename T, typename U = T>
447  template <typename T, typename U = T>
449 } // namespace details
450 
451 template <typename T>
453  template <typename... Args, std::size_t... Is>
454  DataObjectReadHandle( std::tuple<Args...>&& args, std::index_sequence<Is...> )
455  : DataObjectReadHandle( std::get<Is>( std::move( args ) )... ) {}
456 
457 public:
459  : ::details::ReadHandle<T>{ k, Gaudi::DataHandle::Reader, owner } {}
460 
463  template <typename OWNER, typename K, typename = std::enable_if_t<std::is_base_of_v<IProperty, OWNER>>>
464  DataObjectReadHandle( OWNER* owner, std::string propertyName, K key = {}, std::string doc = "" )
466  std::move( doc ) ) {}
467 
468  template <typename... Args>
470  : DataObjectReadHandle( std::move( args ), std::index_sequence_for<Args...>{} ) {}
471 };
472 
473 template <typename T, typename U = T>
475  template <typename... Args, std::size_t... Is>
476  DataObjectWriteHandle( std::tuple<Args...>&& args, std::index_sequence<Is...> )
477  : DataObjectWriteHandle( std::get<Is>( std::move( args ) )... ) {}
478 
479 public:
481  : ::details::WriteHandle<T, U>{ k, Gaudi::DataHandle::Writer, owner } {}
482 
485  template <typename OWNER, typename K, typename = std::enable_if_t<std::is_base_of_v<IProperty, OWNER>>>
486  DataObjectWriteHandle( OWNER* owner, std::string propertyName, K key = {}, std::string doc = "" )
488  std::move( doc ) ) {}
489 
490  template <typename... Args>
492  : DataObjectWriteHandle( std::move( args ), std::index_sequence_for<Args...>{} ) {}
493 };
IDataHandleHolder
Definition: IDataHandleHolder.h:24
details::WriteHandle
DataObjectHandle< Payload_t< Gaudi::DataHandle::Writer, T, U > > WriteHandle
Definition: DataObjectHandle.h:446
DataObjectWriteHandle::DataObjectWriteHandle
DataObjectWriteHandle(OWNER *owner, std::string propertyName, K key={}, std::string doc="")
Autodeclaring constructor with property name, mode, key and documentation.
Definition: DataObjectHandle.h:486
DataObjectHandle< Gaudi::NamedRange_< T > >::get
Range get() const
Retrieve object from transient data store.
DataObjectHandle< AnyDataWithViewWrapper< View, Owned > >::pythonRepr
std::string pythonRepr() const override
Definition: DataObjectHandle.h:419
DataObjectWriteHandle
Definition: DataObjectHandle.h:474
DataObjectHandle< std::optional< Gaudi::NamedRange_< T > > >::get
std::optional< Range > get() const
Retrieve object from transient data store.
DataObjectHandle< Gaudi::Range_< T > >::ValueType
std::remove_cv_t< std::remove_pointer_t< typename T::value_type > > ValueType
Definition: DataObjectHandle.h:200
std::string
STL class.
AnyDataWrapper.h
DataObjectHandle::m_goodType
bool m_goodType
Definition: DataObjectHandle.h:152
DataObjectWriteHandle::DataObjectWriteHandle
DataObjectWriteHandle(std::tuple< Args... > &&args, std::index_sequence< Is... >)
Definition: DataObjectHandle.h:476
cpluginsvc.registry
def registry()
Definition: cpluginsvc.py:83
Gaudi::NamedRange_
Definition: NamedRange.h:52
std::move
T move(T... args)
StatusCode::isSuccess
bool isSuccess() const
Definition: StatusCode.h:314
DataObjectHandle::getOrCreate
T * getOrCreate() const
Get object from store or create a new one if it doesn't exist.
Definition: DataObjectHandle.h:189
GaudiException.h
DataObjectHandle< Gaudi::NamedRange_< T > >::ValueType
std::remove_cv_t< std::remove_pointer_t< typename T::value_type > > ValueType
Definition: DataObjectHandle.h:245
GaudiException
Definition: GaudiException.h:31
GaudiPartProp.decorators.get
get
decorate the vector of properties
Definition: decorators.py:283
NamedRange.h
DataObjectHandle< AnyDataWrapper< T > >::put
const T * put(T &&obj) const
Register object in transient store.
Definition: DataObjectHandle.h:346
details::Payload_helper< Gaudi::DataHandle::Reader, std::optional< Gaudi::NamedRange_< T > >, U >::type
std::optional< Gaudi::NamedRange_< T > > type
Definition: DataObjectHandle.h:87
NewInputWrite.fetch
fetch
Definition: NewInputWrite.py:45
std::unique_ptr::get
T get(T... args)
DataObjectReadHandle::DataObjectReadHandle
DataObjectReadHandle(OWNER *owner, std::string propertyName, K key={}, std::string doc="")
Autodeclaring constructor with property name, mode, key and documentation.
Definition: DataObjectHandle.h:464
std::unique_ptr::release
T release(T... args)
std::tuple
details::verifyType
bool verifyType(const DataObject *dataObj)
Definition: DataObjectHandle.h:53
gaudirun.c
c
Definition: gaudirun.py:525
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:315
DataObjectHandle< std::optional< Gaudi::NamedRange_< T > > >::pythonRepr
std::string pythonRepr() const override
Definition: DataObjectHandle.h:301
details::Payload_helper
Definition: DataObjectHandle.h:71
DataObjectHandle
DataObjectHandle.h GaudiKernel/DataObjectHandle.h.
Definition: AlgTool.h:36
Gaudi::DataHandle::Writer
@ Writer
Definition: DataHandle.h:40
DataObjectHandle::exist
bool exist() const
Check the existence of the object in the transient store.
Definition: DataObjectHandle.h:128
DataObjectHandle< AnyDataWithViewWrapper< View, Owned > >::getIfExists
View * getIfExists() const
Definition: DataObjectHandle.h:395
DataObjectHandle< AnyDataWrapper< T > >::get
T * get() const
Retrieve object from transient data store.
Definition: DataObjectHandle.h:337
details::Payload_helper::type
std::conditional_t< std::is_base_of_v< DataObject, T > &&std::is_same_v< T, U >, T, std::conditional_t< std::is_same_v< T, U >, AnyDataWrapper< std::remove_const_t< T > >, AnyDataWithViewWrapper< std::remove_const_t< T >, std::remove_const_t< U > >> > type
Definition: DataObjectHandle.h:75
DataObjectHandle::get
T * get() const
Retrieve object from transient data store.
Definition: DataObjectHandle.h:117
StatusCode
Definition: StatusCode.h:65
details
Definition: AnyDataWrapper.h:19
DataObjectHandle< AnyDataWithViewWrapper< View, Owned > >::_get
AnyDataWithViewWrapper< View, Owned > * _get(bool mustExist) const
Definition: DataObjectHandle.h:426
DataObjectHandle::put
T * put(T *object) const
Definition: DataObjectHandle.h:140
DataObjectHandleBase
DataObjectHandleBase GaudiKernel/DataObjectHandleBase.h.
Definition: DataObjectHandleBase.h:35
DataObjectReadHandle
Definition: DataObjectHandle.h:452
details::make_range
Range make_range(const DataObject *obj)
Definition: DataObjectHandle.h:30
DataObjectHandle::get
T * get(bool mustExist) const
Try to retrieve from the transient store.
Definition: DataObjectHandle.h:165
GaudiPython.Bindings.nullptr
nullptr
Definition: Bindings.py:87
DataObjectReadHandle::DataObjectReadHandle
DataObjectReadHandle(const DataObjID &k, IDataHandleHolder *owner)
Definition: DataObjectHandle.h:458
AnyDataWrapper
Definition: AnyDataWrapper.h:55
details::begin
auto begin(reverse_wrapper< T > &w)
Definition: reverse.h:47
IRegistry.h
DataObjectHandle< std::optional< Gaudi::NamedRange_< T > > >::ValueType
std::remove_cv_t< std::remove_pointer_t< typename T::value_type > > ValueType
Definition: DataObjectHandle.h:291
Gaudi
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition: __init__.py:1
IOTest.sel
sel
Definition: IOTest.py:106
AnyDataWithViewWrapper
Definition: AnyDataWrapper.h:78
DataObjID
Definition: DataObjID.h:47
DataObjectWriteHandle::DataObjectWriteHandle
DataObjectWriteHandle(const DataObjID &k, IDataHandleHolder *owner)
Definition: DataObjectHandle.h:480
DataObjectHandle< AnyDataWrapper< T > >::size
std::optional< std::size_t > size() const
Size of boxed item, if boxed item has a 'size' method.
Definition: DataObjectHandle.h:358
details::select_range_converter
Converter_t< Range > select_range_converter(const DataObject *obj)
Definition: DataObjectHandle.h:43
DataObjectHandle< AnyDataWrapper< T > >::pythonRepr
std::string pythonRepr() const override
Definition: DataObjectHandle.h:360
Gaudi::Range_
Definition: Range.h:94
DataObjectWriteHandle::DataObjectWriteHandle
DataObjectWriteHandle(std::tuple< Args... > &&args)
Definition: DataObjectHandle.h:491
DataObjectHandle::put
T * put(std::unique_ptr< T > object) const
Register object in transient store.
Definition: DataObjectHandle.h:180
ConditionsStallTest.name
name
Definition: ConditionsStallTest.py:77
gaudirun.args
args
Definition: gaudirun.py:336
IDataHandleHolder.h
std::begin
T begin(T... args)
std
STL namespace.
details::Payload_t
typename Payload_helper< mode, T, U >::type Payload_t
Definition: DataObjectHandle.h:91
Gaudi::DataHandle::pythonRepr
virtual std::string pythonRepr() const
Definition: DataHandle.cpp:19
DataObjectHandleBase.h
DataObject
Definition: DataObject.h:36
Gaudi::DataHandle::Reader
@ Reader
Definition: DataHandle.h:40
details::Converter_t
T(*)(const DataObject *) Converter_t
Definition: DataObjectHandle.h:27
DataObjectHandleBase::DataObjectHandleBase
DataObjectHandleBase(DataObjID k, Gaudi::DataHandle::Mode a, IDataHandleHolder *owner)
Definition: DataObjectHandleBase.cpp:47
std::size_t
IProperty.h
DataObjectHandle< AnyDataWithViewWrapper< View, Owned > >::get
View * get() const
Retrieve object from transient data store.
Definition: DataObjectHandle.h:394
std::end
T end(T... args)
DataObjectHandle::pythonRepr
std::string pythonRepr() const override
Definition: DataObjectHandle.h:144
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:101
DataObjectHandle::getIfExists
T * getIfExists() const
Bypass check of existence of object in transient store Only uses main location of the.
Definition: DataObjectHandle.h:123
DataObjectHandle< AnyDataWrapper< T > >::getIfExists
T * getIfExists() const
Definition: DataObjectHandle.h:338
DataObjectHandle< AnyDataWrapper< T > >::_get
AnyDataWrapper< T > * _get(bool mustExist) const
Definition: DataObjectHandle.h:367
details::ReadHandle
DataObjectHandle< Payload_t< Gaudi::DataHandle::Reader, T, U > > ReadHandle
Definition: DataObjectHandle.h:448
DataObjectHandle< AnyDataWithViewWrapper< View, Owned > >::put
const View * put(std::unique_ptr< AnyDataWithViewWrapper< View, Owned >> objectp) const
Register object in transient store.
Definition: DataObjectHandle.h:403
DataObjectHandle< Gaudi::Range_< T > >::get
Range get() const
Retrieve object from transient data store.
DataObjectHandle< AnyDataWithViewWrapper< View, Owned > >::put
const View * put(Owned &&obj) const
Definition: DataObjectHandle.h:410
std::unique_ptr
STL class.
ProduceConsume.key
key
Definition: ProduceConsume.py:84
DataObject::registry
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:78
DataObjectReadHandle::DataObjectReadHandle
DataObjectReadHandle(std::tuple< Args... > &&args, std::index_sequence< Is... >)
Definition: DataObjectHandle.h:454
DataObjectReadHandle::DataObjectReadHandle
DataObjectReadHandle(std::tuple< Args... > &&args)
Definition: DataObjectHandle.h:469
compareOutputFiles.Reader
Reader
Definition: compareOutputFiles.py:489
Gaudi::Functional::details::put
auto put(const DataObjectHandle< Out1 > &out_handle, Out2 &&out)
Definition: details.h:168
DataObjectHandle< Gaudi::NamedRange_< T > >::pythonRepr
std::string pythonRepr() const override
Definition: DataObjectHandle.h:255
DataObjectHandle< AnyDataWithViewWrapper< View, Owned > >::size
std::optional< std::size_t > size() const
Size of boxed item, if boxed item has a 'size' method.
Definition: DataObjectHandle.h:417
details::end
auto end(reverse_wrapper< T > &w)
Definition: reverse.h:52
DataObjectHandle< Gaudi::Range_< T > >::pythonRepr
std::string pythonRepr() const override
Definition: DataObjectHandle.h:210