The Gaudi Framework  v38r0 (2143aa4c)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
GetData.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2019 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 #ifndef GAUDIUTILS_GETDATA_H
12 #define GAUDIUTILS_GETDATA_H 1
13 // ============================================================================
14 // Include files
15 // ============================================================================
16 // GaudiKernel
17 // ============================================================================
20 #include "GaudiKernel/IRegistry.h"
21 #include "GaudiKernel/MsgStream.h"
23 #include "GaudiKernel/StatusCode.h"
24 // ============================================================================
25 // GaudiUtils
26 // ============================================================================
28 #include "GaudiKernel/NamedRange.h"
29 #include "GaudiKernel/Range.h"
30 // ============================================================================
31 // Forward declaration
32 // ============================================================================
33 template <class BASE>
34 class GaudiCommon; // GaudiAlg
35 // ============================================================================
36 namespace Gaudi {
37  namespace Utils {
38  // ========================================================================
45  template <class TYPE>
46  struct _GetType {
47  typedef TYPE* return_type;
48  };
49  // ========================================================================
51  template <class TYPE>
52  struct _GetType<TYPE*> {
53  typedef TYPE* return_type;
54  };
55  // ========================================================================
57  template <class TYPE>
58  struct _GetType<TYPE&> {
59  typedef TYPE* return_type;
60  };
61  // ========================================================================
63  template <class CONTAINER>
64  struct _GetType<Gaudi::Range_<CONTAINER>> {
66  };
67  // ========================================================================
69  template <class CONTAINER>
70  struct _GetType<Gaudi::NamedRange_<CONTAINER>> {
72  };
73  // ========================================================================
78  template <class TYPE, std::enable_if_t<!std::is_constructible_v<TYPE>, void*> = nullptr>
79  typename _GetType<TYPE>::return_type getFromTS( IDataProviderSvc* service, std::string_view location ) {
80  DataObject* obj = nullptr;
81  // Return the casted pointer if the retrieve was successful or nullptr otherwise.
82  return service->retrieveObject( location, obj ).isSuccess()
83  ? dynamic_cast<typename _GetType<TYPE>::return_type>( obj )
84  : nullptr;
85  }
86  // ========================================================================
92  template <class TYPE, std::enable_if_t<std::is_constructible_v<TYPE>, void*> = nullptr>
93  typename _GetType<TYPE>::return_type getFromTS( IDataProviderSvc* service, std::string_view location ) {
94  DataObject* obj = nullptr;
95  // Return the casted pointer if the retrieve was successful or nullptr otherwise.
96  StatusCode sc = service->retrieveObject( location, obj );
97  if ( sc.isFailure() ) return nullptr;
98  auto tobj = dynamic_cast<typename _GetType<TYPE>::return_type>( obj );
99  if ( !tobj ) {
100  // try with AnyDataWrapper
101  if ( auto tobj2 = dynamic_cast<AnyDataWrapper<TYPE>*>( obj ); tobj2 ) { tobj = &( tobj2->getData() ); }
102  }
103  return tobj;
104  }
105  // ========================================================================
114  template <class TYPE>
115  struct GetData {
116  public:
117  // ======================================================================
118  typedef TYPE Type;
121  // ======================================================================
122  public:
123  // ======================================================================
131  template <class COMMON>
132  return_type operator()( const COMMON& common, IDataProviderSvc* service, std::string_view location,
133  const bool checkData = true ) const {
134  // use Data Provider Service
135  return_type obj = getFromTS<Type>( service, location );
136  if ( checkData ) { // check the data
137  common.Assert( obj, std::string{ "get():: No valid data at '" }.append( location ).append( "'" ) );
138  }
139  // debug printout
140  if ( common.msgLevel( MSG::DEBUG ) ) {
141  common.debug() << "The object of type '" << System::typeinfoName( typeid( obj ) ) << "' "
142  << ( obj ? "has been" : "could not be" ) << " retrieved from TS at address '" << location
143  << "'" << endmsg;
144  }
145  // return located data
146  return obj;
147  // ======================================================================
148  }
149  };
150  // ========================================================================
152  template <class TYPE>
153  struct GetData<Gaudi::Range_<std::vector<const TYPE*>>> {
154  public:
155  // ======================================================================
159  // ======================================================================
160  public:
161  // ======================================================================
169  template <class COMMON>
170  return_type operator()( const COMMON& common, IDataProviderSvc* service, std::string_view location,
171  const bool checkData = true ) const {
174  DataObject* object = this->getData( service, std::string{ location } );
175  if ( object ) {
177  typedef typename TYPE::Selection Selection_;
178  const Selection_* sel = dynamic_cast<Selection_*>( object );
179  if ( sel ) {
180  if ( common.msgLevel( MSG::DEBUG ) ) {
181  common.debug() << "The object of type '" << System::typeinfoName( typeid( *object ) )
182  << "' has been retrieved from TS at address '" << location << "'" << endmsg;
183  }
184  return make_range( sel );
185  }
187  typedef typename TYPE::Container Container_;
188  const Container_* cnt = dynamic_cast<Container_*>( object );
189  if ( cnt ) {
190  if ( common.msgLevel( MSG::DEBUG ) ) {
191  common.debug() << "The object of type '" << System::typeinfoName( typeid( *object ) )
192  << "' has been retrieved from TS at address '" << location << "'" << endmsg;
193  }
194  return make_range( cnt );
195  }
196  // no valid data
197  if ( checkData )
198  common.Assert( false, std::string{ "get():: No valid data at '" }.append( location ).append( "'" ) );
199  }
200  // no valid data
201  if ( checkData ) common.Assert( false, std::string{ "get():: No data at '" }.append( location ).append( "'" ) );
202  // the fictive return
203  return return_type();
204  }
205  // ======================================================================
206  public:
207  // ======================================================================
208  // create the range from the container
209  return_type make_range( const typename TYPE::Container* cnt ) const {
210  return 0 == cnt ? return_type() : make_range( cnt->begin(), cnt->end() );
211  }
212  // create the range from the selection
213  return_type make_range( const typename TYPE::Selection* cnt ) const {
214  return 0 == cnt ? return_type() : return_type( cnt->begin(), cnt->end() );
215  }
216  // ======================================================================
225  std::move( location ) );
226  return getter.accessData();
227  }
228  // ======================================================================
229  private:
230  // ======================================================================
231  template <class ITERATOR>
232  return_type make_range( ITERATOR first, ITERATOR last ) const {
233  auto _begin = reinterpret_cast<typename return_type::const_iterator*>( &first );
234  auto _end = reinterpret_cast<typename return_type::const_iterator*>( &last );
235  return return_type( *_begin, *_end );
236  }
237  // ======================================================================
238  };
239  // ========================================================================
241  template <class TYPE>
242  struct GetData<Gaudi::NamedRange_<std::vector<const TYPE*>>> {
243  public:
244  // ======================================================================
248  // ======================================================================
249  public:
250  // ======================================================================
258  template <class COMMON>
259  return_type operator()( const COMMON& common, IDataProviderSvc* service, std::string_view location,
260  const bool checkData = true ) const {
261  return return_type( m_range( common, service, location, checkData ), std::string{ location } );
262  }
263  // ======================================================================
264  public:
265  // ======================================================================
266  // create the range from the container
267  return_type make_range( const typename TYPE::Container* cnt ) const {
268  if ( !cnt ) { return return_type(); }
269  static const std::string s_empty = "";
270  const IRegistry* reg = cnt->registry();
271  return return_type( m_range.make_range( cnt ), reg ? reg->identifier() : s_empty );
272  }
273  // create the range from the selection
274  return_type make_range( const typename TYPE::Selection* cnt ) const {
275  if ( !cnt ) { return return_type(); }
276  static const std::string s_empty = "";
277  const IRegistry* reg = cnt->registry();
278  return return_type( m_range.make_range( cnt ), reg ? reg->identifier() : s_empty );
279  }
280  // ======================================================================
287  return m_range.getData( service, std::move( location ) );
288  }
289  // ======================================================================
290  private:
294  // ======================================================================
295  };
296  // ========================================================================
298  template <class TYPE>
299  struct GetData<const TYPE> : public GetData<TYPE> {};
300  // ========================================================================
302  template <class TYPE>
303  struct GetData<TYPE*> : public GetData<TYPE> {};
304  // ========================================================================
306  template <class TYPE>
307  struct GetData<TYPE&> : public GetData<TYPE> {};
308  // ========================================================================
317  template <class TYPE>
318  struct CheckData {
319  public:
320  // ======================================================================
327  bool operator()( IDataProviderSvc* service, std::string_view location ) const {
329  return getFromTS<TYPE>( service, location );
330  }
331  // ======================================================================
332  };
333  // ========================================================================
335  template <class TYPE>
336  struct CheckData<Gaudi::Range_<std::vector<const TYPE*>>> {
337  public:
338  // ======================================================================
346  DataObject* object = this->getData( service, std::move( location ) );
347  return object && ( dynamic_cast<typename TYPE::Selection*>( object ) ||
348  dynamic_cast<typename TYPE::Container*>( object ) );
349  }
350  // ======================================================================
351  protected:
352  // ======================================================================
361  std::move( location ) );
362  return getter.accessData();
363  }
364  // ======================================================================
365  };
366  // ========================================================================
368  template <class TYPE>
369  struct CheckData<Gaudi::NamedRange_<std::vector<const TYPE*>>>
370  : public CheckData<Gaudi::Range_<std::vector<const TYPE*>>> {};
371  // ========================================================================
373  template <class TYPE>
374  struct CheckData<TYPE*> : public CheckData<TYPE> {};
375  // ========================================================================
377  template <class TYPE>
378  struct CheckData<TYPE&> : public CheckData<TYPE> {};
379  // ========================================================================
381  template <class TYPE>
382  struct CheckData<const TYPE> : public CheckData<TYPE> {};
383  // ========================================================================
392  template <class TYPE, class TYPE2>
394  private:
395  // ======================================================================
397  typedef GetData<TYPE> Getter; // the actual data getter
398  // ======================================================================
399  public:
400  // ======================================================================
401  typedef typename Getter::Type Type;
404  // ======================================================================
405  public:
406  // ======================================================================
413  template <class COMMON>
414  return_type operator()( const COMMON& common, IDataProviderSvc* service, std::string_view location,
415  std::string_view location2 ) const {
416  SmartDataPtr<TYPE> obj( service, std::string{ location } );
417  if ( !obj ) {
418  auto o = std::make_unique<TYPE2>();
419  auto r = o.get();
420  common.put( service, std::move( o ), location2 );
421  if ( common.msgLevel( MSG::DEBUG ) ) {
422  common.debug() << "The object of type '" << System::typeinfoName( typeid( *r ) )
423  << "' has been created from TS at address '" << location2 << "'" << endmsg;
424  }
425  return r;
426  }
427  auto ret = obj.ptr();
429  common.Assert( !( !ret ), std::string{ "get():: No valid data at '" }.append( location ).append( "\'" ) );
430  if ( common.msgLevel( MSG::DEBUG ) ) {
431  common.debug() << "The object of type '" << System::typeinfoName( typeid( *ret ) )
432  << "' has been retrieved from TS at address '" << location << "'" << endmsg;
433  }
434  // return *VALID* data
435  return ret;
436  // ====================================================================
437  }
438  };
439  // ========================================================================
440  template <class TYPE, class TYPE2>
441  struct GetOrCreateData<Gaudi::Range_<std::vector<const TYPE*>>, TYPE2> {
442  private:
443  // ======================================================================
446  typedef GetData<Range> Getter; // the actual data getter
448  typedef CheckData<Range> Checker; // the actual data checker
449  // ======================================================================
450  public:
451  // ======================================================================
452  typedef typename Getter::Type Type;
455  // ======================================================================
456  public:
457  // ======================================================================
464  template <class COMMON>
465  return_type operator()( const COMMON& common, IDataProviderSvc* service, std::string_view location,
466  std::string_view location2 ) const {
467  DataObject* obj = m_getter.getData( service, std::string{ location } );
468  if ( !obj ) {
469  common.put( service, std::make_unique<TYPE2>(), location2 );
470  if ( common.msgLevel( MSG::DEBUG ) ) {
471  common.debug() << "The object of type '" << System::typeinfoName( typeid( TYPE2 ) )
472  << "' has been created from TS at address '" << location2 << "'" << endmsg;
473  }
474  }
475  return m_getter( common, service, location );
476  // ====================================================================
477  }
478  // ======================================================================
479  private:
480  // ======================================================================
482  Getter m_getter; // the actual data getter
483  // ======================================================================
484  };
485  // ========================================================================
486  template <class TYPE, class TYPE2>
487  struct GetOrCreateData<Gaudi::NamedRange_<std::vector<const TYPE*>>, TYPE2> {
488  private:
489  // ======================================================================
494  typedef GetData<Range> Getter; // the actual data getter
495  // ======================================================================
496  public:
497  // ======================================================================
498  typedef typename Getter::Type Type;
501  // ======================================================================
502  public:
503  // ======================================================================
510  template <class COMMON>
511  return_type operator()( const COMMON& common, IDataProviderSvc* service, std::string location,
512  std::string_view location2 ) const {
513  auto range = m_range( common, service, location, location2 );
514  return return_type( std::move( range ), std::move( location ) );
515  }
516  // ======================================================================
517  private:
518  // ======================================================================
520  Helper m_range; // the actual data getter
521  // ======================================================================
522  };
523  // ========================================================================
524  template <class TYPE, class TYPE2>
525  struct GetOrCreateData<TYPE, TYPE2*> : public GetOrCreateData<TYPE, TYPE2> {};
526  template <class TYPE, class TYPE2>
527  struct GetOrCreateData<TYPE*, TYPE2> : public GetOrCreateData<TYPE, TYPE2> {};
528  template <class TYPE, class TYPE2>
529  struct GetOrCreateData<TYPE*, TYPE2*> : public GetOrCreateData<TYPE, TYPE2> {};
530  // ========================================================================
531  template <class TYPE, class TYPE2>
532  struct GetOrCreateData<TYPE, const TYPE2> : public GetOrCreateData<TYPE, TYPE2> {};
533  template <class TYPE, class TYPE2>
534  struct GetOrCreateData<const TYPE, TYPE2> : public GetOrCreateData<TYPE, TYPE2> {};
535  template <class TYPE, class TYPE2>
536  struct GetOrCreateData<const TYPE, const TYPE2> : public GetOrCreateData<TYPE, TYPE2> {};
537  // ========================================================================
538  template <class TYPE, class TYPE2>
539  struct GetOrCreateData<TYPE, TYPE2&> : public GetOrCreateData<TYPE, TYPE2> {};
540  template <class TYPE, class TYPE2>
541  struct GetOrCreateData<TYPE&, TYPE2> : public GetOrCreateData<TYPE, TYPE2> {};
542  template <class TYPE, class TYPE2>
543  struct GetOrCreateData<TYPE&, TYPE2&> : public GetOrCreateData<TYPE, TYPE2> {};
544  // ========================================================================
545  } // namespace Utils
546  // ==========================================================================
547 } // end of namespace Gaudi
548 // ============================================================================
549 // The END
550 // ============================================================================
551 #endif // GAUDIUTILS_GETDATA_H
MSG::DEBUG
@ DEBUG
Definition: IMessageSvc.h:25
Gaudi::Utils::_GetType< TYPE & >::return_type
TYPE * return_type
Definition: GetData.h:59
SmartDataObjectPtr::ObjectLoader::access
static AccessFunction access()
Definition: SmartDataObjectPtr.cpp:27
Gaudi::Utils::CheckData
Definition: GetData.h:318
Gaudi::Utils::GetOrCreateData< Gaudi::Range_< std::vector< const TYPE * > >, TYPE2 >::Checker
CheckData< Range > Checker
the actual data checker
Definition: GetData.h:448
Gaudi::Utils::GetOrCreateData
Definition: GetData.h:393
Gaudi::Utils::GetData< Gaudi::NamedRange_< std::vector< const TYPE * > > >::make_range
return_type make_range(const typename TYPE::Container *cnt) const
Definition: GetData.h:267
std::string
STL class.
AnyDataWrapper.h
Gaudi::Utils::GetOrCreateData< Gaudi::Range_< std::vector< const TYPE * > >, TYPE2 >::m_getter
Getter m_getter
the actual data getter
Definition: GetData.h:482
Gaudi::Utils::CheckData< Gaudi::Range_< std::vector< const TYPE * > > >::getData
DataObject * getData(IDataProviderSvc *service, std::string location) const
get the data form transient store
Definition: GetData.h:358
Gaudi::NamedRange_
Definition: NamedRange.h:52
std::move
T move(T... args)
Gaudi::Utils::GetOrCreateData< Gaudi::NamedRange_< std::vector< const TYPE * > >, TYPE2 >::operator()
return_type operator()(const COMMON &common, IDataProviderSvc *service, std::string location, std::string_view location2) const
the only one essential method
Definition: GetData.h:511
GaudiAlg.HistoUtils.location
location
Definition: HistoUtils.py:964
Gaudi::Utils::GetOrCreateData::Type
Getter::Type Type
Definition: GetData.h:401
StatusCode::isSuccess
bool isSuccess() const
Definition: StatusCode.h:314
Gaudi::Utils::GetData< Gaudi::NamedRange_< std::vector< const TYPE * > > >::operator()
return_type operator()(const COMMON &common, IDataProviderSvc *service, std::string_view location, const bool checkData=true) const
the only one essential method
Definition: GetData.h:259
Gaudi::Utils::GetData< Gaudi::Range_< std::vector< const TYPE * > > >::make_range
return_type make_range(const typename TYPE::Selection *cnt) const
Definition: GetData.h:213
Gaudi::Utils::GetOrCreateData< Gaudi::NamedRange_< std::vector< const TYPE * > >, TYPE2 >::Range
Gaudi::NamedRange_< std::vector< const TYPE * > > Range
Definition: GetData.h:490
Gaudi::Utils::GetData
Definition: GaudiCommon.h:57
Gaudi::Utils::GetOrCreateData::operator()
return_type operator()(const COMMON &common, IDataProviderSvc *service, std::string_view location, std::string_view location2) const
the only one essential method
Definition: GetData.h:414
NamedRange.h
Gaudi::Utils::GetData< Gaudi::NamedRange_< std::vector< const TYPE * > > >::make_range
return_type make_range(const typename TYPE::Selection *cnt) const
Definition: GetData.h:274
Gaudi::Utils::GetOrCreateData::return_type
Getter::return_type return_type
the actual return type
Definition: GetData.h:403
Gaudi::Utils::GetData< Gaudi::NamedRange_< std::vector< const TYPE * > > >::return_type
_GetType< Type >::return_type return_type
Definition: GetData.h:247
Gaudi::Utils::GetOrCreateData< Gaudi::NamedRange_< std::vector< const TYPE * > >, TYPE2 >::Range_
Gaudi::Range_< std::vector< const TYPE * > > Range_
Definition: GetData.h:491
IRegistry
Definition: IRegistry.h:32
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:313
Gaudi::Utils::CheckData< Gaudi::Range_< std::vector< const TYPE * > > >::operator()
bool operator()(IDataProviderSvc *service, std::string location) const
the only one essential method
Definition: GetData.h:345
Gaudi::Utils::GetOrCreateData< Gaudi::Range_< std::vector< const TYPE * > >, TYPE2 >::Getter
GetData< Range > Getter
the actual data getter
Definition: GetData.h:446
StatusCode.h
Gaudi::Utils::GetData< Gaudi::NamedRange_< std::vector< const TYPE * > > >::m_range
GetData< Gaudi::Range_< std::vector< const TYPE * > > > m_range
===================================================================== the actual processor
Definition: GetData.h:293
Range.h
IMessageSvc.h
Gaudi::Utils::_GetType::return_type
TYPE * return_type
Definition: GetData.h:47
IDataProviderSvc.h
Gaudi::Utils::CheckData::operator()
bool operator()(IDataProviderSvc *service, std::string_view location) const
the only one essential method
Definition: GetData.h:327
Gaudi::range
NamedRange_< CONTAINER > range(const CONTAINER &cnt, std::string name)
simple function to create the named range from arbitrary container
Definition: NamedRange.h:128
Gaudi::Utils::GetData::Type
TYPE Type
Definition: GetData.h:118
Gaudi::Utils::GetOrCreateData::Getter
GetData< TYPE > Getter
the actual data getter
Definition: GetData.h:397
StatusCode
Definition: StatusCode.h:65
Gaudi::Utils::GetOrCreateData< Gaudi::Range_< std::vector< const TYPE * > >, TYPE2 >::Range
Gaudi::Range_< std::vector< const TYPE * > > Range
Definition: GetData.h:444
Gaudi::Utils::GetData< Gaudi::Range_< std::vector< const TYPE * > > >::Type
Gaudi::Range_< std::vector< const TYPE * > > Type
the actual return type
Definition: GetData.h:157
IDataProviderSvc::retrieveObject
virtual StatusCode retrieveObject(IRegistry *pDirectory, std::string_view path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.
SmartDataPtr.h
details::make_range
Range make_range(const DataObject *obj)
Definition: DataObjectHandle.h:30
SmartDataObjectPtr
Definition: SmartDataObjectPtr.h:42
Gaudi::Utils::GetOrCreateData< Gaudi::NamedRange_< std::vector< const TYPE * > >, TYPE2 >::Type
Getter::Type Type
Definition: GetData.h:498
Gaudi::Utils::_GetType< Gaudi::Range_< CONTAINER > >::return_type
Gaudi::Range_< CONTAINER > return_type
Definition: GetData.h:65
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:203
Gaudi::Utils::GetData< Gaudi::Range_< std::vector< const TYPE * > > >::make_range
return_type make_range(ITERATOR first, ITERATOR last) const
Definition: GetData.h:232
Gaudi::Utils::GetOrCreateData< Gaudi::NamedRange_< std::vector< const TYPE * > >, TYPE2 >::Helper
GetOrCreateData< Range_, TYPE2 > Helper
Definition: GetData.h:492
AnyDataWrapper
Definition: AnyDataWrapper.h:34
Gaudi::Utils::GetData< Gaudi::NamedRange_< std::vector< const TYPE * > > >::Type
Gaudi::NamedRange_< std::vector< const TYPE * > > Type
the actual return type
Definition: GetData.h:246
IRegistry.h
Gaudi
Header file for std:chrono::duration-based Counters.
Definition: __init__.py:1
IOTest.sel
sel
Definition: IOTest.py:104
std::string::append
T append(T... args)
Gaudi::Utils::_GetType
Definition: GetData.h:46
Gaudi::Utils::GetData< Gaudi::Range_< std::vector< const TYPE * > > >::operator()
return_type operator()(const COMMON &common, IDataProviderSvc *service, std::string_view location, const bool checkData=true) const
the only one essential method
Definition: GetData.h:170
Gaudi::Range_
Definition: Range.h:95
StatusCode::isFailure
bool isFailure() const
Definition: StatusCode.h:129
Gaudi::Utils::GetOrCreateData< Gaudi::NamedRange_< std::vector< const TYPE * > >, TYPE2 >::m_range
Helper m_range
the actual data getter
Definition: GetData.h:520
Gaudi::Utils::GetOrCreateData< Gaudi::Range_< std::vector< const TYPE * > >, TYPE2 >::return_type
Getter::return_type return_type
the actual return type
Definition: GetData.h:454
Gaudi::Utils::GetOrCreateData< Gaudi::NamedRange_< std::vector< const TYPE * > >, TYPE2 >::Getter
GetData< Range > Getter
the actual data getter
Definition: GetData.h:494
Gaudi::Utils::_GetType< Gaudi::NamedRange_< CONTAINER > >::return_type
Gaudi::NamedRange_< CONTAINER > return_type
Definition: GetData.h:71
Gaudi::Utils::_GetType< TYPE * >::return_type
TYPE * return_type
Definition: GetData.h:53
Gaudi::Utils::GetData< Gaudi::NamedRange_< std::vector< const TYPE * > > >::getData
DataObject * getData(IDataProviderSvc *service, std::string location) const
get the data form transient store
Definition: GetData.h:286
SmartDataPtr
A small class used to access easily (and efficiently) data items residing in data stores.
Definition: SmartDataPtr.h:57
Gaudi::Utils::GetOrCreateData< Gaudi::Range_< std::vector< const TYPE * > >, TYPE2 >::operator()
return_type operator()(const COMMON &common, IDataProviderSvc *service, std::string_view location, std::string_view location2) const
the only one essential method
Definition: GetData.h:465
Gaudi::Utils::GetData::return_type
_GetType< Type >::return_type return_type
the actual return type
Definition: GetData.h:120
Gaudi::Utils::GetData::operator()
return_type operator()(const COMMON &common, IDataProviderSvc *service, std::string_view location, const bool checkData=true) const
the only one essential method
Definition: GetData.h:132
IRegistry::identifier
virtual const id_type & identifier() const =0
Full identifier (or key)
DataObject
Definition: DataObject.h:40
Gaudi::Utils::GetOrCreateData< Gaudi::Range_< std::vector< const TYPE * > >, TYPE2 >::Type
Getter::Type Type
Definition: GetData.h:452
Gaudi::Utils::GetData< Gaudi::Range_< std::vector< const TYPE * > > >::getData
DataObject * getData(IDataProviderSvc *service, std::string location) const
get the data form transient store
Definition: GetData.h:222
Gaudi::Utils::GetData< Gaudi::Range_< std::vector< const TYPE * > > >::make_range
return_type make_range(const typename TYPE::Container *cnt) const
Definition: GetData.h:209
Gaudi::Utils::GetData< Gaudi::Range_< std::vector< const TYPE * > > >::return_type
_GetType< Type >::return_type return_type
Definition: GetData.h:158
IDataProviderSvc
Definition: IDataProviderSvc.h:53
Gaudi::Utils::GetOrCreateData< Gaudi::NamedRange_< std::vector< const TYPE * > >, TYPE2 >::return_type
Getter::return_type return_type
the actual return type
Definition: GetData.h:500
Gaudi::Utils::getFromTS
_GetType< TYPE >::return_type getFromTS(IDataProviderSvc *service, std::string_view location)
Helper function to provide the minimal lookup and cast functionality of SmartDataPtr used in the help...
Definition: GetData.h:79
MsgStream.h
SmartDataObjectPtr::accessData
DataObject * accessData()
Static Object retrieval method: must call specific function.
Definition: SmartDataObjectPtr.h:96
GaudiCommon
Definition: GaudiCommon.h:95