** Warning **
Issuing rollback() due to DESTROY without explicit disconnect() of DBD::mysql::db handle dbname=lxr at /lxr/lib/LXR/Common.pm line 1113.
Last-Modified: Fri, 18 Sep 2025 22:20:37 GMT
Content-Type: text/html; charset=utf-8
/CMSSW_16_0_X_2025-09-18-2300/FWCore/Framework/interface/Callback.h
File indexing completed on 2025-09-12 10:00:14
0001
0002 #ifndef FWCore_Framework_Callback_h
0003 #define FWCore_Framework_Callback_h
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 #include <memory>
0021 #include <utility>
0022
0023 #include "oneapi/tbb/task_group.h"
0024
0025 #include "FWCore /Concurrency /interface /WaitingTaskHolder.h "
0026 #include "FWCore /Framework /interface /CallbackBase.h "
0027 #include "FWCore /ServiceRegistry /interface /ESParentContext.h "
0028 #include "FWCore /ServiceRegistry /interface /ServiceToken.h "
0029
0030 namespace edm {
0031
0032 class EventSetupImpl ;
0033
0034 namespace eventsetup {
0035
0036 class EventSetupRecordImpl ;
0037
0038 template <typename T ,
0039 typename TProduceFunc,
0040 typename TReturn,
0041 typename TRecord,
0042 typename TDecorator
0043 = CallbackSimpleDecorator <TRecord>>
0044 class Callback : public CallbackBase <T , TProduceFunc, TReturn, TRecord, TDecorator> {
0045 public :
0046 using Base = CallbackBase <T , TProduceFunc, TReturn, TRecord, TDecorator>;
0047
0048 Callback (T * iProd, TProduceFunc iProduceFunc, unsigned int iID , const TDecorator& iDec = TDecorator())
0049 : Callback (iProd, std ::make_shared <TProduceFunc>(std ::move (iProduceFunc)), iID , iDec) {}
0050
0051 Callback * clone () {
0052 return new Callback (Base ::producer (), Base ::produceFunction(), Base ::produceMethodID (), Base ::decorator());
0053 }
0054
0055 void prefetchAsync (WaitingTaskHolder iTask,
0056 EventSetupRecordImpl const * iRecord ,
0057 EventSetupImpl const * iEventSetupImpl ,
0058 ServiceToken const & token ,
0059 ESParentContext const & iParent ) noexcept {
0060 return Base ::prefetchAsyncImpl(
0061 [this ](auto && group , auto && token , auto && record , auto && es ) {
0062 constexpr bool emitPostPrefetchingSignal = true ;
0063 auto produceFunctor = [this ](TRecord const & record ) { return (*Base ::produceFunction())(record ); };
0064 return Base ::makeProduceTask (
0065 group , token , record , es , emitPostPrefetchingSignal, std ::move (produceFunctor));
0066 },
0067 std ::move (iTask),
0068 iRecord ,
0069 iEventSetupImpl ,
0070 token ,
0071 iParent );
0072 }
0073
0074 private :
0075 Callback (T * iProd,
0076 std ::shared_ptr <TProduceFunc> iProduceFunc,
0077 unsigned int iID ,
0078 const TDecorator& iDec = TDecorator())
0079 : Base (iProd, std ::move (iProduceFunc), iID , iDec) {}
0080 };
0081 }
0082 }
0083 #endif