52 #define xstr(s) str(s)
60 bool oneTimeInitializationImpl() {
63 static std::unique_ptr<edm::ThreadsController> tsiPtr = std::make_unique<edm::ThreadsController>(1);
73 bool oneTimeInitialization() {
74 static const bool s_init{oneTimeInitializationImpl()};
83 : globalControl_(tbb::global_control::max_allowed_parallelism, 1),
85 espController_(
std::make_unique<eventsetup::EventSetupsController>()),
89 (
void)oneTimeInitialization();
93 auto psetPtr =
desc.parameterSet();
99 auto procDesc =
desc.processDesc();
104 auto& serviceSets = procDesc->getServicesPSets();
112 std::shared_ptr<CommonParams>
common(
items.initMisc(*psetPtr));
119 auto nConcurrentLumis = 1
U;
120 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);
181 auto ep = std::make_shared<EventPrincipal>(
preg_,
208 throw cms::Exception(
"LogicError") <<
"Products must be declared to the TestProcessor::Config object\n"
209 "with a call to the function \'produces\' BEFORE passing the\n"
210 "TestProcessor::Config object to the TestProcessor constructor";
220 return schedule_->totalEventsPassed() > 0;
232 arena_.execute([
this, iNum]() {
261 std::shared_ptr<edm::LuminosityBlockPrincipal>
lumi;
286 arena_.execute([
this, iNum]() {
311 std::shared_ptr<edm::RunPrincipal> rp;
312 arena_.execute([
this, &rp]() {
343 auto pbp =
arena_.execute([
this]() {
391 }
while (not
task.done());
402 actReg_->preallocateSignal_(bounds);
417 actReg_->postBeginJobSignal_();
429 std::vector<edm::SubProcess> emptyList;
434 beginGlobalTransitionAsync<Traits>(
438 }
while (not globalWaitTask.
done());
440 std::rethrow_exception(*(globalWaitTask.
exceptionPtr()));
457 auto const& es =
esp_->eventSetupImpl();
461 std::vector<edm::SubProcess> emptyList;
465 beginGlobalTransitionAsync<Traits>(
469 }
while (not globalWaitTask.
done());
471 std::rethrow_exception(*(globalWaitTask.
exceptionPtr()));
488 }
while (not streamLoopWaitTask.
done());
490 std::rethrow_exception(*(streamLoopWaitTask.
exceptionPtr()));
508 auto const& es =
esp_->eventSetupImpl();
512 std::vector<edm::SubProcess> emptyList;
516 beginGlobalTransitionAsync<Traits>(
520 }
while (not globalWaitTask.
done());
522 std::rethrow_exception(*(globalWaitTask.
exceptionPtr()));
540 }
while (not streamLoopWaitTask.
done());
542 std::rethrow_exception(*(streamLoopWaitTask.
exceptionPtr()));
552 pep->clearEventPrincipal();
553 pep->fillEventPrincipal(
566 auto r = pep->getProductResolver(
p.first.branchID());
567 dynamic_cast<ProductPutterBase const*>(
r)->putProduct(std::unique_ptr<WrapperBase>());
580 }
while (not waitTask.
done());
596 auto const& es =
esp_->eventSetupImpl();
600 std::vector<edm::SubProcess> emptyList;
618 }
while (not streamLoopWaitTask.
done());
620 std::rethrow_exception(*(streamLoopWaitTask.
exceptionPtr()));
635 }
while (not globalWaitTask.
done());
637 std::rethrow_exception(*(globalWaitTask.
exceptionPtr()));
641 return lumiPrincipal;
645 std::shared_ptr<RunPrincipal> rp;
657 auto const& es =
esp_->eventSetupImpl();
661 std::vector<edm::SubProcess> emptyList;
679 }
while (not streamLoopWaitTask.
done());
681 std::rethrow_exception(*(streamLoopWaitTask.
exceptionPtr()));
696 }
while (not globalWaitTask.
done());
698 std::rethrow_exception(*(globalWaitTask.
exceptionPtr()));
712 std::vector<edm::SubProcess> emptyList;
726 }
while (not globalWaitTask.
done());
728 std::rethrow_exception(*(globalWaitTask.
exceptionPtr()));
732 return &processBlockPrincipal;
743 "Multiple exceptions were thrown while executing endJob. An exception message follows for each.\n");
753 c.call([actReg]() { actReg->preEndJobSignal_(); });
755 c.call([actReg]() { actReg->postEndJobSignal_(); });