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