1 #ifndef FWCore_TestProcessor_TestProcessor_h 2 #define FWCore_TestProcessor_TestProcessor_h 56 class ThinnedAssociationsHelper;
57 class ExceptionToActionTable;
58 class HistoryAppender;
60 namespace eventsetup {
62 class EventSetupsController;
66 class TestProcessorConfig;
74 int index()
const {
return index_;}
86 config_(iPythonConfiguration)
94 extraProcesses_.emplace_back(iProcessName);
98 std::vector<std::string>
const&
extraProcesses()
const {
return extraProcesses_;}
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_;}
139 return esProduceEntries_;
149 if(iToken.
index() == ProcessToken::undefinedIndex()) {
152 return extraProcesses_[iToken.
index()];
169 return testImpl(std::forward<T>(iArgs)...);
187 beginLuminosityBlock();
188 endLuminosityBlock();
197 return labelOfTestModule_;
205 template<
typename T,
typename...
U>
208 return testImpl(std::forward<U>(iArgs)...);
211 template<
typename T,
typename...
U>
214 return testImpl(std::forward<U>(iArgs)...);
217 template<
typename T>
219 put(iPut.first.index(), std::make_unique<edm::Wrapper<T>>(
std::move(iPut.second)));
227 void put(
unsigned int, std::unique_ptr<WrapperBase>);
231 void setupProcessing();
232 void teardownProcessing();
236 void beginLuminosityBlock();
238 void endLuminosityBlock();
245 std::shared_ptr<ProductRegistry>
preg_;
250 std::shared_ptr<eventsetup::EventSetupProvider>
esp_;
267 std::vector<std::pair<edm::BranchDescription,std::unique_ptr<WrapperBase>>>
dataProducts_;
272 bool beginJobCalled_ =
false;
273 bool beginRunCalled_ =
false;
274 bool beginLumiCalled_ =
false;
276 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< 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::vector< std::pair< edm::BranchDescription, std::unique_ptr< WrapperBase > > > dataProducts_
std::string const & pythonConfiguration() const
std::string processName(ProcessToken iToken)
void testBeginAndEndJobOnly()
std::vector< std::string > const & extraProcesses() const
friend TestProcessorConfig