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);