1 #ifndef FWCore_Framework_streamTransitionAsync_h 2 #define FWCore_Framework_streamTransitionAsync_h 34 class LuminosityBlockPrincipal;
44 std::vector<std::shared_ptr<const EventSetupImpl>>
const* iEventSetupImpls) {
54 std::vector<std::shared_ptr<const EventSetupImpl>>
const* iEventSetupImpls) {
64 std::vector<std::shared_ptr<const EventSetupImpl>>
const* iEventSetupImpls,
65 bool cleaningUpAfterException) {
67 std::move(iHolder), i, iPrincipal, iTS, iEventSetupImpls, cleaningUpAfterException);
76 std::vector<std::shared_ptr<const EventSetupImpl>>
const* iEventSetupImpls,
77 bool cleaningUpAfterException) {
81 template <
typename Traits,
typename P,
typename SC>
85 unsigned int iStreamIndex,
89 std::vector<std::shared_ptr<const EventSetupImpl>>
const*
97 tbb::task::allocate_root(),
98 [&iSubProcesses, iWait, iStreamIndex, &iPrincipal, iTS, iEventSetupImpls](
99 std::exception_ptr
const* iPtr)
mutable {
104 [iWait, excpt](std::exception_ptr
const*)
mutable { iWait.
doneWaiting(excpt); });
106 for (
auto& subProcess : iSubProcesses) {
110 for (
auto& subProcess : iSubProcesses) {
112 iWait, subProcess, iStreamIndex, iPrincipal, iTS, iEventSetupImpls);
121 template <
typename Traits,
typename P,
typename SC>
124 unsigned int iNStreams,
128 std::vector<std::shared_ptr<const EventSetupImpl>>
const* iEventSetupImpls,
132 for (
unsigned int i = 0;
i < iNStreams; ++
i) {
133 beginStreamTransitionAsync<Traits>(
138 template <
typename Traits,
typename P,
typename SC>
141 unsigned int iStreamIndex,
145 std::vector<std::shared_ptr<const EventSetupImpl>>
const*
149 bool cleaningUpAfterException) {
155 tbb::task::allocate_root(),
156 [&iSubProcesses, iWait, iStreamIndex, &iPrincipal, iTS, iEventSetupImpls, cleaningUpAfterException](
157 std::exception_ptr
const* iPtr)
mutable {
162 [iWait, excpt](std::exception_ptr
const*)
mutable { iWait.
doneWaiting(excpt); });
164 for (
auto& subProcess : iSubProcesses) {
166 h, subProcess, iStreamIndex, iPrincipal, iTS, iEventSetupImpls, cleaningUpAfterException);
169 for (
auto& subProcess : iSubProcesses) {
171 iWait, subProcess, iStreamIndex, iPrincipal, iTS, iEventSetupImpls, cleaningUpAfterException);
180 template <
typename Traits,
typename P,
typename SC>
183 unsigned int iNStreams,
187 std::vector<std::shared_ptr<const EventSetupImpl>>
const* iEventSetupImpls,
190 bool cleaningUpAfterException) {
191 for (
unsigned int i = 0;
i < iNStreams; ++
i) {
192 endStreamTransitionAsync<Traits>(
193 iWait, iSchedule,
i, iPrincipal, iTS, iES, iEventSetupImpls, iToken, iSubProcesses, cleaningUpAfterException);
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
void subProcessDoStreamBeginTransitionAsync(WaitingTaskHolder iHolder, SubProcess &iSubProcess, unsigned int i, LuminosityBlockPrincipal &iPrincipal, IOVSyncValue const &iTS, std::vector< std::shared_ptr< const EventSetupImpl >> const *iEventSetupImpls)
void beginStreamsTransitionAsync(WaitingTask *iWait, Schedule &iSchedule, unsigned int iNStreams, P &iPrincipal, IOVSyncValue const &iTS, EventSetupImpl const &iES, std::vector< std::shared_ptr< const EventSetupImpl >> const *iEventSetupImpls, ServiceToken const &token, SC &iSubProcesses)
void doStreamEndLuminosityBlockAsync(WaitingTaskHolder iHolder, unsigned int iID, LuminosityBlockPrincipal const &principal, IOVSyncValue const &ts, std::vector< std::shared_ptr< const EventSetupImpl >> const *, bool cleaningUpAfterException)
void endStreamsTransitionAsync(WaitingTaskHolder iWait, Schedule &iSchedule, unsigned int iNStreams, P &iPrincipal, IOVSyncValue const &iTS, EventSetupImpl const &iES, std::vector< std::shared_ptr< const EventSetupImpl >> const *iEventSetupImpls, ServiceToken const &iToken, SC &iSubProcesses, bool cleaningUpAfterException)
void endStreamTransitionAsync(WaitingTaskHolder iWait, Schedule &iSchedule, unsigned int iStreamIndex, P &iPrincipal, IOVSyncValue const &iTS, EventSetupImpl const &iES, std::vector< std::shared_ptr< const EventSetupImpl >> const *iEventSetupImpls, ServiceToken const &token, SC &iSubProcesses, bool cleaningUpAfterException)
void subProcessDoStreamEndTransitionAsync(WaitingTaskHolder iHolder, SubProcess &iSubProcess, unsigned int i, LuminosityBlockPrincipal &iPrincipal, IOVSyncValue const &iTS, std::vector< std::shared_ptr< const EventSetupImpl >> const *iEventSetupImpls, bool cleaningUpAfterException)
void doneWaiting(std::exception_ptr iExcept)
void processOneStreamAsync(WaitingTaskHolder iTask, unsigned int iStreamID, typename T::MyPrincipal &principal, EventSetupImpl const &eventSetup, ServiceToken const &token, bool cleaningUpAfterException=false)
void doStreamEndRunAsync(WaitingTaskHolder iHolder, unsigned int iID, RunPrincipal const &principal, IOVSyncValue const &ts, std::vector< std::shared_ptr< const EventSetupImpl >> const *, bool cleaningUpAfterException)
FunctorWaitingTask< F > * make_waiting_task(ALLOC &&iAlloc, F f)
std::pair< OmniClusterRef, TrackingParticleRef > P
void doStreamBeginLuminosityBlockAsync(WaitingTaskHolder iHolder, unsigned int iID, LuminosityBlockPrincipal const &principal, IOVSyncValue const &ts, std::vector< std::shared_ptr< const EventSetupImpl >> const *)
void doStreamBeginRunAsync(WaitingTaskHolder iHolder, unsigned int iID, RunPrincipal const &principal, IOVSyncValue const &ts, std::vector< std::shared_ptr< const EventSetupImpl >> const *)
void beginStreamTransitionAsync(WaitingTaskHolder iWait, Schedule &iSchedule, unsigned int iStreamIndex, P &iPrincipal, IOVSyncValue const &iTS, EventSetupImpl const &iES, std::vector< std::shared_ptr< const EventSetupImpl >> const *iEventSetupImpls, ServiceToken const &token, SC &iSubProcesses)