55 #define xstr(s) str(s) 65 : globalControl_(oneapi::tbb::global_control::max_allowed_parallelism, 1),
74 auto psetPtr =
desc.parameterSet();
84 auto procDesc =
desc.processDesc();
89 auto& serviceSets = procDesc->getServicesPSets();
97 std::shared_ptr<CommonParams>
common(
items.initMisc(*psetPtr));
105 auto nConcurrentRuns = 1
U;
110 esp_->add(std::dynamic_pointer_cast<eventsetup::ESProductResolverProvider>(
esHelper_));
111 esp_->add(std::dynamic_pointer_cast<EventSetupRecordIntervalFinder>(
esHelper_));
119 auto psetid = emptyPSet.
id();
134 produce.moduleLabel_,
137 twd.friendlyClassName(),
138 produce.instanceLabel_,
145 dataProducts_.emplace_back(product, std::unique_ptr<WrapperBase>());
146 preg_->addProduct(product);
167 auto ep = std::make_shared<EventPrincipal>(
preg_,
176 auto rp = std::make_unique<RunPrincipal>(
198 throw cms::Exception(
"LogicError") <<
"Products must be declared to the TestProcessor::Config object\n" 199 "with a call to the function \'produces\' BEFORE passing the\n" 200 "TestProcessor::Config object to the TestProcessor constructor";
210 return schedule_->totalEventsPassed() > 0;
222 arena_.execute([
this, iNum]() {
257 std::shared_ptr<edm::LuminosityBlockPrincipal>
lumi;
288 arena_.execute([
this, iNum]() {
317 std::shared_ptr<edm::RunPrincipal> rp;
318 arena_.execute([
this, &rp]() {
355 auto pbp =
arena_.execute([
this]() {
451 std::vector<edm::SubProcess> emptyList;
456 beginGlobalTransitionAsync<Traits>(
458 globalWaitTask.wait();
514 auto const& es =
esp_->eventSetupImpl();
518 std::vector<edm::SubProcess> emptyList;
522 beginGlobalTransitionAsync<Traits>(
524 globalWaitTask.wait();
537 streamLoopWaitTask.wait();
556 auto const& es =
esp_->eventSetupImpl();
560 std::vector<edm::SubProcess> emptyList;
564 beginGlobalTransitionAsync<Traits>(
566 globalWaitTask.wait();
581 streamLoopWaitTask.wait();
590 pep->clearEventPrincipal();
593 pep->fillEventPrincipal(
aux,
nullptr,
nullptr);
603 auto r = pep->getProductResolver(
p.first.branchID());
631 auto const& es =
esp_->eventSetupImpl();
635 std::vector<edm::SubProcess> emptyList;
651 streamLoopWaitTask.wait();
663 globalWaitTask.wait();
669 globalWaitTask.wait();
672 lumiPrincipal->setRunPrincipal(std::shared_ptr<RunPrincipal>());
673 return lumiPrincipal;
687 runPrincipal->endTime());
690 auto const& es =
esp_->eventSetupImpl();
694 std::vector<edm::SubProcess> emptyList;
710 streamLoopWaitTask.wait();
722 globalWaitTask.wait();
730 runPrincipal->mergeableRunProductMetadata());
731 globalWaitTask.wait();
742 std::vector<edm::SubProcess> emptyList;
754 globalWaitTask.wait();
757 return &processBlockPrincipal;
768 "Multiple exceptions were thrown while executing endJob. An exception message follows for each.\n");
779 c.call([actReg]() { actReg->preEndJobSignal_(); });
781 c.call([actReg]() { actReg->postEndJobSignal_(); });
void put(std::pair< edm::EDPutTokenT< T >, std::unique_ptr< T >> &&iPut)
std::shared_ptr< LuminosityBlockPrincipal > endLuminosityBlock()
std::shared_ptr< ActivityRegistry > actReg_
void setProcessesWithMergeableRunProducts(ProductRegistry const &productRegistry)
edm::test::ProcessBlock testBeginProcessBlockImpl()
ProcessHistoryID id() const
void setNumberOfConcurrentPrincipals(PreallocationConfiguration const &)
std::vector< std::pair< edm::BranchDescription, std::unique_ptr< WrapperBase > > > dataProducts_
bool respondToOpenInputFileCalled_
static LuminosityBlockNumber_t maxLuminosityBlockNumber()
bool registerProcessHistory(ProcessHistory const &processHistory)
LuminosityBlockNumber_t lumiNumber_
unsigned long long EventNumber_t
std::unique_ptr< edm::ModuleTypeResolverMaker const > makeModuleTypeResolverMaker(edm::ParameterSet const &pset)
edm::test::LuminosityBlock testEndLuminosityBlockImpl()
void ensureAvailableAccelerators(edm::ParameterSet const ¶meterSet)
EventNumber_t eventNumber_
std::shared_ptr< RunPrincipal > getAvailableRunPrincipalPtr()
std::string const & pythonConfiguration() const
bool openOutputFilesCalled_
std::shared_ptr< RunPrincipal > runPrincipal_
ProcessContext processContext_
edm::test::Run testBeginRunImpl(edm::RunNumber_t iNum, std::pair< edm::test::ESPutTokenT< T >, std::unique_ptr< T >> &&iPut, U &&... iArgs)
unsigned int LuminosityBlockNumber_t
void beginLuminosityBlock()
oneapi::tbb::task_group taskGroup_
PreallocationConfiguration preallocations_
TEMPL(T2) struct Divides void
void validateTopLevelParameterSets(ParameterSet *processParameterSet)
~TestProcessor() noexcept(false)
void synchronousEventSetupForInstance(IOVSyncValue const &syncValue, oneapi::tbb::task_group &iGroup, eventsetup::EventSetupsController &espController)
void fillProcessBlockPrincipal(std::string const &processName, DelayedReader *reader=nullptr)
ProcessBlockPrincipal & processBlockPrincipal() const
std::unique_ptr< ModuleTypeResolverMaker const > moduleTypeResolverMaker_
std::vector< std::string > const & extraProcesses() const
unsigned int numberOfThreads() const
void setEventNumber(edm::EventNumber_t)
std::shared_ptr< BranchIDListHelper > branchIDListHelper_
ParameterSetID id() const
ParameterSet const & registerIt()
void respondToOpenInputFile()
std::shared_ptr< EventSetupTestHelper > esHelper_
std::shared_ptr< ThinnedAssociationsHelper > thinnedAssociationsHelper_
std::string labelOfTestModule_
std::unique_ptr< eventsetup::EventSetupsController > espController_
edm::test::Event testImpl()
std::shared_ptr< eventsetup::EventSetupProvider > esp_
unsigned int numberOfStreams() const
void teardownProcessing()
std::unique_ptr< Schedule > schedule_
std::shared_ptr< ProcessConfiguration const > processConfiguration_
ServiceToken serviceToken_
edm::test::LuminosityBlock testBeginLuminosityBlockImpl(edm::LuminosityBlockNumber_t iNum, std::pair< edm::test::ESPutTokenT< T >, std::unique_ptr< T >> &&iPut, U &&... iArgs)
edm::test::ProcessBlock testEndProcessBlockImpl()
unsigned int numberOfRuns() const
void insert(std::unique_ptr< ProcessBlockPrincipal >)
std::vector< ProduceEntry > const & produceEntries() const
std::vector< ESProduceEntry > const & esProduceEntries() const
void setProcessConfiguration(ProcessConfiguration const *processConfiguration)
bool beginProcessBlockCalled_
void setLuminosityBlockNumber(edm::LuminosityBlockNumber_t)
unsigned int numberOfLuminosityBlocks() const
PrincipalCache principalCache_
ProcessBlockPrincipal const * endProcessBlock()
std::shared_ptr< ProductRegistry > preg_
MergeableRunProductProcesses mergeableRunProductProcesses_
std::unique_ptr< ExceptionToActionTable const > act_table_
static EventNumber_t maxEventNumber()
ProcessHistory processHistory_
oneapi::tbb::task_arena arena_
EventPrincipal & eventPrincipal(unsigned int iStreamIndex) const
edm::test::Run testEndRunImpl()
void setRunNumber(edm::RunNumber_t)
std::unique_ptr< HistoryAppender > historyAppender_
void emplace_back(Args &&... args)
TestProcessor(Config const &iConfig, ServiceToken iToken=ServiceToken())
std::shared_ptr< LuminosityBlockPrincipal > getAvailableLumiPrincipalPtr()
std::shared_ptr< LuminosityBlockPrincipal > lumiPrincipal_
std::shared_ptr< ProcessBlockHelper > processBlockHelper_
ProcessHistoryRegistry processHistoryRegistry_
std::shared_ptr< RunPrincipal > endRun()
bool oneTimeInitialization()
void respondToCloseInputFile()