1 #ifndef FWCore_TestProcessor_TestProcessor_h 2 #define FWCore_TestProcessor_TestProcessor_h 55 class ThinnedAssociationsHelper;
56 class ExceptionToActionTable;
57 class HistoryAppender;
59 namespace eventsetup {
61 class EventSetupsController;
65 class TestProcessorConfig;
74 int index()
const {
return index_; }
93 extraProcesses_.emplace_back(iProcessName);
97 std::vector<std::string>
const&
extraProcesses()
const {
return extraProcesses_; }
102 template <
typename T>
106 produceEntries_.emplace_back(
111 template <
typename REC,
typename T>
113 auto rk = eventsetup::EventSetupRecordKey::makeKey<REC>();
115 esProduceEntries_.emplace_back(rk, dk, std::make_shared<
TestDataProxy<T>>());
126 instanceLabel_{
std::move(instanceLabel)},
134 std::vector<ProduceEntry>
const&
produceEntries()
const {
return produceEntries_; }
145 if (iToken.
index() == ProcessToken::undefinedIndex()) {
148 return extraProcesses_[iToken.
index()];
164 return testImpl(std::forward<T>(iArgs)...);
185 beginLuminosityBlock();
186 endLuminosityBlock();
201 template <
typename T,
typename...
U>
204 return testImpl(std::forward<U>(iArgs)...);
207 template <
typename T,
typename...
U>
210 return testImpl(std::forward<U>(iArgs)...);
213 template <
typename T>
215 put(iPut.first.index(), std::make_unique<edm::Wrapper<T>>(
std::move(iPut.second)));
218 template <
typename T>
223 void put(
unsigned int, std::unique_ptr<WrapperBase>);
227 void setupProcessing();
228 void teardownProcessing();
232 void beginLuminosityBlock();
234 void endLuminosityBlock();
241 std::shared_ptr<ProductRegistry>
preg_;
246 std::shared_ptr<eventsetup::EventSetupProvider>
esp_;
263 std::vector<std::pair<edm::BranchDescription, std::unique_ptr<WrapperBase>>>
dataProducts_;
268 bool beginJobCalled_ =
false;
269 bool beginRunCalled_ =
false;
270 bool beginLumiCalled_ =
false;
272 bool newLumi_ =
true;
static const char runNumber_[]
void put(std::pair< edm::EDPutTokenT< T >, std::unique_ptr< T >> &&iPut)
std::shared_ptr< ActivityRegistry > actReg_
std::vector< std::pair< edm::BranchDescription, std::unique_ptr< WrapperBase > > > dataProducts_
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
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_
std::string const & labelOfTestModule() const
ProcessToken addExtraProcess(std::string const &iProcessName)
PrincipalCache principalCache_
std::shared_ptr< ProductRegistry > preg_
std::unique_ptr< ExceptionToActionTable const > act_table_
void testLuminosityBlockWithNoEvents()
std::vector< std::string > extraProcesses_
std::unique_ptr< HistoryAppender > historyAppender_
TestProcessorConfig(std::string const &iPythonConfiguration)
std::shared_ptr< LuminosityBlockPrincipal > lumiPrincipal_
ProcessHistoryRegistry processHistoryRegistry_
std::string const & pythonConfiguration() const
std::string processName(ProcessToken iToken)
void testBeginAndEndJobOnly()
std::vector< std::string > const & extraProcesses() const
friend TestProcessorConfig