CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SubProcess.cc
Go to the documentation of this file.
2 
28 
29 #include <cassert>
30 #include <string>
31 #include <vector>
32 
33 namespace edm {
34 
36  ParameterSet const& topLevelParameterSet,
37  std::shared_ptr<ProductRegistry const> parentProductRegistry,
38  std::shared_ptr<BranchIDListHelper const> parentBranchIDListHelper,
40  ActivityRegistry& parentActReg,
41  ServiceToken const& token,
43  PreallocationConfiguration const& preallocConfig,
44  ProcessContext const* parentProcessContext) :
45  serviceToken_(),
46  parentPreg_(parentProductRegistry),
47  preg_(),
48  branchIDListHelper_(),
49  act_table_(),
50  processConfiguration_(),
51  historyLumiOffset_(preallocConfig.numberOfStreams()),
52  historyRunOffset_(historyLumiOffset_+preallocConfig.numberOfLuminosityBlocks()),
53  processHistoryRegistries_(historyRunOffset_+ preallocConfig.numberOfRuns()),
54  historyAppenders_(historyRunOffset_+preallocConfig.numberOfRuns()),
55  principalCache_(),
56  esp_(),
57  schedule_(),
58  parentToChildPhID_(),
59  subProcess_(),
60  processParameterSet_(),
61  productSelectorRules_(parameterSet, "outputCommands", "OutputModule"),
62  productSelector_(),
63  wantAllEvents_(true) {
64 
65  //Setup the event selection
67 
68  ParameterSet selectevents =
69  parameterSet.getUntrackedParameterSet("SelectEvents", ParameterSet());
70 
71  selectevents.registerIt(); // Just in case this PSet is not registered
73  tns->getProcessName(),
75  selectors_);
76  std::map<std::string, std::vector<std::pair<std::string, int> > > outputModulePathPositions;
78  "",
79  outputModulePathPositions,
80  parentProductRegistry->anyProductProduced());
81  selectProducts(*parentProductRegistry);
82 
83  std::string const maxEvents("maxEvents");
84  std::string const maxLumis("maxLuminosityBlocks");
85 
86  processParameterSet_.reset(parameterSet.popParameterSet(std::string("process")).release());
87 
88  // if this process has a maxEvents or maxLuminosityBlocks parameter set, remove them.
89  if(processParameterSet_->exists(maxEvents)) {
90  processParameterSet_->popParameterSet(maxEvents);
91  }
92  if(processParameterSet_->exists(maxLumis)) {
93  processParameterSet_->popParameterSet(maxLumis);
94  }
95 
96  // if the top level process has a maxEvents or maxLuminosityBlocks parameter set, add them to this process.
97  if(topLevelParameterSet.exists(maxEvents)) {
98  processParameterSet_->addUntrackedParameter<ParameterSet>(maxEvents, topLevelParameterSet.getUntrackedParameterSet(maxEvents));
99  }
100  if(topLevelParameterSet.exists(maxLumis)) {
101  processParameterSet_->addUntrackedParameter<ParameterSet>(maxLumis, topLevelParameterSet.getUntrackedParameterSet(maxLumis));
102  }
103 
104  // If this process has a subprocess, pop the subprocess parameter set out of the process parameter set
105 
106  std::shared_ptr<ParameterSet> subProcessParameterSet(popSubProcessParameterSet(*processParameterSet_).release());
107 
108  ScheduleItems items(*parentProductRegistry, *this);
109 
110  ParameterSet const& optionsPset(processParameterSet_->getUntrackedParameterSet("options", ParameterSet()));
111  IllegalParameters::setThrowAnException(optionsPset.getUntrackedParameter<bool>("throwIfIllegalParameter", true));
112 
113  //initialize the services
114  ServiceToken iToken;
115 
116  // get any configured services.
117  std::auto_ptr<std::vector<ParameterSet> > serviceSets = processParameterSet_->popVParameterSet(std::string("services"));
118 
119  ServiceToken newToken = items.initServices(*serviceSets, *processParameterSet_, token, iLegacy, false);
120  parentActReg.connectToSubProcess(*items.actReg_);
121  serviceToken_ = items.addCPRandTNS(*processParameterSet_, newToken);
122 
123 
124  //make the services available
126 
127  // intialize miscellaneous items
128  items.initMisc(*processParameterSet_);
129 
130  // intialize the event setup provider
131  esp_ = esController.makeProvider(*processParameterSet_);
132 
133  branchIDListHelper_ = items.branchIDListHelper_;
134  updateBranchIDListHelper(parentBranchIDListHelper->branchIDLists());
135 
136  // intialize the Schedule
137  schedule_ = items.initSchedule(*processParameterSet_,subProcessParameterSet.get(),preallocConfig,&processContext_);
138 
139  // set the items
140  act_table_ = std::move(items.act_table_);
141  preg_.reset(items.preg_.release());
142  //CMS-THREADING this only works since Run/Lumis are synchronous so when principalCache asks for
143  // the reducedProcessHistoryID from a full ProcessHistoryID that registry will not be in use by
144  // another thread. We really need to change how this is done in the PrincipalCache.
146 
147 
148  processConfiguration_ = items.processConfiguration_;
150  processContext_.setParentProcessContext(parentProcessContext);
151 
153  for(unsigned int index = 0; index < preallocConfig.numberOfStreams(); ++index) {
154  auto ep = std::make_shared<EventPrincipal>(preg_, branchIDListHelper_, *processConfiguration_, &(historyAppenders_[index]), index);
155  ep->preModuleDelayedGetSignal_.connect(std::cref(items.actReg_->preModuleEventDelayedGetSignal_));
156  ep->postModuleDelayedGetSignal_.connect(std::cref(items.actReg_->postModuleEventDelayedGetSignal_));
158  }
159  if(subProcessParameterSet) {
160  subProcess_.reset(new SubProcess(*subProcessParameterSet,
161  topLevelParameterSet,
162  preg_,
164  esController,
165  *items.actReg_,
166  newToken,
167  iLegacy,
168  preallocConfig,
169  &processContext_));
170  }
171  }
172 
174 
175  void
177  this->beginJob();
178  }
179 
180  void
182  endJob();
183  }
184 
185 
186  void
190  }
192  schedule_->beginJob(*preg_);
193  if(subProcess_.get()) subProcess_->doBeginJob();
194  }
195 
196  void
199  ExceptionCollector c("Multiple exceptions were thrown while executing endJob. An exception message follows for each.");
200  schedule_->endJob(c);
201  if(subProcess_.get()) c.call([this](){ this->subProcess_->doEndJob();});
202  if(c.hasThrown()) {
203  c.rethrow();
204  }
205  }
206 
207  void
208  SubProcess::selectProducts(ProductRegistry const& preg) {
209  if(productSelector_.initialized()) return;
210  productSelector_.initialize(productSelectorRules_, preg.allBranchDescriptions());
211 
212  // TODO: See if we can collapse keptProducts_ and productSelector_ into a
213  // single object. See the notes in the header for ProductSelector
214  // for more information.
215 
216  std::map<BranchID, BranchDescription const*> trueBranchIDToKeptBranchDesc;
217 
218  for(auto const& it : preg.productList()) {
219  BranchDescription const& desc = it.second;
220  if(desc.transient()) {
221  // if the class of the branch is marked transient, output nothing
222  } else if(!desc.present() && !desc.produced()) {
223  // else if the branch containing the product has been previously dropped,
224  // output nothing
225  } else if(productSelector_.selected(desc)) {
226  // else if the branch has been selected, put it in the list of selected branches.
227  if(desc.produced()) {
228  // First we check if an equivalent branch has already been selected due to an EDAlias.
229  // We only need the check for products produced in this process.
230  BranchID const& trueBranchID = desc.originalBranchID();
231  std::map<BranchID, BranchDescription const*>::const_iterator iter = trueBranchIDToKeptBranchDesc.find(trueBranchID);
232  if(iter != trueBranchIDToKeptBranchDesc.end()) {
233  throw edm::Exception(errors::Configuration, "Duplicate Output Selection")
234  << "Two (or more) equivalent branches have been selected for output.\n"
235  << "#1: " << BranchKey(desc) << "\n"
236  << "#2: " << BranchKey(*iter->second) << "\n"
237  << "Please drop at least one of them.\n";
238  }
239  trueBranchIDToKeptBranchDesc.insert(std::make_pair(trueBranchID, &desc));
240  }
241  // Now put it in the list of selected branches.
242  keptProducts_[desc.branchType()].push_back(&desc);
243  }
244  }
245  // Now fill in a mapping needed in the case that a branch was dropped while its EDAlias was kept.
246  for(auto const& it : preg.productList()) {
247  BranchDescription const& desc = it.second;
248  if(!desc.produced() || desc.isAlias()) continue;
249  BranchID const& branchID = desc.branchID();
250  std::map<BranchID, BranchDescription const*>::const_iterator iter = trueBranchIDToKeptBranchDesc.find(branchID);
251  if(iter != trueBranchIDToKeptBranchDesc.end()) {
252  // This branch, produced in this process, or an alias of it, was persisted.
253  BranchID const& keptBranchID = iter->second->branchID();
254  if(keptBranchID != branchID) {
255  // An EDAlias branch was persisted.
256  droppedBranchIDToKeptBranchID_.insert(std::make_pair(branchID.id(), keptBranchID.id()));
257  }
258  }
259  }
260  }
261 
262  void
263  SubProcess::fixBranchIDListsForEDAliases(std::map<BranchID::value_type, BranchID::value_type> const& droppedBranchIDToKeptBranchID) {
264  // Check for branches dropped while an EDAlias was kept.
265  // Replace BranchID of each dropped branch with that of the kept alias.
266  for(BranchIDList& branchIDList : branchIDListHelper_->mutableBranchIDLists()) {
267  for(BranchID::value_type& branchID : branchIDList) {
268  std::map<BranchID::value_type, BranchID::value_type>::const_iterator iter = droppedBranchIDToKeptBranchID.find(branchID);
269  if(iter != droppedBranchIDToKeptBranchID.end()) {
270  branchID = iter->second;
271  }
272  }
273  }
274  if(subProcess_.get()) subProcess_->fixBranchIDListsForEDAliases(droppedBranchIDToKeptBranchID);
275  }
276 
277  void
278  SubProcess::doEvent(EventPrincipal const& ep) {
279  ServiceRegistry::Operate operate(serviceToken_);
280  /* BEGIN relevant bits from OutputModule::doEvent */
281  detail::TRBESSentry products_sentry(selectors_);
282 
283 
284  if(!wantAllEvents_) {
285  // use module description and const_cast unless interface to
286  // event is changed to just take a const EventPrincipal
287  if(!selectors_.wantEvent(ep, nullptr)) {
288  return;
289  }
290  }
291  process(ep);
292  /* END relevant bits from OutputModule::doEvent */
293  }
294 
295  void
297  EventAuxiliary aux(principal.aux());
298  aux.setProcessHistoryID(principal.processHistoryID());
299 
300  EventSelectionIDVector esids{principal.eventSelectionIDs()};
301  if (principal.productRegistry().anyProductProduced() || !wantAllEvents_) {
302  esids.push_back(selector_config_id_);
303  }
304 
305  EventPrincipal& ep = principalCache_.eventPrincipal(principal.streamID().value());
306  auto & processHistoryRegistry = processHistoryRegistries_[principal.streamID().value()];
307  processHistoryRegistry.registerProcessHistory(principal.processHistory());
308  BranchListIndexes bli(principal.branchListIndexes());
309  branchIDListHelper_->fixBranchListIndexes(bli);
311  processHistoryRegistry,
312  std::move(esids),
313  std::move(bli),
314  *(principal.productProvenanceRetrieverPtr()),//NOTE: this transfers the per product provenance
315  principal.reader());
316  ep.setLuminosityBlockPrincipal(principalCache_.lumiPrincipalPtr());
317  propagateProducts(InEvent, principal, ep);
319  schedule_->processOneEvent<Traits>(ep.streamID().value(),ep, esp_->eventSetup());
320  if(subProcess_.get()) subProcess_->doEvent(ep);
321  ep.clearEventPrincipal();
322  }
323 
324  void
325  SubProcess::doBeginRun(RunPrincipal const& principal, IOVSyncValue const& ts) {
326  ServiceRegistry::Operate operate(serviceToken_);
327  beginRun(principal,ts);
328  }
329 
330  void
331  SubProcess::beginRun(RunPrincipal const& principal, IOVSyncValue const& ts) {
332  auto aux = std::make_shared<RunAuxiliary>(principal.aux());
333  aux->setProcessHistoryID(principal.processHistoryID());
334  auto rpp = std::make_shared<RunPrincipal>(aux, preg_, *processConfiguration_, &(historyAppenders_[historyRunOffset_+principal.index()]),principal.index());
335  auto & processHistoryRegistry = processHistoryRegistries_[historyRunOffset_+principal.index()];
336  processHistoryRegistry.registerProcessHistory(principal.processHistory());
337  rpp->fillRunPrincipal(processHistoryRegistry, principal.reader());
338  principalCache_.insert(rpp);
339 
340  ProcessHistoryID const& parentInputReducedPHID = principal.reducedProcessHistoryID();
341  ProcessHistoryID const& inputReducedPHID = rpp->reducedProcessHistoryID();
342 
343  parentToChildPhID_.insert(std::make_pair(parentInputReducedPHID,inputReducedPHID));
344 
345  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
346  propagateProducts(InRun, principal, rp);
348  schedule_->processOneGlobal<Traits>(rp, esp_->eventSetupForInstance(ts));
349  if(subProcess_.get()) subProcess_->doBeginRun(rp, ts);
350  }
351 
352  void
353  SubProcess::doEndRun(RunPrincipal const& principal, IOVSyncValue const& ts, bool cleaningUpAfterException) {
354  ServiceRegistry::Operate operate(serviceToken_);
355  endRun(principal,ts,cleaningUpAfterException);
356  }
357 
358  void
359  SubProcess::endRun(RunPrincipal const& principal, IOVSyncValue const& ts, bool cleaningUpAfterException) {
360  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
361  propagateProducts(InRun, principal, rp);
363  schedule_->processOneGlobal<Traits>(rp, esp_->eventSetupForInstance(ts), cleaningUpAfterException);
364  if(subProcess_.get()) subProcess_->doEndRun(rp, ts, cleaningUpAfterException);
365  }
366 
367  void
368  SubProcess::writeRun(ProcessHistoryID const& parentPhID, int runNumber) {
369  ServiceRegistry::Operate operate(serviceToken_);
370  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
371  assert(it != parentToChildPhID_.end());
372  schedule_->writeRun(principalCache_.runPrincipal(it->second, runNumber), &processContext_);
373  if(subProcess_.get()) subProcess_->writeRun(it->second, runNumber);
374  }
375 
376  void
377  SubProcess::deleteRunFromCache(ProcessHistoryID const& parentPhID, int runNumber) {
378  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
379  assert(it != parentToChildPhID_.end());
380  principalCache_.deleteRun(it->second, runNumber);
381  if(subProcess_.get()) subProcess_->deleteRunFromCache(it->second, runNumber);
382  }
383 
384  void
385  SubProcess::doBeginLuminosityBlock(LuminosityBlockPrincipal const& principal, IOVSyncValue const& ts) {
386  ServiceRegistry::Operate operate(serviceToken_);
387  beginLuminosityBlock(principal,ts);
388  }
389 
390  void
391  SubProcess::beginLuminosityBlock(LuminosityBlockPrincipal const& principal, IOVSyncValue const& ts) {
392  auto aux = std::make_shared<LuminosityBlockAuxiliary>(principal.aux());
393  aux->setProcessHistoryID(principal.processHistoryID());
394  auto lbpp = std::make_shared<LuminosityBlockPrincipal>(aux, preg_, *processConfiguration_, &(historyAppenders_[historyLumiOffset_+principal.index()]),principal.index());
395  auto & processHistoryRegistry = processHistoryRegistries_[historyLumiOffset_+principal.index()];
396  processHistoryRegistry.registerProcessHistory(principal.processHistory());
397  lbpp->fillLuminosityBlockPrincipal(processHistoryRegistry, principal.reader());
398  lbpp->setRunPrincipal(principalCache_.runPrincipalPtr());
399  principalCache_.insert(lbpp);
400  LuminosityBlockPrincipal& lbp = *principalCache_.lumiPrincipalPtr();
401  propagateProducts(InLumi, principal, lbp);
403  schedule_->processOneGlobal<Traits>(lbp, esp_->eventSetupForInstance(ts));
404  if(subProcess_.get()) subProcess_->doBeginLuminosityBlock(lbp, ts);
405  }
406 
407  void
408  SubProcess::doEndLuminosityBlock(LuminosityBlockPrincipal const& principal, IOVSyncValue const& ts, bool cleaningUpAfterException) {
409  ServiceRegistry::Operate operate(serviceToken_);
410  endLuminosityBlock(principal,ts,cleaningUpAfterException);
411  }
412 
413  void
414  SubProcess::endLuminosityBlock(LuminosityBlockPrincipal const& principal, IOVSyncValue const& ts, bool cleaningUpAfterException) {
415  LuminosityBlockPrincipal& lbp = *principalCache_.lumiPrincipalPtr();
416  propagateProducts(InLumi, principal, lbp);
418  schedule_->processOneGlobal<Traits>(lbp, esp_->eventSetupForInstance(ts), cleaningUpAfterException);
419  if(subProcess_.get()) subProcess_->doEndLuminosityBlock(lbp, ts, cleaningUpAfterException);
420  }
421 
422  void
423  SubProcess::writeLumi(ProcessHistoryID const& parentPhID, int runNumber, int lumiNumber) {
424  ServiceRegistry::Operate operate(serviceToken_);
425  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
426  assert(it != parentToChildPhID_.end());
427  schedule_->writeLumi(principalCache_.lumiPrincipal(it->second, runNumber, lumiNumber), &processContext_);
428  if(subProcess_.get()) subProcess_->writeLumi(it->second, runNumber, lumiNumber);
429  }
430 
431  void
432  SubProcess::deleteLumiFromCache(ProcessHistoryID const& parentPhID, int runNumber, int lumiNumber) {
433  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
434  assert(it != parentToChildPhID_.end());
435  principalCache_.deleteLumi(it->second, runNumber, lumiNumber);
436  if(subProcess_.get()) subProcess_->deleteLumiFromCache(it->second, runNumber, lumiNumber);
437  }
438 
439  void
440  SubProcess::doBeginStream(unsigned int iID) {
441  ServiceRegistry::Operate operate(serviceToken_);
442  schedule_->beginStream(iID);
443  if(subProcess_.get()) subProcess_->doBeginStream(iID);
444  }
445 
446  void
447  SubProcess::doEndStream(unsigned int iID) {
448  ServiceRegistry::Operate operate(serviceToken_);
449  schedule_->endStream(iID);
450  if(subProcess_.get()) subProcess_->doEndStream(iID);
451  }
452 
453  void
454  SubProcess::doStreamBeginRun(unsigned int id, RunPrincipal const& principal, IOVSyncValue const& ts) {
455  ServiceRegistry::Operate operate(serviceToken_);
456  {
457  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
459  schedule_->processOneStream<Traits>(id,rp, esp_->eventSetupForInstance(ts));
460  if(subProcess_.get()) subProcess_->doStreamBeginRun(id,rp, ts);
461  }
462  }
463 
464  void
465  SubProcess::doStreamEndRun(unsigned int id, RunPrincipal const& principal, IOVSyncValue const& ts, bool cleaningUpAfterException) {
466  ServiceRegistry::Operate operate(serviceToken_);
467  {
468  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
470  schedule_->processOneStream<Traits>(id,rp, esp_->eventSetupForInstance(ts),cleaningUpAfterException);
471  if(subProcess_.get()) subProcess_->doStreamEndRun(id,rp, ts,cleaningUpAfterException);
472  }
473  }
474 
475  void
476  SubProcess::doStreamBeginLuminosityBlock(unsigned int id, LuminosityBlockPrincipal const& principal, IOVSyncValue const& ts) {
477  ServiceRegistry::Operate operate(serviceToken_);
478  {
479  LuminosityBlockPrincipal& lbp = *principalCache_.lumiPrincipalPtr();
481  schedule_->processOneStream<Traits>(id,lbp, esp_->eventSetupForInstance(ts));
482  if(subProcess_.get()) subProcess_->doStreamBeginLuminosityBlock(id,lbp, ts);
483  }
484  }
485 
486  void
487  SubProcess::doStreamEndLuminosityBlock(unsigned int id, LuminosityBlockPrincipal const& principal, IOVSyncValue const& ts, bool cleaningUpAfterException) {
488  ServiceRegistry::Operate operate(serviceToken_);
489  {
490  LuminosityBlockPrincipal& lbp = *principalCache_.lumiPrincipalPtr();
492  schedule_->processOneStream<Traits>(id,lbp, esp_->eventSetupForInstance(ts),cleaningUpAfterException);
493  if(subProcess_.get()) subProcess_->doStreamEndLuminosityBlock(id,lbp, ts,cleaningUpAfterException);
494  }
495  }
496 
497 
498  void
499  SubProcess::propagateProducts(BranchType type, Principal const& parentPrincipal, Principal& principal) const {
500  SelectedProducts const& keptVector = keptProducts()[type];
501  for(auto const& item : keptVector) {
502  ProductHolderBase const* parentProductHolder = parentPrincipal.getProductHolder(item->branchID());
503  if(parentProductHolder != nullptr) {
504  ProductData const& parentData = parentProductHolder->productData();
505  ProductHolderBase const* productHolder = principal.getProductHolder(item->branchID());
506  if(productHolder != nullptr) {
507  ProductData& thisData = const_cast<ProductData&>(productHolder->productData());
508  //Propagate the per event(run)(lumi) data for this product to the subprocess.
509  //First, the product itself.
510  thisData.wrapper_ = parentData.wrapper_;
511  // Then the product ID and the ProcessHistory
512  thisData.prov_.setProductID(parentData.prov_.productID());
513  thisData.prov_.setProcessHistory(parentData.prov_.processHistory());
514  // Then the store, in case the product needs reading in a subprocess.
515  thisData.prov_.setStore(parentData.prov_.store());
516  // And last, the other per event provenance.
517  if(parentData.prov_.productProvenanceValid()) {
518  thisData.prov_.setProductProvenance(*parentData.prov_.productProvenance());
519  } else {
520  thisData.prov_.resetProductProvenance();
521  }
522  // Sets unavailable flag, if known that product is not available
523  (void)productHolder->productUnavailable();
524  }
525  }
526  }
527  }
528 
529  void SubProcess::updateBranchIDListHelper(BranchIDLists const& branchIDLists) {
530  branchIDListHelper_->updateFromParent(branchIDLists);
531  if(subProcess_.get()) {
532  subProcess_->updateBranchIDListHelper(branchIDListHelper_->branchIDLists());
533  }
534  }
535 
536  // Call respondToOpenInputFile() on all Modules
537  void
538  SubProcess::respondToOpenInputFile(FileBlock const& fb) {
539  ServiceRegistry::Operate operate(serviceToken_);
540  schedule_->respondToOpenInputFile(fb);
541  if(subProcess_.get()) subProcess_->respondToOpenInputFile(fb);
542  }
543 
544  // free function
545  std::auto_ptr<ParameterSet>
547  std::vector<std::string> subProcesses = parameterSet.getUntrackedParameter<std::vector<std::string> >("@all_subprocesses");
548  if(!subProcesses.empty()) {
549  assert(subProcesses.size() == 1U);
550  assert(subProcesses[0] == "@sub_process");
551  return parameterSet.popParameterSet(subProcesses[0]);
552  }
553  return std::auto_ptr<ParameterSet>(nullptr);
554  }
555 }
556 
unsigned int historyRunOffset_
Definition: SubProcess.h:231
ParameterSetID selector_config_id_
Definition: SubProcess.h:252
void insert(std::shared_ptr< RunPrincipal > rp)
bool productProvenanceValid() const
Definition: Provenance.h:54
type
Definition: HCALResponse.h:21
ProductRegistry const & productRegistry() const
Definition: Principal.h:147
T getUntrackedParameter(std::string const &, T const &) const
void setLuminosityBlockPrincipal(std::shared_ptr< LuminosityBlockPrincipal > const &lbp)
EventSelectionIDVector const & eventSelectionIDs() const
BranchType const & branchType() const
std::vector< BranchIDList > BranchIDLists
Definition: BranchIDList.h:19
ProcessHistoryID const & reducedProcessHistoryID() const
Definition: RunPrincipal.h:65
ConstProductHolderPtr getProductHolder(BranchID const &oid) const
Definition: Principal.cc:429
void setNumberOfConcurrentPrincipals(PreallocationConfiguration const &)
std::vector< ProcessHistoryRegistry > processHistoryRegistries_
Definition: SubProcess.h:232
std::auto_ptr< ParameterSet > popSubProcessParameterSet(ParameterSet &parameterSet)
Definition: SubProcess.cc:546
Definition: Hash.h:42
boost::shared_ptr< eventsetup::EventSetupProvider > esp_
Definition: SubProcess.h:235
virtual ~SubProcess()
Definition: SubProcess.cc:173
bool exists(std::string const &parameterName) const
checks if a parameter exists
void updateBranchIDListHelper(BranchIDLists const &)
Definition: SubProcess.cc:529
ProductProvenance * productProvenance() const
Definition: Provenance.h:50
LuminosityBlockAuxiliary const & aux() const
LuminosityBlockIndex index() const
ParameterSet getUntrackedParameterSet(std::string const &name, ParameterSet const &defaultValue) const
void setParentProcessContext(ProcessContext const *parentProcessContext)
std::map< BranchID::value_type, BranchID::value_type > const & droppedBranchIDToKeptBranchID()
Definition: SubProcess.h:216
BranchListIndexes const & branchListIndexes() const
void resetProductProvenance() const
Definition: Provenance.cc:72
unsigned int id() const
Definition: BranchID.h:23
ProcessHistory const & processHistory() const
Definition: Principal.h:137
BranchType
Definition: BranchType.h:11
std::vector< EventSelectionID > EventSelectionIDVector
void selectProducts(ProductRegistry const &preg)
Definition: SubProcess.cc:208
ProductList const & productList() const
ServiceToken serviceToken_
Definition: SubProcess.h:221
Provenance prov_
Definition: ProductData.h:47
std::vector< BranchListIndex > BranchListIndexes
unsigned int value_type
Definition: BranchID.h:16
ProcessHistoryID const & processHistoryID() const
Definition: Principal.h:141
std::shared_ptr< ProductProvenanceRetriever > productProvenanceRetrieverPtr() const
ProcessHistory const & processHistory() const
Definition: Provenance.h:66
static void setThrowAnException(bool v)
std::shared_ptr< ProductProvenanceRetriever > const & store() const
Definition: Provenance.h:65
StreamID streamID() const
std::shared_ptr< WrapperBase > wrapper_
Definition: ProductData.h:46
std::vector< BranchDescription const * > allBranchDescriptions() const
std::auto_ptr< ParameterSet > popParameterSet(std::string const &name)
BranchID const & branchID() const
RunAuxiliary const & aux() const
Definition: RunPrincipal.h:57
ProductData const & productData() const
Definition: ProductHolder.h:40
SubProcess(ParameterSet &parameterSet, ParameterSet const &topLevelParameterSet, std::shared_ptr< ProductRegistry const > parentProductRegistry, std::shared_ptr< BranchIDListHelper const > parentBranchIDListHelper, eventsetup::EventSetupsController &esController, ActivityRegistry &parentActReg, ServiceToken const &token, serviceregistry::ServiceLegacy iLegacy, PreallocationConfiguration const &preallocConfig, ProcessContext const *parentProcessContext)
Definition: SubProcess.cc:35
std::shared_ptr< BranchIDListHelper > branchIDListHelper_
Definition: SubProcess.h:224
void fillEventPrincipal(EventAuxiliary const &aux, ProcessHistoryRegistry const &processHistoryRegistry, DelayedReader *reader=nullptr)
void setProcessConfiguration(ProcessConfiguration const *processConfiguration)
std::unique_ptr< ExceptionToActionTable const > act_table_
Definition: SubProcess.h:225
void setProcessHistoryRegistry(ProcessHistoryRegistry const &phr)
DelayedReader * reader() const
Definition: Principal.h:171
unsigned int value() const
Definition: StreamID.h:46
detail::TriggerResultsBasedEventSelector selectors_
Definition: SubProcess.h:253
boost::shared_ptr< EventSetupProvider > makeProvider(ParameterSet &)
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:236
void connectToSubProcess(ActivityRegistry &iOther)
RunIndex index() const
Definition: RunPrincipal.h:53
bool anyProductProduced() const
void setProductID(ProductID const &pid)
Definition: Provenance.h:83
std::vector< HistoryAppender > historyAppenders_
Definition: SubProcess.h:233
std::vector< BranchID::value_type > BranchIDList
Definition: BranchIDList.h:18
void setStore(std::shared_ptr< ProductProvenanceRetriever > store) const
Definition: Provenance.h:75
std::unique_ptr< ParameterSet > processParameterSet_
Definition: SubProcess.h:239
std::vector< std::string > const & getAllTriggerNames()
void setProcessHistory(ProcessHistory const &ph)
Definition: Provenance.h:77
std::vector< BranchDescription const * > SelectedProducts
void fixBranchIDListsForEDAliases(std::map< BranchID::value_type, BranchID::value_type > const &droppedBranchIDToKeptBranchID)
Definition: SubProcess.cc:263
void setProductProvenance(ProductProvenance const &prov) const
Definition: Provenance.cc:78
ProcessContext processContext_
Definition: SubProcess.h:227
BranchID const & originalBranchID() const
ProductID const & productID() const
Definition: Provenance.h:79
void call(std::function< void(void)>)
ParameterSetID registerProperSelectionInfo(edm::ParameterSet const &iInitial, std::string const &iLabel, std::map< std::string, std::vector< std::pair< std::string, int > > > const &outputModulePathPositions, bool anyProductProduced)
preg
Definition: Schedule.cc:368
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:238
tuple process
Definition: LaserDQM_cfg.py:3
EventAuxiliary const & aux() const
bool configureEventSelector(edm::ParameterSet const &iPSet, std::string const &iProcessName, std::vector< std::string > const &iAllTriggerNames, edm::detail::TriggerResultsBasedEventSelector &oSelector)
ParameterSet const & registerIt()
std::shared_ptr< ProductRegistry const > preg_
Definition: SubProcess.h:223
PrincipalCache principalCache_
Definition: SubProcess.h:234
ParameterSet const & parameterSet(Provenance const &provenance)
Definition: Provenance.cc:11
std::shared_ptr< ProcessConfiguration const > processConfiguration_
Definition: SubProcess.h:226
bool productUnavailable() const
Definition: ProductHolder.h:69