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