51 #define xstr(s) str(s)
59 bool oneTimeInitializationImpl() {
62 static std::unique_ptr<edm::ThreadsController> tsiPtr = std::make_unique<edm::ThreadsController>(1);
72 bool oneTimeInitialization() {
73 static const bool s_init{oneTimeInitializationImpl()};
82 : globalControl_(tbb::global_control::max_allowed_parallelism, 1),
84 espController_(
std::make_unique<eventsetup::EventSetupsController>()),
88 (
void)oneTimeInitialization();
92 auto psetPtr =
desc.parameterSet();
98 auto procDesc =
desc.processDesc();
103 auto& serviceSets = procDesc->getServicesPSets();
111 std::shared_ptr<CommonParams>
common(
items.initMisc(*psetPtr));
118 auto nConcurrentLumis = 1
U;
119 auto nConcurrentRuns = 1
U;
125 esp_->add(std::dynamic_pointer_cast<eventsetup::DataProxyProvider>(
esHelper_));
126 esp_->add(std::dynamic_pointer_cast<EventSetupRecordIntervalFinder>(
esHelper_));
134 auto psetid = emptyPSet.
id();
150 produce.moduleLabel_,
153 twd.friendlyClassName(),
154 produce.instanceLabel_,
161 dataProducts_.emplace_back(product, std::unique_ptr<WrapperBase>());
162 preg_->addProduct(product);
179 auto ep = std::make_shared<EventPrincipal>(
preg_,
206 throw cms::Exception(
"LogicError") <<
"Products must be declared to the TestProcessor::Config object\n"
207 "with a call to the function \'produces\' BEFORE passing the\n"
208 "TestProcessor::Config object to the TestProcessor constructor";
218 return schedule_->totalEventsPassed() > 0;
230 arena_.execute([
this, iNum]() {
259 std::shared_ptr<edm::LuminosityBlockPrincipal>
lumi;
284 arena_.execute([
this, iNum]() {
309 std::shared_ptr<edm::RunPrincipal> rp;
310 arena_.execute([
this, &rp]() {
341 auto pbp =
arena_.execute([
this]() {
389 }
while (not
task.done());
400 actReg_->preallocateSignal_(bounds);
415 actReg_->postBeginJobSignal_();
427 std::vector<edm::SubProcess> emptyList;
432 beginGlobalTransitionAsync<Traits>(
436 }
while (not globalWaitTask.
done());
438 std::rethrow_exception(*(globalWaitTask.
exceptionPtr()));
455 auto const& es =
esp_->eventSetupImpl();
459 std::vector<edm::SubProcess> emptyList;
463 beginGlobalTransitionAsync<Traits>(
467 }
while (not globalWaitTask.
done());
469 std::rethrow_exception(*(globalWaitTask.
exceptionPtr()));
486 }
while (not streamLoopWaitTask.
done());
488 std::rethrow_exception(*(streamLoopWaitTask.
exceptionPtr()));
506 auto const& es =
esp_->eventSetupImpl();
510 std::vector<edm::SubProcess> emptyList;
514 beginGlobalTransitionAsync<Traits>(
518 }
while (not globalWaitTask.
done());
520 std::rethrow_exception(*(globalWaitTask.
exceptionPtr()));
538 }
while (not streamLoopWaitTask.
done());
540 std::rethrow_exception(*(streamLoopWaitTask.
exceptionPtr()));
550 pep->clearEventPrincipal();
551 pep->fillEventPrincipal(
564 auto r = pep->getProductResolver(
p.first.branchID());
565 dynamic_cast<ProductPutterBase const*>(
r)->putProduct(std::unique_ptr<WrapperBase>());
578 }
while (not waitTask.
done());
594 auto const& es =
esp_->eventSetupImpl();
598 std::vector<edm::SubProcess> emptyList;
616 }
while (not streamLoopWaitTask.
done());
618 std::rethrow_exception(*(streamLoopWaitTask.
exceptionPtr()));
633 }
while (not globalWaitTask.
done());
635 std::rethrow_exception(*(globalWaitTask.
exceptionPtr()));
639 return lumiPrincipal;
643 std::shared_ptr<RunPrincipal> rp;
655 auto const& es =
esp_->eventSetupImpl();
659 std::vector<edm::SubProcess> emptyList;
677 }
while (not streamLoopWaitTask.
done());
679 std::rethrow_exception(*(streamLoopWaitTask.
exceptionPtr()));
694 }
while (not globalWaitTask.
done());
696 std::rethrow_exception(*(globalWaitTask.
exceptionPtr()));
710 std::vector<edm::SubProcess> emptyList;
724 }
while (not globalWaitTask.
done());
726 std::rethrow_exception(*(globalWaitTask.
exceptionPtr()));
730 return &processBlockPrincipal;
741 "Multiple exceptions were thrown while executing endJob. An exception message follows for each.\n");
751 c.call([actReg]() { actReg->preEndJobSignal_(); });
753 c.call([actReg]() { actReg->postEndJobSignal_(); });