1 #ifndef FWCore_TestProcessor_TestProcessor_h 2 #define FWCore_TestProcessor_TestProcessor_h 57 class ThinnedAssociationsHelper;
58 class ExceptionToActionTable;
59 class HistoryAppender;
61 namespace eventsetup {
63 class EventSetupsController;
67 class TestProcessorConfig;
76 int index()
const {
return index_; }
95 extraProcesses_.emplace_back(iProcessName);
99 std::vector<std::string>
const&
extraProcesses()
const {
return extraProcesses_; }
104 template <
typename T>
108 produceEntries_.emplace_back(
113 template <
typename REC,
typename T>
115 auto rk = eventsetup::EventSetupRecordKey::makeKey<REC>();
117 esProduceEntries_.emplace_back(rk, dk, std::make_shared<
TestDataProxy<T>>());
128 instanceLabel_{
std::move(instanceLabel)},
136 std::vector<ProduceEntry>
const&
produceEntries()
const {
return produceEntries_; }
147 if (iToken.
index() == ProcessToken::undefinedIndex()) {
150 return extraProcesses_[iToken.
index()];
166 return testImpl(std::forward<T>(iArgs)...);
169 template <
typename...
T>
171 return testBeginLuminosityBlockImpl(iNum, std::forward<T>(iArgs)...);
173 template <
typename...
T>
175 return testEndLuminosityBlockImpl(std::forward<T>(iArgs)...);
178 template <
typename...
T>
180 return testBeginRunImpl(iNum, std::forward<T>(iArgs)...);
182 template <
typename...
T>
184 return testEndRunImpl(std::forward<T>(iArgs)...);
205 beginLuminosityBlock();
206 endLuminosityBlock();
221 template <
typename T,
typename...
U>
224 return testImpl(std::forward<U>(iArgs)...);
227 template <
typename T,
typename...
U>
230 return testImpl(std::forward<U>(iArgs)...);
233 template <
typename T>
235 put(iPut.first.index(), std::make_unique<edm::Wrapper<T>>(
std::move(iPut.second)));
238 template <
typename T>
243 void put(
unsigned int, std::unique_ptr<WrapperBase>);
247 template <
typename T,
typename...
U>
253 return testBeginLuminosityBlockImpl(iNum, std::forward<U>(iArgs)...);
257 template <
typename T,
typename...
U>
261 return testEndLuminosityBlockImpl(std::forward<U>(iArgs)...);
265 template <
typename T,
typename...
U>
270 return testBeginRunImpl(iNum, std::forward<U>(iArgs)...);
273 template <
typename T,
typename...
U>
277 return testEndRunImpl(std::forward<U>(iArgs)...);
281 void setupProcessing();
282 void teardownProcessing();
286 void beginLuminosityBlock();
288 std::shared_ptr<LuminosityBlockPrincipal> endLuminosityBlock();
289 std::shared_ptr<RunPrincipal>
endRun();
295 std::shared_ptr<ProductRegistry>
preg_;
300 std::shared_ptr<eventsetup::EventSetupProvider>
esp_;
317 std::vector<std::pair<edm::BranchDescription, std::unique_ptr<WrapperBase>>>
dataProducts_;
322 bool beginJobCalled_ =
false;
323 bool beginRunCalled_ =
false;
324 bool beginLumiCalled_ =
false;
static const char runNumber_[]
void put(std::pair< edm::EDPutTokenT< T >, std::unique_ptr< T >> &&iPut)
std::shared_ptr< ActivityRegistry > actReg_
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)
unsigned long long EventNumber_t
edm::EDPutTokenT< T > produces(std::string iModuleLabel, std::string iProductInstanceLabel=std::string(), ProcessToken iToken=ProcessToken())
void put(std::pair< edm::test::ESPutTokenT< T >, std::unique_ptr< T >> &&iPut)
ProcessContext processContext_
unsigned int LuminosityBlockNumber_t
PreallocationConfiguration preallocations_
void put(edm::Event &evt, double value, const char *instanceName)
std::shared_ptr< BranchIDListHelper > branchIDListHelper_
void testRunWithNoLuminosityBlocks()
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_
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
std::unique_ptr< Schedule > schedule_
std::shared_ptr< ProcessConfiguration const > processConfiguration_
ServiceToken serviceToken_
def template(fileName, svg, replaceme="REPLACEME")
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
std::shared_ptr< ModuleRegistry > moduleRegistry_
std::string instanceLabel_
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_
std::unique_ptr< HistoryAppender > historyAppender_
edm::test::LuminosityBlock testEndLuminosityBlock(T &&...iArgs)
TestProcessorConfig(std::string const &iPythonConfiguration)
std::shared_ptr< LuminosityBlockPrincipal > lumiPrincipal_
ProcessHistoryRegistry processHistoryRegistry_
edm::test::Run testEndRun(T &&...iArgs)
std::string const & pythonConfiguration() const
std::string processName(ProcessToken iToken)
void testBeginAndEndJobOnly()
std::vector< std::string > const & extraProcesses() const
friend TestProcessorConfig