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  boost::shared_ptr<ProductRegistry const> parentProductRegistry,
38  boost::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  boost::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  boost::shared_ptr<EventPrincipal> ep(new EventPrincipal(preg_,
158  index));
159  ep->preModuleDelayedGetSignal_.connect(std::cref(items.actReg_->preModuleEventDelayedGetSignal_));
160  ep->postModuleDelayedGetSignal_.connect(std::cref(items.actReg_->postModuleEventDelayedGetSignal_));
162  }
163  if(subProcessParameterSet) {
164  subProcess_.reset(new SubProcess(*subProcessParameterSet,
165  topLevelParameterSet,
166  preg_,
168  esController,
169  *items.actReg_,
170  newToken,
171  iLegacy,
172  preallocConfig,
173  &processContext_));
174  }
175  }
176 
178 
179  void
181  this->beginJob();
182  }
183 
184  void
186  endJob();
187  }
188 
189 
190  void
194  }
196  schedule_->beginJob(*preg_);
197  if(subProcess_.get()) subProcess_->doBeginJob();
198  }
199 
200  void
203  ExceptionCollector c("Multiple exceptions were thrown while executing endJob. An exception message follows for each.");
204  schedule_->endJob(c);
205  if(subProcess_.get()) c.call([this](){ this->subProcess_->doEndJob();});
206  if(c.hasThrown()) {
207  c.rethrow();
208  }
209  }
210 
211  void
212  SubProcess::selectProducts(ProductRegistry const& preg) {
213  if(productSelector_.initialized()) return;
214  productSelector_.initialize(productSelectorRules_, preg.allBranchDescriptions());
215 
216  // TODO: See if we can collapse keptProducts_ and productSelector_ into a
217  // single object. See the notes in the header for ProductSelector
218  // for more information.
219 
220  std::map<BranchID, BranchDescription const*> trueBranchIDToKeptBranchDesc;
221 
222  for(auto const& it : preg.productList()) {
223  BranchDescription const& desc = it.second;
224  if(desc.transient()) {
225  // if the class of the branch is marked transient, output nothing
226  } else if(!desc.present() && !desc.produced()) {
227  // else if the branch containing the product has been previously dropped,
228  // output nothing
229  } else if(productSelector_.selected(desc)) {
230  // else if the branch has been selected, put it in the list of selected branches.
231  if(desc.produced()) {
232  // First we check if an equivalent branch has already been selected due to an EDAlias.
233  // We only need the check for products produced in this process.
234  BranchID const& trueBranchID = desc.originalBranchID();
235  std::map<BranchID, BranchDescription const*>::const_iterator iter = trueBranchIDToKeptBranchDesc.find(trueBranchID);
236  if(iter != trueBranchIDToKeptBranchDesc.end()) {
237  throw edm::Exception(errors::Configuration, "Duplicate Output Selection")
238  << "Two (or more) equivalent branches have been selected for output.\n"
239  << "#1: " << BranchKey(desc) << "\n"
240  << "#2: " << BranchKey(*iter->second) << "\n"
241  << "Please drop at least one of them.\n";
242  }
243  trueBranchIDToKeptBranchDesc.insert(std::make_pair(trueBranchID, &desc));
244  }
245  // Now put it in the list of selected branches.
246  keptProducts_[desc.branchType()].push_back(&desc);
247  }
248  }
249  // Now fill in a mapping needed in the case that a branch was dropped while its EDAlias was kept.
250  for(auto const& it : preg.productList()) {
251  BranchDescription const& desc = it.second;
252  if(!desc.produced() || desc.isAlias()) continue;
253  BranchID const& branchID = desc.branchID();
254  std::map<BranchID, BranchDescription const*>::const_iterator iter = trueBranchIDToKeptBranchDesc.find(branchID);
255  if(iter != trueBranchIDToKeptBranchDesc.end()) {
256  // This branch, produced in this process, or an alias of it, was persisted.
257  BranchID const& keptBranchID = iter->second->branchID();
258  if(keptBranchID != branchID) {
259  // An EDAlias branch was persisted.
260  droppedBranchIDToKeptBranchID_.insert(std::make_pair(branchID.id(), keptBranchID.id()));
261  }
262  }
263  }
264  }
265 
266  void
267  SubProcess::fixBranchIDListsForEDAliases(std::map<BranchID::value_type, BranchID::value_type> const& droppedBranchIDToKeptBranchID) {
268  // Check for branches dropped while an EDAlias was kept.
269  // Replace BranchID of each dropped branch with that of the kept alias.
270  for(BranchIDList& branchIDList : branchIDListHelper_->mutableBranchIDLists()) {
271  for(BranchID::value_type& branchID : branchIDList) {
272  std::map<BranchID::value_type, BranchID::value_type>::const_iterator iter = droppedBranchIDToKeptBranchID.find(branchID);
273  if(iter != droppedBranchIDToKeptBranchID.end()) {
274  branchID = iter->second;
275  }
276  }
277  }
278  if(subProcess_.get()) subProcess_->fixBranchIDListsForEDAliases(droppedBranchIDToKeptBranchID);
279  }
280 
281  void
282  SubProcess::doEvent(EventPrincipal const& ep) {
283  ServiceRegistry::Operate operate(serviceToken_);
284  /* BEGIN relevant bits from OutputModule::doEvent */
285  detail::TRBESSentry products_sentry(selectors_);
286 
287 
288  if(!wantAllEvents_) {
289  // use module description and const_cast unless interface to
290  // event is changed to just take a const EventPrincipal
291  if(!selectors_.wantEvent(ep, nullptr)) {
292  return;
293  }
294  }
295  process(ep);
296  /* END relevant bits from OutputModule::doEvent */
297  }
298 
299  void
301  EventAuxiliary aux(principal.aux());
302  aux.setProcessHistoryID(principal.processHistoryID());
303 
304  EventSelectionIDVector esids{principal.eventSelectionIDs()};
305  if (principal.productRegistry().anyProductProduced() || !wantAllEvents_) {
306  esids.push_back(selector_config_id_);
307  }
308 
309  EventPrincipal& ep = principalCache_.eventPrincipal(principal.streamID().value());
310  auto & processHistoryRegistry = processHistoryRegistries_[principal.streamID().value()];
311  processHistoryRegistry.registerProcessHistory(principal.processHistory());
312  BranchListIndexes bli(principal.branchListIndexes());
313  branchIDListHelper_->fixBranchListIndexes(bli);
315  processHistoryRegistry,
316  std::move(esids),
317  std::move(bli),
318  *(principal.productProvenanceRetrieverPtr()),//NOTE: this transfers the per product provenance
319  principal.reader());
320  ep.setLuminosityBlockPrincipal(principalCache_.lumiPrincipalPtr());
321  propagateProducts(InEvent, principal, ep);
323  schedule_->processOneEvent<Traits>(ep.streamID().value(),ep, esp_->eventSetup());
324  if(subProcess_.get()) subProcess_->doEvent(ep);
325  ep.clearEventPrincipal();
326  }
327 
328  void
329  SubProcess::doBeginRun(RunPrincipal const& principal, IOVSyncValue const& ts) {
330  ServiceRegistry::Operate operate(serviceToken_);
331  beginRun(principal,ts);
332  }
333 
334  void
335  SubProcess::beginRun(RunPrincipal const& principal, IOVSyncValue const& ts) {
336  boost::shared_ptr<RunAuxiliary> aux(new RunAuxiliary(principal.aux()));
337  aux->setProcessHistoryID(principal.processHistoryID());
338  boost::shared_ptr<RunPrincipal> rpp(new RunPrincipal(aux, preg_, *processConfiguration_, &(historyAppenders_[historyRunOffset_+principal.index()]),principal.index()));
339  auto & processHistoryRegistry = processHistoryRegistries_[historyRunOffset_+principal.index()];
340  processHistoryRegistry.registerProcessHistory(principal.processHistory());
341  rpp->fillRunPrincipal(processHistoryRegistry, principal.reader());
342  principalCache_.insert(rpp);
343 
344  ProcessHistoryID const& parentInputReducedPHID = principal.reducedProcessHistoryID();
345  ProcessHistoryID const& inputReducedPHID = rpp->reducedProcessHistoryID();
346 
347  parentToChildPhID_.insert(std::make_pair(parentInputReducedPHID,inputReducedPHID));
348 
349  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
350  propagateProducts(InRun, principal, rp);
352  schedule_->processOneGlobal<Traits>(rp, esp_->eventSetupForInstance(ts));
353  if(subProcess_.get()) subProcess_->doBeginRun(rp, ts);
354  }
355 
356  void
357  SubProcess::doEndRun(RunPrincipal const& principal, IOVSyncValue const& ts, bool cleaningUpAfterException) {
358  ServiceRegistry::Operate operate(serviceToken_);
359  endRun(principal,ts,cleaningUpAfterException);
360  }
361 
362  void
363  SubProcess::endRun(RunPrincipal const& principal, IOVSyncValue const& ts, bool cleaningUpAfterException) {
364  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
365  propagateProducts(InRun, principal, rp);
367  schedule_->processOneGlobal<Traits>(rp, esp_->eventSetupForInstance(ts), cleaningUpAfterException);
368  if(subProcess_.get()) subProcess_->doEndRun(rp, ts, cleaningUpAfterException);
369  }
370 
371  void
372  SubProcess::writeRun(ProcessHistoryID const& parentPhID, int runNumber) {
373  ServiceRegistry::Operate operate(serviceToken_);
374  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
375  assert(it != parentToChildPhID_.end());
376  schedule_->writeRun(principalCache_.runPrincipal(it->second, runNumber), &processContext_);
377  if(subProcess_.get()) subProcess_->writeRun(it->second, runNumber);
378  }
379 
380  void
381  SubProcess::deleteRunFromCache(ProcessHistoryID const& parentPhID, int runNumber) {
382  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
383  assert(it != parentToChildPhID_.end());
384  principalCache_.deleteRun(it->second, runNumber);
385  if(subProcess_.get()) subProcess_->deleteRunFromCache(it->second, runNumber);
386  }
387 
388  void
389  SubProcess::doBeginLuminosityBlock(LuminosityBlockPrincipal const& principal, IOVSyncValue const& ts) {
390  ServiceRegistry::Operate operate(serviceToken_);
391  beginLuminosityBlock(principal,ts);
392  }
393 
394  void
395  SubProcess::beginLuminosityBlock(LuminosityBlockPrincipal const& principal, IOVSyncValue const& ts) {
396  boost::shared_ptr<LuminosityBlockAuxiliary> aux(new LuminosityBlockAuxiliary(principal.aux()));
397  aux->setProcessHistoryID(principal.processHistoryID());
398  boost::shared_ptr<LuminosityBlockPrincipal> lbpp(new LuminosityBlockPrincipal(aux, preg_, *processConfiguration_, &(historyAppenders_[historyLumiOffset_+principal.index()]),principal.index()));
399  auto & processHistoryRegistry = processHistoryRegistries_[historyLumiOffset_+principal.index()];
400  processHistoryRegistry.registerProcessHistory(principal.processHistory());
401  lbpp->fillLuminosityBlockPrincipal(processHistoryRegistry, principal.reader());
402  lbpp->setRunPrincipal(principalCache_.runPrincipalPtr());
403  principalCache_.insert(lbpp);
404  LuminosityBlockPrincipal& lbp = *principalCache_.lumiPrincipalPtr();
405  propagateProducts(InLumi, principal, lbp);
407  schedule_->processOneGlobal<Traits>(lbp, esp_->eventSetupForInstance(ts));
408  if(subProcess_.get()) subProcess_->doBeginLuminosityBlock(lbp, ts);
409  }
410 
411  void
412  SubProcess::doEndLuminosityBlock(LuminosityBlockPrincipal const& principal, IOVSyncValue const& ts, bool cleaningUpAfterException) {
413  ServiceRegistry::Operate operate(serviceToken_);
414  endLuminosityBlock(principal,ts,cleaningUpAfterException);
415  }
416 
417  void
418  SubProcess::endLuminosityBlock(LuminosityBlockPrincipal const& principal, IOVSyncValue const& ts, bool cleaningUpAfterException) {
419  LuminosityBlockPrincipal& lbp = *principalCache_.lumiPrincipalPtr();
420  propagateProducts(InLumi, principal, lbp);
422  schedule_->processOneGlobal<Traits>(lbp, esp_->eventSetupForInstance(ts), cleaningUpAfterException);
423  if(subProcess_.get()) subProcess_->doEndLuminosityBlock(lbp, ts, cleaningUpAfterException);
424  }
425 
426  void
427  SubProcess::writeLumi(ProcessHistoryID const& parentPhID, int runNumber, int lumiNumber) {
428  ServiceRegistry::Operate operate(serviceToken_);
429  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
430  assert(it != parentToChildPhID_.end());
431  schedule_->writeLumi(principalCache_.lumiPrincipal(it->second, runNumber, lumiNumber), &processContext_);
432  if(subProcess_.get()) subProcess_->writeLumi(it->second, runNumber, lumiNumber);
433  }
434 
435  void
436  SubProcess::deleteLumiFromCache(ProcessHistoryID const& parentPhID, int runNumber, int lumiNumber) {
437  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
438  assert(it != parentToChildPhID_.end());
439  principalCache_.deleteLumi(it->second, runNumber, lumiNumber);
440  if(subProcess_.get()) subProcess_->deleteLumiFromCache(it->second, runNumber, lumiNumber);
441  }
442 
443  void
444  SubProcess::doBeginStream(unsigned int iID) {
445  ServiceRegistry::Operate operate(serviceToken_);
446  schedule_->beginStream(iID);
447  if(subProcess_.get()) subProcess_->doBeginStream(iID);
448  }
449 
450  void
451  SubProcess::doEndStream(unsigned int iID) {
452  ServiceRegistry::Operate operate(serviceToken_);
453  schedule_->endStream(iID);
454  if(subProcess_.get()) subProcess_->doEndStream(iID);
455  }
456 
457  void
458  SubProcess::doStreamBeginRun(unsigned int id, RunPrincipal const& principal, IOVSyncValue const& ts) {
459  ServiceRegistry::Operate operate(serviceToken_);
460  {
461  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
463  schedule_->processOneStream<Traits>(id,rp, esp_->eventSetupForInstance(ts));
464  if(subProcess_.get()) subProcess_->doStreamBeginRun(id,rp, ts);
465  }
466  }
467 
468  void
469  SubProcess::doStreamEndRun(unsigned int id, RunPrincipal const& principal, IOVSyncValue const& ts, bool cleaningUpAfterException) {
470  ServiceRegistry::Operate operate(serviceToken_);
471  {
472  RunPrincipal& rp = *principalCache_.runPrincipalPtr();
474  schedule_->processOneStream<Traits>(id,rp, esp_->eventSetupForInstance(ts),cleaningUpAfterException);
475  if(subProcess_.get()) subProcess_->doStreamEndRun(id,rp, ts,cleaningUpAfterException);
476  }
477  }
478 
479  void
480  SubProcess::doStreamBeginLuminosityBlock(unsigned int id, LuminosityBlockPrincipal const& principal, IOVSyncValue const& ts) {
481  ServiceRegistry::Operate operate(serviceToken_);
482  {
483  LuminosityBlockPrincipal& lbp = *principalCache_.lumiPrincipalPtr();
485  schedule_->processOneStream<Traits>(id,lbp, esp_->eventSetupForInstance(ts));
486  if(subProcess_.get()) subProcess_->doStreamBeginLuminosityBlock(id,lbp, ts);
487  }
488  }
489 
490  void
491  SubProcess::doStreamEndLuminosityBlock(unsigned int id, LuminosityBlockPrincipal const& principal, IOVSyncValue const& ts, bool cleaningUpAfterException) {
492  ServiceRegistry::Operate operate(serviceToken_);
493  {
494  LuminosityBlockPrincipal& lbp = *principalCache_.lumiPrincipalPtr();
496  schedule_->processOneStream<Traits>(id,lbp, esp_->eventSetupForInstance(ts),cleaningUpAfterException);
497  if(subProcess_.get()) subProcess_->doStreamEndLuminosityBlock(id,lbp, ts,cleaningUpAfterException);
498  }
499  }
500 
501 
502  void
503  SubProcess::propagateProducts(BranchType type, Principal const& parentPrincipal, Principal& principal) const {
504  SelectedProducts const& keptVector = keptProducts()[type];
505  for(auto const& item : keptVector) {
506  ProductHolderBase const* parentProductHolder = parentPrincipal.getProductHolder(item->branchID());
507  if(parentProductHolder != nullptr) {
508  ProductData const& parentData = parentProductHolder->productData();
509  ProductHolderBase const* productHolder = principal.getProductHolder(item->branchID());
510  if(productHolder != nullptr) {
511  ProductData& thisData = const_cast<ProductData&>(productHolder->productData());
512  //Propagate the per event(run)(lumi) data for this product to the subprocess.
513  //First, the product itself.
514  thisData.wrapper_ = parentData.wrapper_;
515  // Then the product ID and the ProcessHistory
516  thisData.prov_.setProductID(parentData.prov_.productID());
517  thisData.prov_.setProcessHistory(parentData.prov_.processHistory());
518  // Then the store, in case the product needs reading in a subprocess.
519  thisData.prov_.setStore(parentData.prov_.store());
520  // And last, the other per event provenance.
521  if(parentData.prov_.productProvenanceValid()) {
522  thisData.prov_.setProductProvenance(*parentData.prov_.productProvenance());
523  } else {
524  thisData.prov_.resetProductProvenance();
525  }
526  // Sets unavailable flag, if known that product is not available
527  (void)productHolder->productUnavailable();
528  }
529  }
530  }
531  }
532 
533  void SubProcess::updateBranchIDListHelper(BranchIDLists const& branchIDLists) {
534  branchIDListHelper_->updateFromParent(branchIDLists);
535  if(subProcess_.get()) {
536  subProcess_->updateBranchIDListHelper(branchIDListHelper_->branchIDLists());
537  }
538  }
539 
540  // Call respondToOpenInputFile() on all Modules
541  void
542  SubProcess::respondToOpenInputFile(FileBlock const& fb) {
543  ServiceRegistry::Operate operate(serviceToken_);
544  schedule_->respondToOpenInputFile(fb);
545  if(subProcess_.get()) subProcess_->respondToOpenInputFile(fb);
546  }
547 
548  // free function
549  std::auto_ptr<ParameterSet>
551  std::vector<std::string> subProcesses = parameterSet.getUntrackedParameter<std::vector<std::string> >("@all_subprocesses");
552  if(!subProcesses.empty()) {
553  assert(subProcesses.size() == 1U);
554  assert(subProcesses[0] == "@sub_process");
555  return parameterSet.popParameterSet(subProcesses[0]);
556  }
557  return std::auto_ptr<ParameterSet>(nullptr);
558  }
559 }
560 
unsigned int historyRunOffset_
Definition: SubProcess.h:232
ParameterSetID selector_config_id_
Definition: SubProcess.h:253
bool productProvenanceValid() const
Definition: Provenance.h:53
type
Definition: HCALResponse.h:21
void setLuminosityBlockPrincipal(boost::shared_ptr< LuminosityBlockPrincipal > const &lbp)
ProductRegistry const & productRegistry() const
Definition: Principal.h:149
T getUntrackedParameter(std::string const &, T const &) const
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:233
std::auto_ptr< ParameterSet > popSubProcessParameterSet(ParameterSet &parameterSet)
Definition: SubProcess.cc:550
Definition: Hash.h:42
boost::shared_ptr< eventsetup::EventSetupProvider > esp_
Definition: SubProcess.h:236
virtual ~SubProcess()
Definition: SubProcess.cc:177
bool exists(std::string const &parameterName) const
checks if a parameter exists
void call(boost::function< void(void)>)
void updateBranchIDListHelper(BranchIDLists const &)
Definition: SubProcess.cc:533
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 insert(boost::shared_ptr< RunPrincipal > rp)
void setParentProcessContext(ProcessContext const *parentProcessContext)
void setStore(boost::shared_ptr< ProductProvenanceRetriever > store) const
Definition: Provenance.h:74
std::map< BranchID::value_type, BranchID::value_type > const & droppedBranchIDToKeptBranchID()
Definition: SubProcess.h:217
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:139
BranchType
Definition: BranchType.h:11
std::vector< EventSelectionID > EventSelectionIDVector
void selectProducts(ProductRegistry const &preg)
Definition: SubProcess.cc:212
ProductList const & productList() const
ServiceToken serviceToken_
Definition: SubProcess.h:222
Provenance prov_
Definition: ProductData.h:51
std::vector< BranchListIndex > BranchListIndexes
unsigned int value_type
Definition: BranchID.h:16
ProcessHistoryID const & processHistoryID() const
Definition: Principal.h:143
ProcessHistory const & processHistory() const
Definition: Provenance.h:65
static void setThrowAnException(bool v)
StreamID streamID() const
boost::shared_ptr< void const > wrapper_
Definition: ProductData.h:50
std::vector< BranchDescription const * > allBranchDescriptions() const
std::auto_ptr< ParameterSet > popParameterSet(std::string const &name)
SubProcess(ParameterSet &parameterSet, ParameterSet const &topLevelParameterSet, boost::shared_ptr< ProductRegistry const > parentProductRegistry, boost::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
BranchID const & branchID() const
RunAuxiliary const & aux() const
Definition: RunPrincipal.h:57
ProductData const & productData() const
Definition: ProductHolder.h:42
boost::shared_ptr< ProductProvenanceRetriever > const & store() const
Definition: Provenance.h:64
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:226
void setProcessHistoryRegistry(ProcessHistoryRegistry const &phr)
DelayedReader * reader() const
Definition: Principal.h:173
unsigned int value() const
Definition: StreamID.h:46
detail::TriggerResultsBasedEventSelector selectors_
Definition: SubProcess.h:254
boost::shared_ptr< EventSetupProvider > makeProvider(ParameterSet &)
boost::shared_ptr< ProductProvenanceRetriever > productProvenanceRetrieverPtr() const
std::auto_ptr< Schedule > schedule_
Definition: SubProcess.h:237
void connectToSubProcess(ActivityRegistry &iOther)
boost::shared_ptr< BranchIDListHelper > branchIDListHelper_
Definition: SubProcess.h:225
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:234
std::vector< BranchID::value_type > BranchIDList
Definition: BranchIDList.h:18
std::unique_ptr< ParameterSet > processParameterSet_
Definition: SubProcess.h:240
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:267
void setProductProvenance(ProductProvenance const &prov) const
Definition: Provenance.cc:78
ProcessContext processContext_
Definition: SubProcess.h:228
BranchID const & originalBranchID() const
ProductID const & productID() const
Definition: Provenance.h:78
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:369
std::auto_ptr< SubProcess > subProcess_
Definition: SubProcess.h:239
tuple process
Definition: LaserDQM_cfg.py:3
boost::shared_ptr< ProcessConfiguration const > processConfiguration_
Definition: SubProcess.h:227
boost::shared_ptr< ProductRegistry const > preg_
Definition: SubProcess.h:224
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()
PrincipalCache principalCache_
Definition: SubProcess.h:235
ParameterSet const & parameterSet(Provenance const &provenance)
Definition: Provenance.cc:11
bool productUnavailable() const
Definition: ProductHolder.h:71