CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
edm::test::TestProcessor Class Reference

#include <TestProcessor.h>

Public Types

using Config = TestProcessorConfig
 

Public Member Functions

std::string const & labelOfTestModule () const
 
void setEventNumber (edm::EventNumber_t)
 
void setLuminosityBlockNumber (edm::LuminosityBlockNumber_t)
 
void setRunNumber (edm::RunNumber_t)
 
template<typename... T>
edm::test::Event test (T &&...iArgs)
 
void testBeginAndEndJobOnly ()
 
template<typename... T>
edm::test::LuminosityBlock testBeginLuminosityBlock (edm::LuminosityBlockNumber_t iNum, T &&...iArgs)
 
template<typename... T>
edm::test::Run testBeginRun (edm::RunNumber_t iNum, T &&...iArgs)
 
template<typename... T>
edm::test::LuminosityBlock testEndLuminosityBlock (T &&...iArgs)
 
template<typename... T>
edm::test::Run testEndRun (T &&...iArgs)
 
void testLuminosityBlockWithNoEvents ()
 
 TestProcessor (Config const &iConfig, ServiceToken iToken=ServiceToken())
 
void testRunWithNoLuminosityBlocks ()
 
 ~TestProcessor ()(false)
 

Private Member Functions

void beginJob ()
 
void beginLuminosityBlock ()
 
void beginRun ()
 
void endJob ()
 
std::shared_ptr< LuminosityBlockPrincipalendLuminosityBlock ()
 
std::shared_ptr< RunPrincipalendRun ()
 
void event ()
 
const TestProcessoroperator= (const TestProcessor &)=delete
 
template<typename T >
void put (std::pair< edm::EDPutTokenT< T >, std::unique_ptr< T >> &&iPut)
 
template<typename T >
void put (std::pair< edm::test::ESPutTokenT< T >, std::unique_ptr< T >> &&iPut)
 
void put (unsigned int, std::unique_ptr< WrapperBase >)
 
void setupProcessing ()
 
void teardownProcessing ()
 
template<typename T , typename... U>
edm::test::LuminosityBlock testBeginLuminosityBlockImpl (edm::LuminosityBlockNumber_t iNum, std::pair< edm::test::ESPutTokenT< T >, std::unique_ptr< T >> &&iPut, U &&...iArgs)
 
edm::test::LuminosityBlock testBeginLuminosityBlockImpl (edm::LuminosityBlockNumber_t)
 
template<typename T , typename... U>
edm::test::Run testBeginRunImpl (edm::RunNumber_t iNum, std::pair< edm::test::ESPutTokenT< T >, std::unique_ptr< T >> &&iPut, U &&...iArgs)
 
edm::test::Run testBeginRunImpl (edm::RunNumber_t)
 
template<typename T , typename... U>
edm::test::LuminosityBlock testEndLuminosityBlockImpl (std::pair< edm::test::ESPutTokenT< T >, std::unique_ptr< T >> &&iPut, U &&...iArgs)
 
edm::test::LuminosityBlock testEndLuminosityBlockImpl ()
 
template<typename T , typename... U>
edm::test::LuminosityBlock testEndRunImpl (std::pair< edm::test::ESPutTokenT< T >, std::unique_ptr< T >> &&iPut, U &&...iArgs)
 
edm::test::Run testEndRunImpl ()
 
template<typename T , typename... U>
edm::test::Event testImpl (std::pair< edm::EDPutTokenT< T >, std::unique_ptr< T >> &&iPut, U &&...iArgs)
 
template<typename T , typename... U>
edm::test::Event testImpl (std::pair< edm::test::ESPutTokenT< T >, std::unique_ptr< T >> &&iPut, U &&...iArgs)
 
edm::test::Event testImpl ()
 
 TestProcessor (const TestProcessor &)=delete
 

Private Attributes

std::unique_ptr< ExceptionToActionTable const > act_table_
 
std::shared_ptr< ActivityRegistryactReg_
 
bool beginJobCalled_ = false
 
bool beginLumiCalled_ = false
 
bool beginRunCalled_ = false
 
std::shared_ptr< BranchIDListHelperbranchIDListHelper_
 
std::vector< std::pair< edm::BranchDescription, std::unique_ptr< WrapperBase > > > dataProducts_
 
std::shared_ptr< EventSetupTestHelperesHelper_
 
std::shared_ptr< eventsetup::EventSetupProvideresp_
 
std::unique_ptr< eventsetup::EventSetupsControllerespController_
 
EventNumber_t eventNumber_ = 1
 
std::unique_ptr< HistoryAppenderhistoryAppender_
 
std::string labelOfTestModule_
 
LuminosityBlockNumber_t lumiNumber_ = 1
 
std::shared_ptr< LuminosityBlockPrincipallumiPrincipal_
 
std::shared_ptr< ModuleRegistrymoduleRegistry_
 
PreallocationConfiguration preallocations_
 
std::shared_ptr< ProductRegistrypreg_
 
PrincipalCache principalCache_
 
std::shared_ptr< ProcessConfiguration const > processConfiguration_
 
ProcessContext processContext_
 
ProcessHistoryRegistry processHistoryRegistry_
 
RunNumber_t runNumber_ = 1
 
std::unique_ptr< Scheduleschedule_
 
ServiceToken serviceToken_
 
std::shared_ptr< ThinnedAssociationsHelperthinnedAssociationsHelper_
 

Detailed Description

Definition at line 154 of file TestProcessor.h.

Member Typedef Documentation

Definition at line 156 of file TestProcessor.h.

Constructor & Destructor Documentation

TestProcessor::TestProcessor ( Config const &  iConfig,
ServiceToken  iToken = ServiceToken() 
)

Definition at line 84 of file TestProcessor.cc.

References edm::ScheduleItems::act_table_, act_table_, edm::ScheduleItems::actReg_, actReg_, edm::ScheduleItems::addCPRandTNS(), edm::ScheduleItems::branchIDListHelper(), branchIDListHelper_, trackingPlots::common, dataProducts_, edm::ProcessHistory::emplace_back(), esHelper_, esp_, espController_, edm::test::TestProcessorConfig::esProduceEntries(), edm::test::TestProcessorConfig::extraProcesses(), historyAppender_, edm::ParameterSet::id(), edm::InEvent, edm::BranchDescription::init(), edm::ScheduleItems::initMisc(), edm::ScheduleItems::initSchedule(), edm::ScheduleItems::initServices(), edm::PrincipalCache::insert(), mps_monitormerge::items, edm::serviceregistry::kOverlapIsError, labelOfTestModule_, eostools::move(), jets_cff::nThreads, edm::PreallocationConfiguration::numberOfLuminosityBlocks(), edm::PreallocationConfiguration::numberOfStreams(), cmsPerfStripChart::operate(), AlCaHLTBitMon_ParallelJobs::p, PyBind11ProcessDesc::parameterSet(), preallocations_, edm::ScheduleItems::preg(), preg_, principalCache_, edm::ScheduleItems::processConfiguration(), processConfiguration_, processContext_, processHistoryRegistry_, modifiedElectrons_cfi::processName, edm::test::TestProcessorConfig::produceEntries(), edm::test::TestProcessorConfig::pythonConfiguration(), edm::ParameterSet::registerIt(), edm::ProcessHistoryRegistry::registerProcessHistory(), schedule_, serviceToken_, edm::PrincipalCache::setNumberOfConcurrentPrincipals(), edm::ProcessContext::setProcessConfiguration(), edm::PrincipalCache::setProcessHistoryRegistry(), AlCaHLTBitMon_QueryRunRegistry::string, edm::ScheduleItems::thinnedAssociationsHelper(), thinnedAssociationsHelper_, mitigatedMETSequence_cff::U, edm::validateTopLevelParameterSets(), and xstr.

85  : espController_(std::make_unique<eventsetup::EventSetupsController>()),
86  historyAppender_(std::make_unique<HistoryAppender>()),
87  moduleRegistry_(std::make_shared<ModuleRegistry>()) {
88  //Setup various singletons
89  (void)oneTimeInitialization();
90 
91  ProcessDescImpl desc(iConfig.pythonConfiguration());
92 
93  auto psetPtr = desc.parameterSet();
94 
95  validateTopLevelParameterSets(psetPtr.get());
96 
97  labelOfTestModule_ = psetPtr->getParameter<std::string>("@moduleToTest");
98 
99  auto procDesc = desc.processDesc();
100  // Now do general initialization
101  ScheduleItems items;
102 
103  //initialize the services
104  auto& serviceSets = procDesc->getServicesPSets();
105  ServiceToken token = items.initServices(serviceSets, *psetPtr, iToken, serviceregistry::kOverlapIsError, true);
106  serviceToken_ = items.addCPRandTNS(*psetPtr, token);
107 
108  //make the services available
110 
111  // intialize miscellaneous items
112  std::shared_ptr<CommonParams> common(items.initMisc(*psetPtr));
113 
114  // intialize the event setup provider
115  esp_ = espController_->makeProvider(*psetPtr, items.actReg_.get());
116 
117  if (not iConfig.esProduceEntries().empty()) {
118  esHelper_ = std::make_unique<EventSetupTestHelper>(iConfig.esProduceEntries());
119  esp_->add(std::dynamic_pointer_cast<eventsetup::DataProxyProvider>(esHelper_));
120  esp_->add(std::dynamic_pointer_cast<EventSetupRecordIntervalFinder>(esHelper_));
121  }
122 
123  auto nThreads = 1U;
124  auto nStreams = 1U;
125  auto nConcurrentLumis = 1U;
126  auto nConcurrentRuns = 1U;
127  preallocations_ = PreallocationConfiguration{nThreads, nStreams, nConcurrentLumis, nConcurrentRuns};
128 
129  preg_ = items.preg();
130  processConfiguration_ = items.processConfiguration();
131 
132  edm::ParameterSet emptyPSet;
133  emptyPSet.registerIt();
134  auto psetid = emptyPSet.id();
135 
136  ProcessHistory oldHistory;
137  for (auto const& p : iConfig.extraProcesses()) {
138  oldHistory.emplace_back(p, psetid, xstr(PROJECT_VERSION), "0");
140  }
141 
142  //setup the products we will be adding to the event
143  for (auto const& produce : iConfig.produceEntries()) {
144  auto processName = produce.processName_;
145  if (processName.empty()) {
146  processName = processConfiguration_->processName();
147  }
148  edm::TypeWithDict twd(produce.type_.typeInfo());
150  produce.moduleLabel_,
151  processName,
152  twd.userClassName(),
153  twd.friendlyClassName(),
154  produce.instanceLabel_,
155  "",
156  psetid,
157  twd,
158  true //force this to come from 'source'
159  );
160  product.init();
161  dataProducts_.emplace_back(product, std::unique_ptr<WrapperBase>());
162  preg_->addProduct(product);
163  }
164 
165  schedule_ = items.initSchedule(*psetPtr, false, preallocations_, &processContext_);
166  // set the data members
167  act_table_ = std::move(items.act_table_);
168  actReg_ = items.actReg_;
169  branchIDListHelper_ = items.branchIDListHelper();
170  thinnedAssociationsHelper_ = items.thinnedAssociationsHelper();
173 
175 
176  preg_->setFrozen();
177  for (unsigned int index = 0; index < preallocations_.numberOfStreams(); ++index) {
178  // Reusable event principal
179  auto ep = std::make_shared<EventPrincipal>(preg_,
183  historyAppender_.get(),
184  index);
186  }
187 
188  for (unsigned int index = 0; index < preallocations_.numberOfLuminosityBlocks(); ++index) {
189  auto lp =
190  std::make_unique<LuminosityBlockPrincipal>(preg_, *processConfiguration_, historyAppender_.get(), index);
192  }
193  }
void insert(std::shared_ptr< RunPrincipal > rp)
std::shared_ptr< ActivityRegistry > actReg_
std::unique_ptr< edm::ParameterSet > parameterSet() const
#define xstr(s)
void setNumberOfConcurrentPrincipals(PreallocationConfiguration const &)
std::vector< std::pair< edm::BranchDescription, std::unique_ptr< WrapperBase > > > dataProducts_
ParameterSetID id() const
bool registerProcessHistory(ProcessHistory const &processHistory)
ProcessContext processContext_
PreallocationConfiguration preallocations_
void validateTopLevelParameterSets(ParameterSet *processParameterSet)
std::shared_ptr< BranchIDListHelper > branchIDListHelper_
std::shared_ptr< EventSetupTestHelper > esHelper_
std::shared_ptr< ThinnedAssociationsHelper > thinnedAssociationsHelper_
std::string labelOfTestModule_
std::unique_ptr< eventsetup::EventSetupsController > espController_
std::shared_ptr< eventsetup::EventSetupProvider > esp_
std::unique_ptr< Schedule > schedule_
std::shared_ptr< ProcessConfiguration const > processConfiguration_
std::shared_ptr< ModuleRegistry > moduleRegistry_
void setProcessConfiguration(ProcessConfiguration const *processConfiguration)
void setProcessHistoryRegistry(ProcessHistoryRegistry const &phr)
PrincipalCache principalCache_
std::shared_ptr< ProductRegistry > preg_
std::unique_ptr< ExceptionToActionTable const > act_table_
std::unique_ptr< HistoryAppender > historyAppender_
ProcessHistoryRegistry processHistoryRegistry_
ParameterSet const & registerIt()
def move(src, dest)
Definition: eostools.py:511
def operate(timelog, memlog, json_f, num)
TestProcessor::~TestProcessor ( )

Definition at line 195 of file TestProcessor.cc.

References teardownProcessing().

edm::test::TestProcessor::TestProcessor ( const TestProcessor )
privatedelete

Member Function Documentation

void TestProcessor::beginJob ( void  )
private

Definition at line 328 of file TestProcessor.cc.

References actReg_, beginJobCalled_, esp_, mps_fire::i, edm::PreallocationConfiguration::numberOfLuminosityBlocks(), edm::PreallocationConfiguration::numberOfRuns(), edm::PreallocationConfiguration::numberOfStreams(), edm::PreallocationConfiguration::numberOfThreads(), cmsPerfStripChart::operate(), preallocations_, preg_, processConfiguration_, processContext_, schedule_, and serviceToken_.

Referenced by setupProcessing(), testBeginLuminosityBlockImpl(), testBeginRunImpl(), testEndLuminosityBlockImpl(), and testEndRunImpl().

328  {
330 
331  service::SystemBounds bounds(preallocations_.numberOfStreams(),
335  actReg_->preallocateSignal_(bounds);
336  schedule_->convertCurrentProcessAlias(processConfiguration_->processName());
337  PathsAndConsumesOfModules pathsAndConsumesOfModules;
338 
339  //The code assumes only modules make data in the current process
340  // Since the test os also allowed to do so, it can lead to problems.
341  //pathsAndConsumesOfModules.initialize(schedule_.get(), preg_);
342 
343  //NOTE: this may throw
344  //checkForModuleDependencyCorrectness(pathsAndConsumesOfModules, false);
345  actReg_->preBeginJobSignal_(pathsAndConsumesOfModules, processContext_);
346 
347  schedule_->beginJob(*preg_, esp_->recordsToProxyIndices());
348  actReg_->postBeginJobSignal_();
349 
350  for (unsigned int i = 0; i < preallocations_.numberOfStreams(); ++i) {
351  schedule_->beginStream(i);
352  }
353  beginJobCalled_ = true;
354  }
std::shared_ptr< ActivityRegistry > actReg_
ProcessContext processContext_
PreallocationConfiguration preallocations_
std::shared_ptr< eventsetup::EventSetupProvider > esp_
std::unique_ptr< Schedule > schedule_
std::shared_ptr< ProcessConfiguration const > processConfiguration_
std::shared_ptr< ProductRegistry > preg_
def operate(timelog, memlog, json_f, num)
void TestProcessor::beginLuminosityBlock ( )
private

Definition at line 405 of file TestProcessor.cc.

References printConversionInfo::aux, beginLumiCalled_, esp_, espController_, eventNumber_, edm::PrincipalCache::getAvailableLumiPrincipalPtr(), lumiNumber_, lumiPrincipal_, edm::make_empty_waiting_task(), edm::PreallocationConfiguration::numberOfStreams(), preallocations_, principalCache_, runNumber_, edm::PrincipalCache::runPrincipalPtr(), schedule_, and serviceToken_.

Referenced by setupProcessing(), testBeginLuminosityBlockImpl(), and testEndLuminosityBlockImpl().

405  {
406  LuminosityBlockAuxiliary aux(runNumber_, lumiNumber_, Timestamp(), Timestamp());
408  lumiPrincipal_->clearPrincipal();
409  assert(lumiPrincipal_);
410  lumiPrincipal_->setAux(aux);
411 
412  lumiPrincipal_->setRunPrincipal(principalCache_.runPrincipalPtr());
413 
414  IOVSyncValue ts(EventID(runNumber_, lumiNumber_, eventNumber_), lumiPrincipal_->beginTime());
415  espController_->eventSetupForInstance(ts);
416 
417  auto const& es = esp_->eventSetup();
418 
419  std::vector<edm::SubProcess> emptyList;
420  {
421  typedef OccurrenceTraits<LuminosityBlockPrincipal, BranchActionGlobalBegin> Traits;
422  auto globalWaitTask = make_empty_waiting_task();
423  globalWaitTask->increment_ref_count();
424  beginGlobalTransitionAsync<Traits>(
425  WaitingTaskHolder(globalWaitTask.get()), *schedule_, *lumiPrincipal_, ts, es, serviceToken_, emptyList);
426  globalWaitTask->wait_for_all();
427  if (globalWaitTask->exceptionPtr() != nullptr) {
428  std::rethrow_exception(*(globalWaitTask->exceptionPtr()));
429  }
430  }
431  {
432  //To wait, the ref count has to be 1+#streams
433  auto streamLoopWaitTask = make_empty_waiting_task();
434  streamLoopWaitTask->increment_ref_count();
435 
436  typedef OccurrenceTraits<LuminosityBlockPrincipal, BranchActionStreamBegin> Traits;
437 
438  beginStreamsTransitionAsync<Traits>(streamLoopWaitTask.get(),
439  *schedule_,
442  ts,
443  es,
445  emptyList);
446 
447  streamLoopWaitTask->wait_for_all();
448  if (streamLoopWaitTask->exceptionPtr() != nullptr) {
449  std::rethrow_exception(*(streamLoopWaitTask->exceptionPtr()));
450  }
451  }
452  beginLumiCalled_ = true;
453  }
LuminosityBlockNumber_t lumiNumber_
EventNumber_t eventNumber_
PreallocationConfiguration preallocations_
std::unique_ptr< edm::EmptyWaitingTask, waitingtask::TaskDestroyer > make_empty_waiting_task()
Create an EmptyWaitingTask which will properly be destroyed.
std::unique_ptr< eventsetup::EventSetupsController > espController_
std::shared_ptr< eventsetup::EventSetupProvider > esp_
std::unique_ptr< Schedule > schedule_
PrincipalCache principalCache_
std::shared_ptr< RunPrincipal > const & runPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run) const
std::shared_ptr< LuminosityBlockPrincipal > getAvailableLumiPrincipalPtr()
std::shared_ptr< LuminosityBlockPrincipal > lumiPrincipal_
void TestProcessor::beginRun ( )
private

Definition at line 356 of file TestProcessor.cc.

References printConversionInfo::aux, beginRunCalled_, edm::RunPrincipal::beginTime(), esp_, espController_, historyAppender_, edm::PrincipalCache::insert(), edm::make_empty_waiting_task(), edm::PreallocationConfiguration::numberOfStreams(), preallocations_, preg_, principalCache_, processConfiguration_, edm::RunPrincipal::run(), runNumber_, edm::PrincipalCache::runPrincipal(), schedule_, and serviceToken_.

Referenced by setupProcessing(), testBeginLuminosityBlockImpl(), testBeginRunImpl(), testEndLuminosityBlockImpl(), and testEndRunImpl().

356  {
357  ProcessHistoryID phid;
358  auto aux = std::make_shared<RunAuxiliary>(runNumber_, Timestamp(), Timestamp());
359  auto rp = std::make_shared<RunPrincipal>(aux, preg_, *processConfiguration_, historyAppender_.get(), 0);
360 
362  RunPrincipal& runPrincipal = principalCache_.runPrincipal(phid, runNumber_);
363 
364  IOVSyncValue ts(EventID(runPrincipal.run(), 0, 0), runPrincipal.beginTime());
365  espController_->eventSetupForInstance(ts);
366 
367  auto const& es = esp_->eventSetup();
368 
369  std::vector<edm::SubProcess> emptyList;
370  {
371  typedef OccurrenceTraits<RunPrincipal, BranchActionGlobalBegin> Traits;
372  auto globalWaitTask = make_empty_waiting_task();
373  globalWaitTask->increment_ref_count();
374  beginGlobalTransitionAsync<Traits>(
375  WaitingTaskHolder(globalWaitTask.get()), *schedule_, runPrincipal, ts, es, serviceToken_, emptyList);
376  globalWaitTask->wait_for_all();
377  if (globalWaitTask->exceptionPtr() != nullptr) {
378  std::rethrow_exception(*(globalWaitTask->exceptionPtr()));
379  }
380  }
381  {
382  //To wait, the ref count has to be 1+#streams
383  auto streamLoopWaitTask = make_empty_waiting_task();
384  streamLoopWaitTask->increment_ref_count();
385 
386  typedef OccurrenceTraits<RunPrincipal, BranchActionStreamBegin> Traits;
387 
388  beginStreamsTransitionAsync<Traits>(streamLoopWaitTask.get(),
389  *schedule_,
391  runPrincipal,
392  ts,
393  es,
395  emptyList);
396 
397  streamLoopWaitTask->wait_for_all();
398  if (streamLoopWaitTask->exceptionPtr() != nullptr) {
399  std::rethrow_exception(*(streamLoopWaitTask->exceptionPtr()));
400  }
401  }
402  beginRunCalled_ = true;
403  }
void insert(std::shared_ptr< RunPrincipal > rp)
PreallocationConfiguration preallocations_
std::unique_ptr< edm::EmptyWaitingTask, waitingtask::TaskDestroyer > make_empty_waiting_task()
Create an EmptyWaitingTask which will properly be destroyed.
std::unique_ptr< eventsetup::EventSetupsController > espController_
std::shared_ptr< eventsetup::EventSetupProvider > esp_
std::unique_ptr< Schedule > schedule_
std::shared_ptr< ProcessConfiguration const > processConfiguration_
Hash< ProcessHistoryType > ProcessHistoryID
PrincipalCache principalCache_
std::shared_ptr< ProductRegistry > preg_
std::unique_ptr< HistoryAppender > historyAppender_
RunPrincipal & runPrincipal(ProcessHistoryID const &phid, RunNumber_t run) const
void TestProcessor::endJob ( void  )
private

Definition at line 613 of file TestProcessor.cc.

References actReg_, EnergyCorrector::c, edm::ExceptionCollector::call(), edm::ExceptionCollector::hasThrown(), mps_fire::i, edm::PreallocationConfiguration::numberOfStreams(), cmsPerfStripChart::operate(), preallocations_, edm::ExceptionCollector::rethrow(), schedule_, and serviceToken_.

Referenced by teardownProcessing().

613  {
614  // Collects exceptions, so we don't throw before all operations are performed.
615  ExceptionCollector c(
616  "Multiple exceptions were thrown while executing endJob. An exception message follows for each.\n");
617 
618  //make the services available
620 
621  //NOTE: this really should go elsewhere in the future
622  for (unsigned int i = 0; i < preallocations_.numberOfStreams(); ++i) {
623  c.call([this, i]() { this->schedule_->endStream(i); });
624  }
625  auto actReg = actReg_.get();
626  c.call([actReg]() { actReg->preEndJobSignal_(); });
627  schedule_->endJob(c);
628  c.call([actReg]() { actReg->postEndJobSignal_(); });
629  if (c.hasThrown()) {
630  c.rethrow();
631  }
632  }
std::shared_ptr< ActivityRegistry > actReg_
PreallocationConfiguration preallocations_
std::unique_ptr< Schedule > schedule_
def operate(timelog, memlog, json_f, num)
std::shared_ptr< LuminosityBlockPrincipal > TestProcessor::endLuminosityBlock ( )
private

Definition at line 493 of file TestProcessor.cc.

References beginLumiCalled_, esp_, espController_, eventNumber_, lumiNumber_, lumiPrincipal_, edm::make_empty_waiting_task(), edm::PreallocationConfiguration::numberOfStreams(), preallocations_, runNumber_, schedule_, and serviceToken_.

Referenced by setLuminosityBlockNumber(), setRunNumber(), teardownProcessing(), testBeginLuminosityBlockImpl(), and testEndLuminosityBlockImpl().

493  {
494  auto lumiPrincipal = lumiPrincipal_;
495  if (beginLumiCalled_) {
496  beginLumiCalled_ = false;
497  lumiPrincipal_.reset();
498 
499  IOVSyncValue ts(EventID(runNumber_, lumiNumber_, eventNumber_), lumiPrincipal->endTime());
500  espController_->eventSetupForInstance(ts);
501 
502  auto const& es = esp_->eventSetup();
503 
504  std::vector<edm::SubProcess> emptyList;
505 
506  //To wait, the ref count has to be 1+#streams
507  {
508  auto streamLoopWaitTask = make_empty_waiting_task();
509  streamLoopWaitTask->increment_ref_count();
510 
511  using Traits = OccurrenceTraits<LuminosityBlockPrincipal, BranchActionStreamEnd>;
512 
513  endStreamsTransitionAsync<Traits>(WaitingTaskHolder(streamLoopWaitTask.get()),
514  *schedule_,
516  *lumiPrincipal,
517  ts,
518  es,
520  emptyList,
521  false);
522 
523  streamLoopWaitTask->wait_for_all();
524  if (streamLoopWaitTask->exceptionPtr() != nullptr) {
525  std::rethrow_exception(*(streamLoopWaitTask->exceptionPtr()));
526  }
527  }
528  {
529  auto globalWaitTask = make_empty_waiting_task();
530  globalWaitTask->increment_ref_count();
531 
532  typedef OccurrenceTraits<LuminosityBlockPrincipal, BranchActionGlobalEnd> Traits;
533  endGlobalTransitionAsync<Traits>(WaitingTaskHolder(globalWaitTask.get()),
534  *schedule_,
535  *lumiPrincipal,
536  ts,
537  es,
538  serviceToken_,
539  emptyList,
540  false);
541  globalWaitTask->wait_for_all();
542  if (globalWaitTask->exceptionPtr() != nullptr) {
543  std::rethrow_exception(*(globalWaitTask->exceptionPtr()));
544  }
545  }
546  }
547  return lumiPrincipal;
548  }
LuminosityBlockNumber_t lumiNumber_
EventNumber_t eventNumber_
PreallocationConfiguration preallocations_
std::unique_ptr< edm::EmptyWaitingTask, waitingtask::TaskDestroyer > make_empty_waiting_task()
Create an EmptyWaitingTask which will properly be destroyed.
std::unique_ptr< eventsetup::EventSetupsController > espController_
std::shared_ptr< eventsetup::EventSetupProvider > esp_
std::unique_ptr< Schedule > schedule_
std::shared_ptr< LuminosityBlockPrincipal > lumiPrincipal_
std::shared_ptr< edm::RunPrincipal > TestProcessor::endRun ( )
private

Definition at line 550 of file TestProcessor.cc.

References beginRunCalled_, edm::PrincipalCache::deleteRun(), edm::RunPrincipal::endTime(), esp_, espController_, edm::make_empty_waiting_task(), edm::EventID::maxEventNumber(), edm::LuminosityBlockID::maxLuminosityBlockNumber(), edm::PreallocationConfiguration::numberOfStreams(), preallocations_, principalCache_, edm::RunPrincipal::run(), runNumber_, edm::PrincipalCache::runPrincipalPtr(), schedule_, and serviceToken_.

Referenced by setRunNumber(), teardownProcessing(), testBeginRunImpl(), and testEndRunImpl().

550  {
551  std::shared_ptr<RunPrincipal> rp;
552  if (beginRunCalled_) {
553  beginRunCalled_ = false;
554  ProcessHistoryID phid;
556  RunPrincipal& runPrincipal = *rp;
557 
558  IOVSyncValue ts(
560  runPrincipal.endTime());
561  espController_->eventSetupForInstance(ts);
562 
563  auto const& es = esp_->eventSetup();
564 
565  std::vector<edm::SubProcess> emptyList;
566 
567  //To wait, the ref count has to be 1+#streams
568  {
569  auto streamLoopWaitTask = make_empty_waiting_task();
570  streamLoopWaitTask->increment_ref_count();
571 
572  using Traits = OccurrenceTraits<RunPrincipal, BranchActionStreamEnd>;
573 
574  endStreamsTransitionAsync<Traits>(WaitingTaskHolder(streamLoopWaitTask.get()),
575  *schedule_,
577  runPrincipal,
578  ts,
579  es,
581  emptyList,
582  false);
583 
584  streamLoopWaitTask->wait_for_all();
585  if (streamLoopWaitTask->exceptionPtr() != nullptr) {
586  std::rethrow_exception(*(streamLoopWaitTask->exceptionPtr()));
587  }
588  }
589  {
590  auto globalWaitTask = make_empty_waiting_task();
591  globalWaitTask->increment_ref_count();
592 
593  typedef OccurrenceTraits<RunPrincipal, BranchActionGlobalEnd> Traits;
594  endGlobalTransitionAsync<Traits>(WaitingTaskHolder(globalWaitTask.get()),
595  *schedule_,
596  runPrincipal,
597  ts,
598  es,
599  serviceToken_,
600  emptyList,
601  false);
602  globalWaitTask->wait_for_all();
603  if (globalWaitTask->exceptionPtr() != nullptr) {
604  std::rethrow_exception(*(globalWaitTask->exceptionPtr()));
605  }
606  }
607 
609  }
610  return rp;
611  }
static LuminosityBlockNumber_t maxLuminosityBlockNumber()
PreallocationConfiguration preallocations_
std::unique_ptr< edm::EmptyWaitingTask, waitingtask::TaskDestroyer > make_empty_waiting_task()
Create an EmptyWaitingTask which will properly be destroyed.
std::unique_ptr< eventsetup::EventSetupsController > espController_
std::shared_ptr< eventsetup::EventSetupProvider > esp_
std::unique_ptr< Schedule > schedule_
Hash< ProcessHistoryType > ProcessHistoryID
PrincipalCache principalCache_
void deleteRun(ProcessHistoryID const &phid, RunNumber_t run)
static EventNumber_t maxEventNumber()
Definition: EventID.h:111
std::shared_ptr< RunPrincipal > const & runPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run) const
void TestProcessor::event ( )
private

Definition at line 455 of file TestProcessor.cc.

References dataProducts_, esp_, eventNumber_, edm::PrincipalCache::eventPrincipal(), lumiNumber_, lumiPrincipal_, edm::make_empty_waiting_task(), eostools::move(), cmsPerfStripChart::operate(), AlCaHLTBitMon_ParallelJobs::p, principalCache_, processHistoryRegistry_, alignCSCRings::r, runNumber_, schedule_, and serviceToken_.

Referenced by testImpl().

455  {
456  auto pep = &(principalCache_.eventPrincipal(0));
457 
458  //this resets the EventPrincipal (if it had been used before)
459  pep->clearEventPrincipal();
460  pep->fillEventPrincipal(
463  nullptr);
464  assert(lumiPrincipal_.get() != nullptr);
465  pep->setLuminosityBlockPrincipal(lumiPrincipal_.get());
466 
467  for (auto& p : dataProducts_) {
468  if (p.second) {
469  pep->put(p.first, std::move(p.second), ProductProvenance(p.first.branchID()));
470  } else {
471  //The data product was not set so we need to
472  // tell the ProductResolver not to wait
473  auto r = pep->getProductResolver(p.first.branchID());
474  r->putProduct(std::unique_ptr<WrapperBase>());
475  }
476  }
477 
479 
480  auto waitTask = make_empty_waiting_task();
481  waitTask->increment_ref_count();
482 
483  schedule_->processOneEventAsync(
484  edm::WaitingTaskHolder(waitTask.get()), 0, *pep, esp_->eventSetup(), serviceToken_);
485 
486  waitTask->wait_for_all();
487  if (waitTask->exceptionPtr() != nullptr) {
488  std::rethrow_exception(*(waitTask->exceptionPtr()));
489  }
490  ++eventNumber_;
491  }
std::vector< std::pair< edm::BranchDescription, std::unique_ptr< WrapperBase > > > dataProducts_
LuminosityBlockNumber_t lumiNumber_
EventNumber_t eventNumber_
std::unique_ptr< edm::EmptyWaitingTask, waitingtask::TaskDestroyer > make_empty_waiting_task()
Create an EmptyWaitingTask which will properly be destroyed.
std::shared_ptr< eventsetup::EventSetupProvider > esp_
std::unique_ptr< Schedule > schedule_
EventPrincipal & eventPrincipal(unsigned int iStreamIndex) const
PrincipalCache principalCache_
std::shared_ptr< LuminosityBlockPrincipal > lumiPrincipal_
ProcessHistoryRegistry processHistoryRegistry_
def move(src, dest)
Definition: eostools.py:511
def operate(timelog, memlog, json_f, num)
std::string const& edm::test::TestProcessor::labelOfTestModule ( ) const
inline

Definition at line 214 of file TestProcessor.h.

References mitigatedMETSequence_cff::U.

214 { return labelOfTestModule_; }
std::string labelOfTestModule_
const TestProcessor& edm::test::TestProcessor::operator= ( const TestProcessor )
privatedelete
template<typename T >
void edm::test::TestProcessor::put ( std::pair< edm::EDPutTokenT< T >, std::unique_ptr< T >> &&  iPut)
inlineprivate

Definition at line 234 of file TestProcessor.h.

References eostools::move(), and put().

234  {
235  put(iPut.first.index(), std::make_unique<edm::Wrapper<T>>(std::move(iPut.second)));
236  }
void put(std::pair< edm::EDPutTokenT< T >, std::unique_ptr< T >> &&iPut)
def move(src, dest)
Definition: eostools.py:511
template<typename T >
void edm::test::TestProcessor::put ( std::pair< edm::test::ESPutTokenT< T >, std::unique_ptr< T >> &&  iPut)
inlineprivate

Definition at line 239 of file TestProcessor.h.

References eostools::move(), put(), and mitigatedMETSequence_cff::U.

239  {
240  dynamic_cast<TestDataProxy<T>*>(esHelper_->getProxy(iPut.first.index()).get())->setData(std::move(iPut.second));
241  }
std::shared_ptr< EventSetupTestHelper > esHelper_
def move(src, dest)
Definition: eostools.py:511
void TestProcessor::put ( unsigned int  index,
std::unique_ptr< WrapperBase iWrapper 
)
private

Definition at line 200 of file TestProcessor.cc.

References dataProducts_, Exception, and eostools::move().

200  {
201  if (index >= dataProducts_.size()) {
202  throw cms::Exception("LogicError") << "Products must be declared to the TestProcessor::Config object\n"
203  "with a call to the function \'produces\' BEFORE passing the\n"
204  "TestProcessor::Config object to the TestProcessor constructor";
205  }
206  dataProducts_[index].second = std::move(iWrapper);
207  }
std::vector< std::pair< edm::BranchDescription, std::unique_ptr< WrapperBase > > > dataProducts_
def move(src, dest)
Definition: eostools.py:511
void TestProcessor::setEventNumber ( edm::EventNumber_t  iEv)

Definition at line 646 of file TestProcessor.cc.

References eventNumber_.

646 { eventNumber_ = iEv; }
EventNumber_t eventNumber_
void TestProcessor::setLuminosityBlockNumber ( edm::LuminosityBlockNumber_t  iLumi)

Definition at line 641 of file TestProcessor.cc.

References endLuminosityBlock(), and lumiNumber_.

641  {
643  lumiNumber_ = iLumi;
644  }
std::shared_ptr< LuminosityBlockPrincipal > endLuminosityBlock()
LuminosityBlockNumber_t lumiNumber_
void TestProcessor::setRunNumber ( edm::RunNumber_t  iRun)

Definition at line 634 of file TestProcessor.cc.

References beginRunCalled_, endLuminosityBlock(), endRun(), and runNumber_.

634  {
635  if (beginRunCalled_) {
637  endRun();
638  }
639  runNumber_ = iRun;
640  }
std::shared_ptr< LuminosityBlockPrincipal > endLuminosityBlock()
std::shared_ptr< RunPrincipal > endRun()
void TestProcessor::setupProcessing ( )
private

Definition at line 302 of file TestProcessor.cc.

References beginJob(), beginJobCalled_, beginLumiCalled_, beginLuminosityBlock(), beginRun(), and beginRunCalled_.

Referenced by testImpl().

302  {
303  if (not beginJobCalled_) {
304  beginJob();
305  }
306  if (not beginRunCalled_) {
307  beginRun();
308  }
309  if (not beginLumiCalled_) {
311  }
312  }
void TestProcessor::teardownProcessing ( )
private

Definition at line 314 of file TestProcessor.cc.

References beginJobCalled_, beginLumiCalled_, beginRunCalled_, endJob(), endLuminosityBlock(), and endRun().

Referenced by ~TestProcessor().

314  {
315  if (beginLumiCalled_) {
317  beginLumiCalled_ = false;
318  }
319  if (beginRunCalled_) {
320  endRun();
321  beginRunCalled_ = false;
322  }
323  if (beginJobCalled_) {
324  endJob();
325  }
326  }
std::shared_ptr< LuminosityBlockPrincipal > endLuminosityBlock()
std::shared_ptr< RunPrincipal > endRun()
template<typename... T>
edm::test::Event edm::test::TestProcessor::test ( T &&...  iArgs)
inline

Run the test. The function arguments are the data products to be added to the Event for this particular test.

Definition at line 165 of file TestProcessor.h.

Referenced by edmIntegrityCheck.IntegrityCheck::report(), edmIntegrityCheck.IntegrityCheck::structured(), and TEST_CASE().

165  {
166  return testImpl(std::forward<T>(iArgs)...);
167  }
edm::test::Event testImpl()
void edm::test::TestProcessor::testBeginAndEndJobOnly ( )
inline

Run only beginJob and endJob. Once this is used, you should not attempt to run any further tests. This simulates a problem happening early in the job which causes processing not to proceed.

Definition at line 190 of file TestProcessor.h.

References bk::beginJob().

Referenced by TEST_CASE().

190  {
191  beginJob();
192  endJob();
193  }
template<typename... T>
edm::test::LuminosityBlock edm::test::TestProcessor::testBeginLuminosityBlock ( edm::LuminosityBlockNumber_t  iNum,
T &&...  iArgs 
)
inline

Definition at line 170 of file TestProcessor.h.

170  {
171  return testBeginLuminosityBlockImpl(iNum, std::forward<T>(iArgs)...);
172  }
edm::test::LuminosityBlock testBeginLuminosityBlockImpl(edm::LuminosityBlockNumber_t iNum, std::pair< edm::test::ESPutTokenT< T >, std::unique_ptr< T >> &&iPut, U &&...iArgs)
template<typename T , typename... U>
edm::test::LuminosityBlock edm::test::TestProcessor::testBeginLuminosityBlockImpl ( edm::LuminosityBlockNumber_t  iNum,
std::pair< edm::test::ESPutTokenT< T >, std::unique_ptr< T >> &&  iPut,
U &&...  iArgs 
)
inlineprivate

Definition at line 248 of file TestProcessor.h.

References eostools::move(), put(), and mitigatedMETSequence_cff::U.

251  {
252  put(std::move(iPut));
253  return testBeginLuminosityBlockImpl(iNum, std::forward<U>(iArgs)...);
254  }
void put(std::pair< edm::EDPutTokenT< T >, std::unique_ptr< T >> &&iPut)
edm::test::LuminosityBlock testBeginLuminosityBlockImpl(edm::LuminosityBlockNumber_t iNum, std::pair< edm::test::ESPutTokenT< T >, std::unique_ptr< T >> &&iPut, U &&...iArgs)
def move(src, dest)
Definition: eostools.py:511
edm::test::LuminosityBlock TestProcessor::testBeginLuminosityBlockImpl ( edm::LuminosityBlockNumber_t  iNum)
private

Definition at line 223 of file TestProcessor.cc.

References beginJob(), beginJobCalled_, beginLumiCalled_, beginLuminosityBlock(), beginRun(), beginRunCalled_, endLuminosityBlock(), esHelper_, labelOfTestModule_, lumiNumber_, lumiPrincipal_, and processConfiguration_.

223  {
224  if (not beginJobCalled_) {
225  beginJob();
226  }
227  if (not beginRunCalled_) {
228  beginRun();
229  }
230  if (beginLumiCalled_) {
232  assert(lumiNumber_ != iNum);
233  }
234  lumiNumber_ = iNum;
236 
237  if (esHelper_) {
238  //We want each test to have its own ES data products
239  esHelper_->resetAllProxies();
240  }
241 
243  }
std::shared_ptr< LuminosityBlockPrincipal > endLuminosityBlock()
LuminosityBlockNumber_t lumiNumber_
std::shared_ptr< EventSetupTestHelper > esHelper_
std::string labelOfTestModule_
std::shared_ptr< ProcessConfiguration const > processConfiguration_
std::shared_ptr< LuminosityBlockPrincipal > lumiPrincipal_
template<typename... T>
edm::test::Run edm::test::TestProcessor::testBeginRun ( edm::RunNumber_t  iNum,
T &&...  iArgs 
)
inline

Definition at line 179 of file TestProcessor.h.

179  {
180  return testBeginRunImpl(iNum, std::forward<T>(iArgs)...);
181  }
edm::test::Run testBeginRunImpl(edm::RunNumber_t iNum, std::pair< edm::test::ESPutTokenT< T >, std::unique_ptr< T >> &&iPut, U &&...iArgs)
template<typename T , typename... U>
edm::test::Run edm::test::TestProcessor::testBeginRunImpl ( edm::RunNumber_t  iNum,
std::pair< edm::test::ESPutTokenT< T >, std::unique_ptr< T >> &&  iPut,
U &&...  iArgs 
)
inlineprivate

Definition at line 266 of file TestProcessor.h.

References eostools::move(), put(), and mitigatedMETSequence_cff::U.

268  {
269  put(std::move(iPut));
270  return testBeginRunImpl(iNum, std::forward<U>(iArgs)...);
271  }
void put(std::pair< edm::EDPutTokenT< T >, std::unique_ptr< T >> &&iPut)
edm::test::Run testBeginRunImpl(edm::RunNumber_t iNum, std::pair< edm::test::ESPutTokenT< T >, std::unique_ptr< T >> &&iPut, U &&...iArgs)
def move(src, dest)
Definition: eostools.py:511
edm::test::Run TestProcessor::testBeginRunImpl ( edm::RunNumber_t  iNum)
private

Definition at line 265 of file TestProcessor.cc.

References beginJob(), beginJobCalled_, beginRun(), beginRunCalled_, endRun(), esHelper_, labelOfTestModule_, principalCache_, processConfiguration_, runNumber_, and edm::PrincipalCache::runPrincipalPtr().

265  {
266  if (not beginJobCalled_) {
267  beginJob();
268  }
269 
270  if (beginRunCalled_) {
271  assert(runNumber_ != iNum);
272  endRun();
273  }
274  runNumber_ = iNum;
275  beginRun();
276 
277  if (esHelper_) {
278  //We want each test to have its own ES data products
279  esHelper_->resetAllProxies();
280  }
281 
282  return edm::test::Run(
284  }
std::shared_ptr< EventSetupTestHelper > esHelper_
std::string labelOfTestModule_
std::shared_ptr< ProcessConfiguration const > processConfiguration_
PrincipalCache principalCache_
std::shared_ptr< RunPrincipal > const & runPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run) const
std::shared_ptr< RunPrincipal > endRun()
template<typename... T>
edm::test::LuminosityBlock edm::test::TestProcessor::testEndLuminosityBlock ( T &&...  iArgs)
inline

Definition at line 174 of file TestProcessor.h.

174  {
175  return testEndLuminosityBlockImpl(std::forward<T>(iArgs)...);
176  }
edm::test::LuminosityBlock testEndLuminosityBlockImpl()
template<typename T , typename... U>
edm::test::LuminosityBlock edm::test::TestProcessor::testEndLuminosityBlockImpl ( std::pair< edm::test::ESPutTokenT< T >, std::unique_ptr< T >> &&  iPut,
U &&...  iArgs 
)
inlineprivate

Definition at line 258 of file TestProcessor.h.

References eostools::move(), put(), and mitigatedMETSequence_cff::U.

259  {
260  put(std::move(iPut));
261  return testEndLuminosityBlockImpl(std::forward<U>(iArgs)...);
262  }
void put(std::pair< edm::EDPutTokenT< T >, std::unique_ptr< T >> &&iPut)
edm::test::LuminosityBlock testEndLuminosityBlockImpl()
def move(src, dest)
Definition: eostools.py:511
edm::test::LuminosityBlock TestProcessor::testEndLuminosityBlockImpl ( )
private

Definition at line 245 of file TestProcessor.cc.

References beginJob(), beginJobCalled_, beginLumiCalled_, beginLuminosityBlock(), beginRun(), beginRunCalled_, endLuminosityBlock(), esHelper_, labelOfTestModule_, eostools::move(), and processConfiguration_.

245  {
246  if (not beginJobCalled_) {
247  beginJob();
248  }
249  if (not beginRunCalled_) {
250  beginRun();
251  }
252  if (not beginLumiCalled_) {
254  }
255  auto lumi = endLuminosityBlock();
256 
257  if (esHelper_) {
258  //We want each test to have its own ES data products
259  esHelper_->resetAllProxies();
260  }
261 
263  }
std::shared_ptr< LuminosityBlockPrincipal > endLuminosityBlock()
std::shared_ptr< EventSetupTestHelper > esHelper_
std::string labelOfTestModule_
std::shared_ptr< ProcessConfiguration const > processConfiguration_
def move(src, dest)
Definition: eostools.py:511
template<typename... T>
edm::test::Run edm::test::TestProcessor::testEndRun ( T &&...  iArgs)
inline

Definition at line 183 of file TestProcessor.h.

183  {
184  return testEndRunImpl(std::forward<T>(iArgs)...);
185  }
edm::test::Run testEndRunImpl()
template<typename T , typename... U>
edm::test::LuminosityBlock edm::test::TestProcessor::testEndRunImpl ( std::pair< edm::test::ESPutTokenT< T >, std::unique_ptr< T >> &&  iPut,
U &&...  iArgs 
)
inlineprivate

Definition at line 274 of file TestProcessor.h.

References bk::beginJob(), Ecal2004TBTDCRanges_v1_cff::endRun, event(), eostools::move(), and put().

275  {
276  put(std::move(iPut));
277  return testEndRunImpl(std::forward<U>(iArgs)...);
278  }
void put(std::pair< edm::EDPutTokenT< T >, std::unique_ptr< T >> &&iPut)
edm::test::Run testEndRunImpl()
def move(src, dest)
Definition: eostools.py:511
edm::test::Run TestProcessor::testEndRunImpl ( )
private

Definition at line 285 of file TestProcessor.cc.

References beginJob(), beginJobCalled_, beginRun(), beginRunCalled_, endRun(), esHelper_, labelOfTestModule_, and processConfiguration_.

285  {
286  if (not beginJobCalled_) {
287  beginJob();
288  }
289  if (not beginRunCalled_) {
290  beginRun();
291  }
292  auto rp = endRun();
293 
294  if (esHelper_) {
295  //We want each test to have its own ES data products
296  esHelper_->resetAllProxies();
297  }
298 
299  return edm::test::Run(rp, labelOfTestModule_, processConfiguration_->processName());
300  }
std::shared_ptr< EventSetupTestHelper > esHelper_
std::string labelOfTestModule_
std::shared_ptr< ProcessConfiguration const > processConfiguration_
std::shared_ptr< RunPrincipal > endRun()
template<typename T , typename... U>
edm::test::Event edm::test::TestProcessor::testImpl ( std::pair< edm::EDPutTokenT< T >, std::unique_ptr< T >> &&  iPut,
U &&...  iArgs 
)
inlineprivate

Definition at line 222 of file TestProcessor.h.

References eostools::move(), put(), and mitigatedMETSequence_cff::U.

222  {
223  put(std::move(iPut));
224  return testImpl(std::forward<U>(iArgs)...);
225  }
void put(std::pair< edm::EDPutTokenT< T >, std::unique_ptr< T >> &&iPut)
edm::test::Event testImpl()
def move(src, dest)
Definition: eostools.py:511
template<typename T , typename... U>
edm::test::Event edm::test::TestProcessor::testImpl ( std::pair< edm::test::ESPutTokenT< T >, std::unique_ptr< T >> &&  iPut,
U &&...  iArgs 
)
inlineprivate

Definition at line 228 of file TestProcessor.h.

References eostools::move(), and put().

228  {
229  put(std::move(iPut));
230  return testImpl(std::forward<U>(iArgs)...);
231  }
void put(std::pair< edm::EDPutTokenT< T >, std::unique_ptr< T >> &&iPut)
edm::test::Event testImpl()
def move(src, dest)
Definition: eostools.py:511
edm::test::Event TestProcessor::testImpl ( )
private

Definition at line 209 of file TestProcessor.cc.

References esHelper_, event(), edm::PrincipalCache::eventPrincipal(), labelOfTestModule_, principalCache_, processConfiguration_, mps_fire::result, schedule_, and setupProcessing().

209  {
210  setupProcessing();
211  event();
212 
213  bool result = schedule_->totalEventsPassed() > 0;
214  schedule_->clearCounters();
215  if (esHelper_) {
216  //We want each test to have its own ES data products
217  esHelper_->resetAllProxies();
218  }
219  return edm::test::Event(
221  }
std::shared_ptr< EventSetupTestHelper > esHelper_
std::string labelOfTestModule_
std::unique_ptr< Schedule > schedule_
std::shared_ptr< ProcessConfiguration const > processConfiguration_
EventPrincipal & eventPrincipal(unsigned int iStreamIndex) const
PrincipalCache principalCache_
void edm::test::TestProcessor::testLuminosityBlockWithNoEvents ( )
inline

Definition at line 202 of file TestProcessor.h.

References bk::beginJob(), and Ecal2004TBTDCRanges_v1_cff::endRun.

Referenced by TEST_CASE().

202  {
203  beginJob();
204  beginRun();
207  endRun();
208  endJob();
209  }
std::shared_ptr< LuminosityBlockPrincipal > endLuminosityBlock()
std::shared_ptr< RunPrincipal > endRun()
void edm::test::TestProcessor::testRunWithNoLuminosityBlocks ( )
inline

Definition at line 195 of file TestProcessor.h.

References bk::beginJob(), and Ecal2004TBTDCRanges_v1_cff::endRun.

Referenced by TEST_CASE().

195  {
196  beginJob();
197  beginRun();
198  endRun();
199  endJob();
200  }
std::shared_ptr< RunPrincipal > endRun()

Member Data Documentation

std::unique_ptr<ExceptionToActionTable const> edm::test::TestProcessor::act_table_
private

Definition at line 303 of file TestProcessor.h.

Referenced by TestProcessor().

std::shared_ptr<ActivityRegistry> edm::test::TestProcessor::actReg_
private

Definition at line 294 of file TestProcessor.h.

Referenced by beginJob(), endJob(), and TestProcessor().

bool edm::test::TestProcessor::beginJobCalled_ = false
private
bool edm::test::TestProcessor::beginLumiCalled_ = false
private
bool edm::test::TestProcessor::beginRunCalled_ = false
private
std::shared_ptr<BranchIDListHelper> edm::test::TestProcessor::branchIDListHelper_
private

Definition at line 296 of file TestProcessor.h.

Referenced by TestProcessor().

std::vector<std::pair<edm::BranchDescription, std::unique_ptr<WrapperBase> > > edm::test::TestProcessor::dataProducts_
private

Definition at line 317 of file TestProcessor.h.

Referenced by event(), put(), and TestProcessor().

std::shared_ptr<EventSetupTestHelper> edm::test::TestProcessor::esHelper_
private
std::shared_ptr<eventsetup::EventSetupProvider> edm::test::TestProcessor::esp_
private
std::unique_ptr<eventsetup::EventSetupsController> edm::test::TestProcessor::espController_
private
EventNumber_t edm::test::TestProcessor::eventNumber_ = 1
private

Definition at line 321 of file TestProcessor.h.

Referenced by beginLuminosityBlock(), endLuminosityBlock(), event(), and setEventNumber().

std::unique_ptr<HistoryAppender> edm::test::TestProcessor::historyAppender_
private

Definition at line 308 of file TestProcessor.h.

Referenced by beginRun(), and TestProcessor().

std::string edm::test::TestProcessor::labelOfTestModule_
private
LuminosityBlockNumber_t edm::test::TestProcessor::lumiNumber_ = 1
private
std::shared_ptr<LuminosityBlockPrincipal> edm::test::TestProcessor::lumiPrincipal_
private
std::shared_ptr<ModuleRegistry> edm::test::TestProcessor::moduleRegistry_
private

Definition at line 313 of file TestProcessor.h.

PreallocationConfiguration edm::test::TestProcessor::preallocations_
private
std::shared_ptr<ProductRegistry> edm::test::TestProcessor::preg_
private

Definition at line 295 of file TestProcessor.h.

Referenced by beginJob(), beginRun(), and TestProcessor().

PrincipalCache edm::test::TestProcessor::principalCache_
private
std::shared_ptr<ProcessConfiguration const> edm::test::TestProcessor::processConfiguration_
private
ProcessContext edm::test::TestProcessor::processContext_
private

Definition at line 305 of file TestProcessor.h.

Referenced by beginJob(), and TestProcessor().

ProcessHistoryRegistry edm::test::TestProcessor::processHistoryRegistry_
private

Definition at line 307 of file TestProcessor.h.

Referenced by event(), and TestProcessor().

RunNumber_t edm::test::TestProcessor::runNumber_ = 1
private
std::unique_ptr<Schedule> edm::test::TestProcessor::schedule_
private
ServiceToken edm::test::TestProcessor::serviceToken_
private
std::shared_ptr<ThinnedAssociationsHelper> edm::test::TestProcessor::thinnedAssociationsHelper_
private

Definition at line 297 of file TestProcessor.h.

Referenced by TestProcessor().