1 #ifndef FWCore_TestProcessor_TestProcessor_h
2 #define FWCore_TestProcessor_TestProcessor_h
25 #include "tbb/global_control.h"
26 #include "tbb/task_arena.h"
27 #include "tbb/task_group.h"
62 class ThinnedAssociationsHelper;
63 class ExceptionToActionTable;
64 class HistoryAppender;
66 namespace eventsetup {
67 class EventSetupProvider;
68 class EventSetupsController;
72 class TestProcessorConfig;
109 template <
typename T>
118 template <
typename REC,
typename T>
120 auto rk = eventsetup::EventSetupRecordKey::makeKey<REC>();
173 return testImpl(std::forward<T>(iArgs)...);
176 template <
typename...
T>
180 template <
typename...
T>
185 template <
typename...
T>
189 template <
typename...
T>
251 template <
typename T,
typename... U>
254 return testImpl(std::forward<U>(iArgs)...);
257 template <
typename T,
typename... U>
260 return testImpl(std::forward<U>(iArgs)...);
263 template <
typename T>
265 put(iPut.first.index(), std::make_unique<edm::Wrapper<T>>(
std::move(iPut.second)));
268 template <
typename T>
273 void put(
unsigned int, std::unique_ptr<WrapperBase>);
277 template <
typename T,
typename... U>
287 template <
typename T,
typename... U>
295 template <
typename T,
typename... U>
303 template <
typename T,
typename... U>
323 std::shared_ptr<RunPrincipal>
endRun();
333 std::shared_ptr<ProductRegistry>
preg_;
339 std::shared_ptr<eventsetup::EventSetupProvider>
esp_;
356 std::vector<std::pair<edm::BranchDescription, std::unique_ptr<WrapperBase>>>
dataProducts_;
void put(std::pair< edm::EDPutTokenT< T >, std::unique_ptr< T >> &&iPut)
std::shared_ptr< LuminosityBlockPrincipal > endLuminosityBlock()
std::shared_ptr< ActivityRegistry > actReg_
ProcessBlockPrincipal const * endProcessBlock()
edm::test::ProcessBlock testBeginProcessBlockImpl()
edm::test::LuminosityBlock testBeginLuminosityBlockImpl(edm::LuminosityBlockNumber_t iNum, std::pair< edm::test::ESPutTokenT< T >, std::unique_ptr< T >> &&iPut, U &&...iArgs)
std::vector< std::pair< edm::BranchDescription, std::unique_ptr< WrapperBase > > > dataProducts_
edm::test::Run testBeginRun(edm::RunNumber_t iNum, T &&...iArgs)
std::vector< ESProduceEntry > esProduceEntries_
edm::test::Event testImpl(std::pair< edm::test::ESPutTokenT< T >, std::unique_ptr< T >> &&iPut, U &&...iArgs)
LuminosityBlockNumber_t lumiNumber_
unsigned long long EventNumber_t
edm::test::LuminosityBlock testEndLuminosityBlockImpl()
edm::EDPutTokenT< T > produces(std::string iModuleLabel, std::string iProductInstanceLabel=std::string(), ProcessToken iToken=ProcessToken())
EventNumber_t eventNumber_
void put(std::pair< edm::test::ESPutTokenT< T >, std::unique_ptr< T >> &&iPut)
ProcessContext processContext_
unsigned int LuminosityBlockNumber_t
void beginLuminosityBlock()
tbb::task_group taskGroup_
PreallocationConfiguration preallocations_
~TestProcessor() noexcept(false)
edm::test::Event test(T &&...iArgs)
void setEventNumber(edm::EventNumber_t)
std::shared_ptr< BranchIDListHelper > branchIDListHelper_
void testRunWithNoLuminosityBlocks()
tbb::global_control globalControl_
const TestProcessor & operator=(const TestProcessor &)=delete
static int undefinedIndex()
edm::test::ESPutTokenT< T > esProduces(std::string iLabel=std::string())
std::shared_ptr< EventSetupTestHelper > esHelper_
std::vector< ProduceEntry > produceEntries_
void setPythonConfiguration(std::string iConfig)
std::shared_ptr< ThinnedAssociationsHelper > thinnedAssociationsHelper_
edm::test::Event testImpl(std::pair< edm::EDPutTokenT< T >, std::unique_ptr< T >> &&iPut, U &&...iArgs)
ProduceEntry(edm::TypeID const &iType, std::string moduleLabel, std::string instanceLabel, std::string processName)
std::string labelOfTestModule_
std::unique_ptr< eventsetup::EventSetupsController > espController_
edm::test::Event testImpl()
std::shared_ptr< eventsetup::EventSetupProvider > esp_
std::vector< ProduceEntry > const & produceEntries() const
edm::test::LuminosityBlock testEndLuminosityBlockImpl(std::pair< edm::test::ESPutTokenT< T >, std::unique_ptr< T >> &&iPut, U &&...iArgs)
std::vector< ESProduceEntry > const & esProduceEntries() const
void teardownProcessing()
std::unique_ptr< Schedule > schedule_
std::shared_ptr< ProcessConfiguration const > processConfiguration_
ServiceToken serviceToken_
edm::test::ProcessBlock testEndProcessBlockImpl()
edm::test::ProcessBlock testBeginProcessBlock()
std::shared_ptr< ModuleRegistry > moduleRegistry_
std::string instanceLabel_
bool beginProcessBlockCalled_
void setLuminosityBlockNumber(edm::LuminosityBlockNumber_t)
edm::test::LuminosityBlock testBeginLuminosityBlock(edm::LuminosityBlockNumber_t iNum, T &&...iArgs)
std::string const & labelOfTestModule() const
ProcessToken addExtraProcess(std::string const &iProcessName)
PrincipalCache principalCache_
edm::test::LuminosityBlock testEndRunImpl(std::pair< edm::test::ESPutTokenT< T >, std::unique_ptr< T >> &&iPut, U &&...iArgs)
std::shared_ptr< ProductRegistry > preg_
edm::test::Run testBeginRunImpl(edm::RunNumber_t iNum, std::pair< edm::test::ESPutTokenT< T >, std::unique_ptr< T >> &&iPut, U &&...iArgs)
std::unique_ptr< ExceptionToActionTable const > act_table_
void testLuminosityBlockWithNoEvents()
std::vector< std::string > extraProcesses_
edm::test::ProcessBlock testEndProcessBlock()
edm::test::Run testEndRunImpl()
void setRunNumber(edm::RunNumber_t)
std::unique_ptr< HistoryAppender > historyAppender_
edm::test::LuminosityBlock testEndLuminosityBlock(T &&...iArgs)
TestProcessor(Config const &iConfig, ServiceToken iToken=ServiceToken())
TestProcessorConfig(std::string const &iPythonConfiguration)
std::shared_ptr< LuminosityBlockPrincipal > lumiPrincipal_
std::shared_ptr< ProcessBlockHelper > processBlockHelper_
ProcessHistoryRegistry processHistoryRegistry_
edm::test::Run testEndRun(T &&...iArgs)
std::shared_ptr< RunPrincipal > endRun()
std::string const & pythonConfiguration() const
std::string processName(ProcessToken iToken)
void testBeginAndEndJobOnly()
std::vector< std::string > const & extraProcesses() const
friend TestProcessorConfig